to do the printf I used semihosting from https://github.com/justyn/semihosting-cortexm-uos
I did minor modifications because the compiler complains but it works fine.
In my code I have
trace_printf(“>>>>> AmbientT: %3.3f°C AmbientP: %4.1fhPa\n”, oMeasure_AmbientTemperature.m_lTemperature/1000.0F,oMeasure_AmbientPressure.m_lPressure/100.0F );
In the openocd console:
>>>>> AmbientT: 27.114°C AmbientP: 1025.4hPa
My configuration is STM32f429I-DISCO openstm321.1.0 and eCos as RTOS