Hello! I used semihosting in my project with LPCOpen library. Everything works well, however, if I turn off the debugger from the microcontroller, the program stops running. Can I perform a software check on the availability of semihosting, and, if it is not available, disable debug output?
Solved! Go to Solution.
You can't check if semihosting is available, but you can check if the application is running under debug control (which may be good enough for your purposes). To do this, check bit 0 of the Debug Halting Control and Status Register (DHCSR), which is located at 0xE000EDF0.
More info here:
You can't check if semihosting is available, but you can check if the application is running under debug control (which may be good enough for your purposes). To do this, check bit 0 of the Debug Halting Control and Status Register (DHCSR), which is located at 0xE000EDF0.
More info here: