ST-link printf to console with GDB and semihosting or ITM and ST Link Utility
I found that Semihosting does not work when in release mode (burning)
therefore i used to comment and uncomment the call to initialise_monitor_handles() each time per release/debug
To avoid it i did the following
1. in main.c define weak stub
__weak void initialise_monitor_handles( void )
{
}
2. continue calling initialise_monitor_handles() in main() anyway
If debugging, the initialise_monitor_handles() will be taken from linked library rdimon
If working in release mode, initialise_monitor_handles() will be taken from the main.c implementation (because you are not liked to rdimon library anymore)