Hi,
I have a ULINK2 debugger and Core-M3 board. I have a simple program that will print a simple "Hello World". I want this printf output will be display in the Debug (Printf) viewer on my uVision IDE, this will happen during Debugging. I've already setup the Retarget.c for the ITM_SendChar and enable the Port 0 for the ITM Stimulus Port.But unfortunately when I do debugging theirs no display for Debug(printf) viewer and it has a display in the bottom portion of the IDE: Trace: No Synchronization. If I do debugging using SIMULATION i can view the printf output display in Debug(printf) viewer but if I do debugging using the Debugger (ULINK2) theirs no display on the printf viewer. I've read on the "ULINK2 User Guide, Trace Status: No Synchronization --> There are no synchronization packets received from the target. This indicates that the Trace hardware is either not connected or improperly configured.", but I'm still can't figure out how to resolve my issue. Could someone help me....thanks a lot.
Hello josh u,
I also tested a RAM application with SWO on a MCB1000 populated with a LPC1343. I encountered no problems with SWO via ITM port 0.
I used the following INI file:
FUNC void Setup (void) { SP = _RDWORD(0x10000000); // Setup Stack Pointer PC = _RDWORD(0x10000004); // Setup Program Counter _WDWORD(0xE000ED08, 0x10000000); // Setup VTOR register // _WDWORD(0x40048000, 0x00000001); // Interrupt vectors are re-mapped to Static RAM } FUNC void SWOSetup (void) { _WDWORD(0x40048080, 0x0001005F); // Enable AHB Clock (GPIO & IOCON) _WDWORD(0x400480AC, 0x00000001); // Enable Trace Clock (Div=1) _WDWORD(0x40044064, 0x00000003); // Enable SWO on P0.9 } load %L incremental SWOSetup(); // SWO Setup Setup(); // Setup for Running g, main
If you use this INI file uncheck Load Application at Startup under Options for Target - Debug.
If you still have problems with SWO then please contact KEIL support (support.intl@keil.com). Please advice support to forward your request to me then I can send you the test project I am using.
Best Regards, Martin Guenther
Hi Martin,
Theirs one more thing I don't really understand in ITM_SendChar on this line while (ITM->PORT[0].u32 ==0); in which I don't have an idea why the debugger stops in this line when I do debugging on printf. It stops when it recognized no more character to be read.
Thanks.
The while loop while (ITM->PORT[0].u32 == 0); runs as long as the stimulus port register is not empty.
Read access to a stimulus port register returns the FIFO status. 0 = full, 1 = not full.
ITM Stimulus Ports 0-31 Each of the 32 stimulus ports has its own address. A write to one of these locations causes data to be written into the FIFO if the corresponding bit in the Trace Enable Register is set. Reading from any of the stimulus ports returns the FIFO status in bit [0]: • 0 = full • 1 = not full.
Hi Josh,
Were you able to solve the Trace: No Synchronization issue?
I'm having the same issue you and "Nick L" had on http://www.keil.com/forum/17897/. Unfortunately I can't post any more on that thread because it's classified as read only...
I'm using MCBSTM32, MDKARM 4.20 and ULINK2.
I have tried several ITM Trace examples (Blink examples), created my own example, based on the my limited knowledge about the ITM, and all the attempts did not work on the eval board and also on my own hardware.
I have inspected the SWO line with a Digital Scope and the bit timing is correct, it means the Core clock setting is correct. Also tried different SWJ Max Clock speeds settings ranging from 500KHz to 10MHz. At some time during the test I used an "premium" quality USB Cable. Signal integrity is not being an issue here.
UV4 DB will always display Trace: Running and then 3 seconds latter, Trace: No Synchronization. No data from ITM is displayed.
I would appreciate in case you solved and could share the solution.
Regards,
Alex