Zephyr fatal error decoder

Paste the console output of a Zephyr fatal error, add zephyr.elf, and see what happened, why, and where: the reason code by name, every fault bit explained, and each frame of the call trace as a function and line.

What it reads

Functions and lines come from the ELF's symbol table and DWARF line table, as arm-zephyr-eabi-addr2line gives them. Nothing is uploaded. How to read a fatal error yourself.

The fault status bits

BitFaultUsually means
DACCVIOLMemManageA read or write the MPU forbids: a NULL pointer (MMFAR near 0) or a stack overflow into the guard.
IACCVIOLMemManageCode run from a region that may not execute: a jump through a bad function pointer.
MSTKERR, STKERRMemManage, BusFaultThe registers could not be saved on exception entry: a stack overflow.
PRECISERRBusFaultThe instruction at PC touched an address with nothing behind it; BFAR says which.
IMPRECISERRBusFaultA buffered write failed; the culprit is a few instructions before PC. Often a peripheral with its clock off.
UNDEFINSTRUsageFaultBytes that are not an instruction: a corrupt pointer or return address, or __builtin_trap().
INVSTATEUsageFaultA branch to an even address: a call through a NULL or uninitialised function pointer.
NOCPUsageFaultA floating-point instruction with the FPU off.
UNALIGNED, DIVBYZEROUsageFaultAn unaligned access or an integer division by zero, when trapping is on.
FORCED (HFSR)HardFaultOne of the above escalated to HardFault; read the CFSR bits.
VECTTBL (HFSR)HardFaultThe vector table could not be read: an image linked for the wrong address, often behind a bootloader.

For devices in the field

Pinscope's Zephyr module keeps a fatal error across the reboot, sends it on the next connection and decodes it with the ELF of that build.

Try it

Three devices are free, and no card is needed. Create an account, or read the guide for your platform: ESP32, Zephyr, Raspberry Pi Pico, Linux, ESP8266.

More