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
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.