ESP8266 exception decoder
Paste what the ESP8266 printed when it crashed, from Exception to the end of the stack dump, choose the ELF of that build, and get the functions and lines. The exception number and reset cause are explained too.
Where the ELF is
- Arduino IDE: Sketch → Export Compiled Binary, then
build/esp8266.esp8266.<board>/<sketch>.ino.elfin the sketch folder. - PlatformIO:
.pio/build/<env>/firmware.elf. - ESP8266 RTOS SDK:
build/<project>.elf.
The exceptions
| Exception | Usually means |
|---|---|
| 0 | Illegal instruction: a corrupt function pointer, or code in flash run while flash is busy (an ISR without IRAM_ATTR). |
| 3 | A byte read from memory that only allows 32-bit reads: a PROGMEM string used without pgm_read_byte or the F() helpers. |
| 6 | Division by zero. |
| 9 | An unaligned 16 or 32-bit access, often a cast of a byte buffer. |
| 20 | A jump to an invalid address: a callback that was never set, or a damaged return address. |
| 28 | A read from an invalid address; with excvaddr near 0, a NULL pointer. |
| 29 | A write to an invalid address; with excvaddr near 0, a NULL pointer. |
The stack dump holds return addresses mixed with data, so some decoded lines are leftovers of earlier calls; read them from the top. Nothing is uploaded.
For devices that are not on your desk
Pinscope on the ESP8266 sends logs, metrics and the reset reason over the internet, and updates firmware over the air, in about 7 KB of RAM.
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
- Remote access to an ESP32 without TLS: what it measured and what it costs
- Serial monitor in the browser for ESP32 and Zephyr, with crash decoding
- ESP32 web flasher: flash .bin files from the browser
- Pinscope now runs on Zephyr, Raspberry Pi Pico, Linux and ESP8266
- sdkconfig diff: compare two ESP-IDF configurations
- Memfault, Golioth, nRF Cloud and Pinscope compared
- The Cyber Resilience Act, for the devices you ship