[dc] ~/cortex-m-fault-decoder

Why did my Cortex-M HardFault?

Paste the fault registers and the stacked frame. You get the fault bits, the address, where it happened and the usual causes, in plain words. It runs in your browser: nothing is uploaded.

inputGDB · OpenOCD · fault_dump.c · NAME=value
examples:
How do I get these values?

GDB: source gdb/fault.gdb, break HardFault_Handler, run until it stops, then fault.

Firmware: add firmware/fault_dump.c to your build. On a fault it prints everything over your UART, ready to paste.

By hand: CFSR 0xE000ED28, HFSR 0xE000ED2C, MMFAR 0xE000ED34, BFAR 0xE000ED38, LR on handler entry, and 8 words at MSP or PSP (LR bit 2).

decode

Paste something or pick an example.