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
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