Check availability of semihosting in LPCOpen

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Check availability of semihosting in LPCOpen

Jump to solution
666 Views
vitaliylivnov
Contributor III

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?

Labels (1)
1 Solution
525 Views
converse
Senior Contributor V

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:

ARM Information Center 

View solution in original post

1 Reply
526 Views
converse
Senior Contributor V

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:

ARM Information Center