I am using STM32F103CB. I have followed the instructions below to get a printf() statement to send the message to the Debug(printf)Viewer but do not get any message in the window.
1. Check the STDERR, STDIN and STDOUT components and set the Variant to ITM for each component.
2. Add a debugging trace messages using printf.
3. Set up the debug session for SWO trace.
4. Set the ITM Port 0 to capture the information. Clear the Privilege Port 7..0 to access ITM Port 0 from User Mode.
Regards
Hi
Below link should help: www.keil.com/.../_retarget__examples__i_t_m.html
Thanks for the response.
I followed the like which then said to follow the link
www.keil.com/.../_retarget__examples.html
Which told how to get the USB Host Keyboard(MCBBSTM32F400) example project.
Unfortunately I have no such project listed. Do you know of a different example project I could use? Preferably one that uses the STM32F100 series.
Thanks.
ITM_SendChar() should be viable provided the SWO/PB3 is physically connected to a supported debugger, and you have the settings and frequency set correctly.
The problem is solved. SWO/PB3 was not connected to the debugger. I use the ST-LINK V2 and typically only use SWDIO/PA13( pin 7 of ST-Link ) and SWDCLK/PA14( pin 9 of ST-Link). I needed to add the connection for SWO/PBS( pin 13 of ST-LINK ).
Thank you for your help.