ESP32 boot loop and "Guru Meditation Error": what the messages mean

How to read a crash message and the reset reason in the serial output, what the common ones point to and how to find the line of code…

A crash dump looks frightening but is organised. The first line says what kind of error happened, and the backtrace says where.

The common messages

  • LoadProhibited or StoreProhibited: the code read or wrote through an invalid address, most often a pointer that was never set or an object that was already destroyed.
  • Stack canary watchpoint triggered: a task ran out of stack. Increase the stack size of that task or stop putting large arrays on the stack.
  • Task watchdog got triggered: some code kept the CPU busy without giving other tasks time. Add a short delay or yield inside long loops.
  • Brownout detector was triggered: a power problem, not a code problem. See the brownout guide.
  • invalid header or flash read err: the firmware in flash is damaged or was built for a different flash mode. Erase the flash and upload again.

Read the reset reason

The line that starts with rst: tells you how the last start happened. Power-on and software resets are normal. A watchdog reset or a panic means something went wrong, and a brownout means the supply did.

Find the line of code

Copy the Backtrace line into the ESP Exception Decoder in the Arduino IDE, or use addr2line from the toolchain with your compiled ELF file. It turns the addresses into file names and line numbers.

A trick that saves hours

If the board crashes right after you added something, undo only that change and test again. Repeating this in small steps finds the cause faster than any decoder.

Tools that help

  • AI Error Doctor — Paste a Serial Monitor error or a sketch and get a plain-language cause, step-by-step fix and corrected code.
  • Reference — Searchable ESP32 error guide (Brownout, Failed to connect, Guru Meditation), 3.3 V vs 5 V cheat sheet and ESP32 module comparison table.
  • Web serial monitor — Read ESP32 Serial logs over USB in Chrome or Edge: 9600 / 115200 / 460800 baud, clear, download .txt and send errors to the AI Error Doctor.

Read next

← All guides

Comments

No comments yet. Share your experience or ask a question.

Comments are moderated.