FreeRTOS, debugging hardfault when HardFault_Handler breakpoint is never triggered?
I'm looking at the "Debugging and diagnosing hard faults" on FreeRTOS' website (https://www.freertos.org/Debugging-Hard-Faults-On-Cortex-M-Microcontrollers.html), and I populated my HardFault_Handler() function and defined prvGetRegistersFromStack(). And I set a breakpoint in HardFault_Handler().
However, I cannot get the program to land in either of these functions while debugging. Instead I just get stuck in the infinite loop in the default handler.
Would moving the code from HardFault_Hanlder() into the default handler still give me what I need? ie,
Default_Handler:
tst lr, #4
ite eq
mrseq r0, msp
mrsne r0, psp
ldr r1, [r0, #24]
b Infinite_Loop
.size Default_Handler, .-Default_Handler
.align 4And if not, how can I get around this?
#RTOS #HardFault #DEBUG
