AnsweredAssumed Answered

Semihosting in Eclipse or retargeting printf

Question asked by jooya.ali on Jun 3, 2014
Latest reply on Feb 10, 2015 by Butler.Justyn
I am trying to debug some very simple code for STM32F0Discovery using Eclipse, 
ARM arm-none-eabi-gdb compiler and OpenOCD debuger.

I could build and debug my cods and now I am trying to use printf to see some variables on the screen. CoIDE has this nice semihosting which without using USART, sends printf output on the screen. I tried to use the semihosting library files with eclips to do the same. I could enable  semihosting in Eclipse but nothing showed up on the screen! I guess the problem was SH_DoCommand

Then I tried to use USART_Printf example from STM32F0xx_StdPeriph_Examples.
I got errors regarding _read and _write and so many errors like that. I tried to fix the errors by adding newlib_stubs.c as in
After small changes in the code I couldn't debug the code!
I have also tried to add 
--specs=rdimon.specs   -Wl,--start-group -lgcc -lc -lm -lrdimon -Wl,--end-group
flags to the linker but still nothing on the screen!
Any Idea?