Seven Tips for Debugging like a PRO: (2) Debug a HardFault

  • Scenario

Enter debug mode and find out the project is stuck in the hard fault handler.

  • Debug Tips

Find the last instruction before entering the hard fault.

hard fault explain

Under Debug mode.

1.Get SP (Stack Pointer) value.

2.Use SP value to find the stack in the Memory window.

3.The 7th value of the stack is the address of the last instruction.

4.Use the address to find the last instruction in the Disassembly window.

stack pointer

本網站使用cookie作為與網站互動時識別瀏覽器之用,瀏覽本網站即表示您同意本網站對cookie的使用及相關隱私權政策
OK