Check availability of semihosting in LPCOpen

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Check availability of semihosting in LPCOpen

跳至解决方案
685 次查看
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?

标签 (1)
标记 (3)
1 解答
544 次查看
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 

在原帖中查看解决方案

1 回复
545 次查看
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