So, this issue have both normal semihosting, and fast semihosting framework with its generated led blinking project.
When i started VisualGDB debugger it asking me to enabled VisualGDB handle the calls and emulating a basic console.
If i selecting Yes, everithing is working fine.
If i selecting No, the application throw an exception.
When i compile and select Debug->Start without debugging, the led is not blinking. So the program in the microcontroller, not run. If i comment out the two printf function call, and select again Debug->Start without debugging, the led blinking and everything is working fine.
So if the source contain printf function call, the program in the microcontroller, not run without debugging.
Have you any idea for this issue?
This topic was modified 1 week, 4 days ago by ExtSol.
This is actually by design. Semihosting works by triggering a breakpoint so that the debugger can stop at it and read the data produced by the target. If no debugger is attached (or you configure it to ignore semihosting calls), the breakpoint will be handled by either the regular debugger logic, or the exception handler in the firmware.
We normally recommend using conditional compilation (#ifdef DEBUG) to remove semihosting-based logging from release builds. If you are using our Advanced Semihosting framework, you can also configure it to suppress the semihosting calls unless a debugger is attached (see the configuration Embedded Frameworks page of VisualGDB Project Properties), however the hardware registers responsible for detecting a debugger are not present on all devices, hence this may not work on some targets.