How to see printf messages in Coocox

Hi Everyone!

I am a newbie and I have just started playing around with the RTLS example. I would like to include “printf” instructions in order to follow more easily the flow of the execution. I see that there are commented “printf” instructions throughout the source code, so I guess that it is possible to see those messages in Coocox.
I have followed the instructions from a couple of websites about how to configure the semihosting and retarget the printf but I always get some errors when building.

I would love some help for configuring the semihosting or an alternative way for seeing the debugging messages. I am using Coocox 1.7.8 and GNU Tools ARM 7-2017-q4-major.

Best regards,

Hi Luis,

Which hardware do you use ?

Several ways to do that, you could look at using arm semihosting or retargeting printf on the UART.


Hi Ives,

I have the TREK1000 kit (STM32F105RC) and I want to debug the RTLS application using the ST-Link/v2 and Coocox 1.7.8.

I have just managed to use semihosting but I think it is a little bit slow and I am missing real-time events.

Is retargetting printf to the UART faster? Do you have some reference webpage or example source code for doing it?

Thank you very much in advance,