I'm experiencing a hard fault on a LPC1517. I've extended the handler function in cr_startup_lpc15xx.c to turn on a pin to use as an external trigger.
However, when the hard fault occurs, the debugger stops the code at the _entry_ into the handler, so my instruction does not get called. (If I click the "resume" or "step over" buttons, the instruction does get executed.)
Is there a way to prevent this apparent automatic break point from occurring?
__attribute__ ((section(".after_vectors")))
void HardFault_Handler(void)
{
*((volatile unsigned int *) 0x1c002200) = (1<<4); //set p0.4
while(1) {}
}