Hi,
I have an LPC13xx mounted in LPCXpresso Base Board and I use the ULINK2 debugger.. I have a simple program that will display the printf output data...for example Display a "Hello World" in the window. I've found out that uVision4 works the printf in Retarget.c and i modify fputc.. What i want is when I Start debugging I want to view the "Hello World" in the output window.But unfortunately theirs nothing display in the Serial Window (UART #1, UART #2, UART#3 and Debug (Printf)Viewer)... If I do simulation with out using the ULINK debugger and Start debugging the program I could view the "Hello World" in the Debug (printf) Viewer. Did someone knows how to use the debug (printf) viewer or enable an output window using the debugger without using simulation and without using UART for printf output.(I've already implement the codes for ITM). Is it possible to display printf output in a window inside the uVision 4 not in the Hyperterminal using the ULINK debugger? If yes, could you please share it to me?.. Thanks a lot.
Debugger will show characters in Debug (printf) window that are captured over Serial Wire Output (SWO) - ITM channel 0.
To achieve this the following is required:
A. Proper code needs to be added for sending characters:
- function ITM_SendChar should be called in retargeted sendchar
B. ULINK debugger needs to be properly configured (Debug Settings - Trace Tab):
- correct Core Clock specified
- Trace Port: Serial Wire Output (UART)
- ITM Port 0 enabled
C. LPC13xx needs to be configured for trace over SWO
Use the following debugger Initialization file:
FUNC void DebugSetup (void) { // <h> Trace Clock Divider // <o3.0..7> TRACECLKDIV.DIV : Trace Clock Divider // 0 = Trace Clock disabled // </h> _WDWORD(0x40048080, 0x0001005F); // Enable AHB Clock (GPIO & IOCON) _WDWORD(0x400480AC, 0x00000001); // Enable Trace Clock (Div=1) _WDWORD(0x40044064, 0x00000003); // Enable SWO on P0.9 } DebugSetup(); // Debugger Setup
SWO configuration can be verified by looking at the status bar when the target is running through the debugger. www.keil.com/.../ulink2_trace_status.htm
Hello,
I've already found this one and it is a combo box but it is been disabled. Trace Port: Serial Wire Output -UART/NRZ. I think it is been a default value. B. ULINK debugger needs to be properly configured (Debug Settings - Trace Tab): - Trace Port: Serial Wire Output (UART)-> what do you mean by this? Is this found in the IDE or this is the Debug(printf) Viewer window? Because I didn't found this - Trace Port: Serial Wire Output (UART) in Debug Settings - Trace Tab
View all questions in Keil forum