Any hints, tips or tricks to debug a Cortex-M3: Hard Fault Exception?
It's an STM32, and I'm using the standard Keil STM32F10x.s: Startup file - which contains Dummy Exception Handlers (infinite loops) to "catch" the exception.
So, ahving arrived in the Hard Fault Exception Handler, what should I do next...?
The Cortex-M pushes 8 registers on the stack on Hard Fault exception. Here is a code to read the memory address that caused it:
MRS R0,PSP ; Read PSP LDR R1,[R0,#24] ; Read Saved PC from Stack
Thanks - and I found this to read them all:
www.st.com/.../modules.php