I am having trouble getting the output using printf command in the debug mode. despite clicking on 'run' button in the debug mode, it doesn't display anything in the debug viewer.
Does anyone know how to solve this?
Regards
Like the one shown on page 13 here? -> http://www.keil.com/appnotes/files/apnt_253.pdf
You don't mention a board or a chip, knowing might narrow down why you fail. A number of the ST boards require a solder bridge to be made to get pin level connectivity. Check the manual.
You must configure Trace suitably with the correct core speed, you must provide code to support printf() output to the desired target.
community.st.com/.../93757
community.st.com/.../140878-re-how-to-properly-setup-printf-with-keil-µvision-and-stm32l151c8t6a