2021-09-29 09:02 PM
Hello,
I have enabled the semihosting.
The semihosting is running on the debug mode properly.
And debug message by printf() is displayed on the console window of the cubeide.
But if the project is ran on the run mode(run, not debug),
my code is not proceeded.
I set the parameters to use the semihosting as the debug mode.
I can't use the semihosting on the run mode?
Thanks
2021-09-30 11:15 PM
Semihosting requires a debug agent attached to the MCU, see https://developer.arm.com/documentation/dui0471/g/Bgbjjgij for more details. If you want printf logging in production mode (no debugger attached), either redirect printf to an UART which works with any terminal prog or use SWO (Serial Wire Output) which needs dedicated hard&software. See also AN4989
Application note
STM32 microcontroller debug toolbox
hth
KnarfB
2021-10-13 02:31 AM
Hello @AK.12.26im
I saw another question (here) regarding redirection today and think it is the right time to do some tests and make/share the summary.
I think OpenOCD+GDB (as shown in page 18 of the attachment) or OpenOCD-only (as shown in page 19 of the attachment) is what you need.
2021-10-13 02:45 AM
2021-10-13 07:53 AM
Thanks alot.