Well I'm beginner with ARM Cortex-M and I'm learning with Eclipse IDE (with Cross ARM GNU C/C++ Compiler) and Blue Pill board (STM32f103C8T6). My problem is about using printf function. I've configurated as semihosting and I could used functions from Trace.h file and now I would like to use functions like scanf, printf and so on. I've searched information by this web site and intenet, and I haven't could to get a good result.
Now I've set my projects with parameters: 1.-I've setthat flags: -specs=nosys.specs -specs=rdimon.specs -lc -lrdimon 2.- Add extern void initialise_monitor_handles(void) above main. 3.- Add initialise_monitor_handles() before printf function. 4.- Add monitor arm semihosting enable in command startup tab in debug configurations.
When I'm debugging and I reach printf function, my board stop and it sent me to a HardFault_handler() function.
I don't know what I'm doing bad.. sometime I think that microcontroller can not use that kind of function due to amount of memory that printf function have to use, therefore I have to redefine size of heap and stack in linker script.