How to detect Debugging during runtime

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

How to detect Debugging during runtime

498 Views
leg7911
Contributor II

Hi,
I wonder how to detect (from runtime code) if debug probe is attached / debugging have place.

Or from other side. I'm using semihost to put some debug info. However when I start the procesor w/o debuger, it stucks (i gues hard fault) - is it normal or I should change some settings?
If there was a way to detect, I could avoid debug "printf" when no probe is attached.

lpc11e35

Labels (1)
0 Kudos
1 Reply

407 Views
lpcxpresso_supp
NXP Employee
NXP Employee

There is some background information on this at : How to detect if LPClink is attached ? 

If using MCUXpresso IDE, then for SDK based projects, an appropriate hard fault handler to deal with semihosting when the debugger is not attached is automatically generated (based on the original from the very old forum thread above). Although this file is not included in projects based on preinstalled parts like LPC11e35, the same file should be useable - I've attached it for reference.

Regards,

MCUXpresso IDE Support

0 Kudos