I am tracing a problem with an app running on a Cortex M0 using a JLink debugger and have been trying to analyse a hard fault. Execution freezes. If I pause exceution the call stack indicates HardFaultHandler() as the last function called and a call address in the vector table. The call address is ExternalISR9 rather than the address of the HardFault_Handler ???!!!
Segger provides HardFaultHandler code which I've compiled and linked. However when the hard fault occurs, the code is not invoked. From the Segger symbol explorer I can see where the HardFaultHandler code resides in memory. I'd expect this address to be linked by the exception handler which is the second item of the vector table. However examining the vector table in memory shows:
@180C0
FE E7 FE E7 FE E7 FE E7 FE E7 FE E7 FE E7 FE E7
FE E7 FE E7 FE E7 FE E7 FE E7 FE E7 FE E7 FE E7
FE E7 FE E7 FE E7 FE E7 FE E7 FE E7 FE E7
???!!!
What might be wrong about my set-up that would prevent the vector table being correctly initialised?
Where can I learn about how the exception vector is used to calculate the address where the ISR resides?
Relevant files attached
Many thanks for any help
Rob
Segger provides HardFaultHandler code which I've compiled and linked. However when the hard fault occurs, the code is not invoked. From the Segger symbol explorer I can see where the HardFaultHandler code resides in memory. I'd expect this address to be linked by the exception handler which is the second item of the vector table. However examining the vector table in memory shows:
@180C0
FE E7 FE E7 FE E7 FE E7 FE E7 FE E7 FE E7 FE E7
FE E7 FE E7 FE E7 FE E7 FE E7 FE E7 FE E7 FE E7
FE E7 FE E7 FE E7 FE E7 FE E7 FE E7 FE E7
???!!!
What might be wrong about my set-up that would prevent the vector table being correctly initialised?
Where can I learn about how the exception vector is used to calculate the address where the ISR resides?
Relevant files attached
Many thanks for any help
Rob