/esp32-workbench:esp32-crash-reviewfrom ESP32 Workbench
Decodes and analyses ESP32-family panics — Guru Meditation errors, register dumps, backtraces, aborts, stack overflows and watchdog timeouts on Xtensa and RISC-V chips — to find root cause and recommend a fix.
Ships in ESP32 Workbench. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Crash analysis is architecture-specific. Identify the chip first.
If the esp32-workbench MCP server is connected, call its tools; otherwise run the
CLI. If esp32wb is not on PATH, use
uvx --from git+https://github.com/agodianel/esp32-claude-workbench esp32wb <args>.
Add --json for machine-readable output.
| Need | MCP tool | CLI |
|---|---|---|
| Decode panic (Xtensa + RISC-V; runs addr2line if the toolchain is on PATH) | crash_decode | esp32wb crash panic.txt --elf build/<app>.elf [--target T] (- reads stdin) |
| Arch + toolchain prefix for the chip | chip_info | esp32wb chip <target> |
| Surrounding log context | log_summary | esp32wb logs monitor.log |
| Stack sizes after a stack overflow | stack_check | esp32wb stacks . |
The ELF must be the exact build that produced the crash; a rebuilt ELF gives
wrong lines. If --elf is missing, ask for it or say decoding is unavailable.
From CONFIG_IDF_TARGET, the boot banner, or the dump itself:
| Dump contains | Architecture | Chips |
|---|---|---|
PC, PS, A0..A15, EXCCAUSE, EXCVADDR, Backtrace: 0x..:0x.. | Xtensa | ESP32, ESP32-S2, ESP32-S3 |
MEPC, RA, SP, MCAUSE, MTVAL, MSTATUS, stack memory dump | RISC-V | ESP32-C2, C3, C5, C6, H2, P4 |
Toolchains: Xtensa uses a per-chip prefix (xtensa-esp32-elf-,
xtensa-esp32s2-elf-, xtensa-esp32s3-elf-); RISC-V chips use riscv32-esp-elf-.
Confirm with esp32wb chip <target>.
| Xtensa name | RISC-V equivalent | Typical cause |
|---|---|---|
LoadProhibited | Load access fault | Read through NULL / dangling / uninitialised pointer |
StoreProhibited | Store access fault | Write through bad pointer, write to flash/ROM |
InstrFetchProhibited | Instruction access fault | Bad function pointer, corrupted return address |
IllegalInstruction | Illegal instruction | Corrupted stack/code, bad function pointer, abort paths |
LoadStoreAlignment | Load/Store address misaligned | Misaligned access via cast or packed struct |
IntegerDivideByZero | (no trap — RISC-V returns a defined result) | Unchecked divisor |
Unhandled debug exception + "Stack canary watchpoint triggered" | Breakpoint (end-of-stack watchpoint) or Stack protection fault (HW stack guard) | Stack overflow |
Interrupt wdt timeout on CPU0/1 | same | ISR too long / interrupts disabled too long |
Cache error / cache-disabled access | Cache error | Code/data in flash accessed while cache disabled (ISR not in IRAM) |
The fault address is EXCVADDR on Xtensa and MTVAL on RISC-V; the faulting
instruction is PC (Xtensa) / MEPC (RISC-V).
esp32wb crash <file> --elf build/<app>.elf (preferred), oridf.py monitor with the matching ELF (decodes automatically; on RISC-V it
unwinds the stack dump), or<prefix>addr2line -pfiaC -e build/<app>.elf <PC> <addr...>.RISC-V panics normally lack a Backtrace: line unless the firmware was built with
CONFIG_ESP_SYSTEM_USE_EH_FRAME or CONFIG_ESP_SYSTEM_USE_FRAME_POINTER; without the
monitor or the ELF you may only get the faulting function from MEPC and RA.
0x00000000 or a small offset → NULL pointer / NULL struct member
(offset ≈ member offset).abort() → read the preceding line (assert text, ESP_ERROR_CHECK error name and
file:line).Detailed patterns: Guru Meditation playbook, watchdog playbook.
CONFIG_HEAP_POISONING_COMPREHENSIVE=y
CONFIG_HEAP_TASK_TRACKING=y
CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y
CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y
CONFIG_COMPILER_STACK_CHECK_MODE_STRONG=y # option name varies by IDF version
CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y # keep the dump on screen instead of rebooting
CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y # capture field crashes; read with idf.py coredump-info
Verify each option exists for your ESP-IDF version in menuconfig before adding it,
and remove debug options before release (esp32wb sdkconfig flags them).
# Crash Analysis — <project> (target: <chip>, arch: Xtensa|RISC-V, IDF <ver>)
## Exception
- Type / core / task:
- PC|MEPC → function (file:line):
- Fault address (EXCVADDR|MTVAL):
## Call chain
| # | Address | Function | File:Line |
## Root cause (confidence: high/medium/low, with evidence)
## Classification: NULL pointer | stack overflow | ISR violation | memory corruption | watchdog | cache/IRAM | other
## Recommended fix (goes through an implementation contract)
## Diagnostic config to confirm
## Prevention
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
esp32, crash-analysis, guru-meditation, panic-decode, firmware-debug
npx claudepluginhub agodianel/esp32-claude-workbench --plugin esp32-workbench11 skills in this plugin
/esp32-arch-reviewReviews ESP32 firmware architecture for FreeRTOS safety, memory and stack sizing, ISR rules, error handling, peripheral and pin safety, networking, storage, logging and build configuration, and returns a PASS / PASS WITH NOTES / FAIL report. Use when the user asks to "review the architecture", "code review this firmware", "is this RTOS-safe", "check for race conditions", "audit task stacks", "memory leak", "heap fragmentation", "stack overflow risk", "/arch-review", or before merging a significant ESP-IDF change or inheriting an existing ESP32 project./esp32-build-fixDiagnoses and fixes ESP-IDF build, link, CMake/Kconfig, component-manager and flashing failures, using the build log to classify the error before changing anything. Use when "idf.py build fails", "undefined reference to", "No such file or directory" for a header, "Failed to resolve component", "CMake Error", "multiple definition of", "region `iram0_0_seg' overflowed", "app partition is too small", "implicit declaration of function", "esptool Failed to connect", "Wrong boot mode detected", "No serial data received", "Permission denied /dev/ttyUSB0", "A fatal error occurred", "set-target", or after an ESP-IDF version upgrade (v4 → v5) breaks the build./esp32-feature-contractCreates a mission file and an implementation contract (scope, affected files, risks, tests, rollback) that must be accepted before any ESP32 firmware code is changed. Use when the user asks to "add a feature", "implement", "fix a bug", "refactor", "write a contract", "start a mission", "plan this change", "/contract", or "resume the mission" in an ESP-IDF, ESP32, ESP32-S3, ESP32-C3 or ESP32-C6 project, and before editing any firmware source./esp32-log-triageParses and classifies ESP32 serial monitor output — reset reasons, boot loops, panics, watchdog messages, brownouts, heap failures, Wi-Fi/BLE/MQTT errors and peripheral timeouts — and produces a triage report with a root-cause hypothesis and next steps. Use when the user pastes "idf.py monitor" output or a serial log, or says "boot loop", "keeps rebooting", "rst:0x", "Brownout detector was triggered", "Task watchdog got triggered", "Wi-Fi keeps disconnecting", "WIFI_EVENT_STA_DISCONNECTED", "BLE won't connect", "MQTT disconnects", "/triage-log", or "what does this log mean" for any ESP32-family chip./esp32-peripheral-bringupGuides bring-up and debugging of ESP32 peripherals — I2C, SPI, UART, ADC and LEDC/PWM — using the ESP-IDF v5 driver APIs, chip-correct pin choices, and a step-by-step wiring → config → probe → speed-up procedure. Use when the user says "I2C sensor not responding", "i2c ESP_ERR_TIMEOUT", "no ACK", "I2C scan finds nothing", "SPI returns 0xFF", "SPI display blank", "UART garbage characters", "uart_read_bytes returns nothing", "ADC reads wrong value", "adc_oneshot", "analogRead with Wi-Fi", "PWM / LEDC not working", "set duty", "bring up a new sensor", or "connect a peripheral" on ESP32, ESP32-S3, ESP32-C3, ESP32-C6 or other Espressif chips./esp32-pin-auditAudits GPIO assignments in ESP32-family firmware against the verified pin facts of the actual target chip and board, flagging flash/PSRAM pins, strapping pins, input-only pins, USB-Serial-JTAG and UART0 console pins, JTAG pins, ADC2/Wi-Fi conflicts, double assignments and pin-map drift. Use when the user asks "which pins can I use", "is GPIO 12 safe", "check my pinout", "pin conflict", "strapping pin", "board won't boot after wiring", "can't flash after connecting a sensor", "ADC2 with Wi-Fi", "input-only pin", "/pin-audit", or before adding any GPIO, I2C, SPI, UART, ADC or LEDC code on ESP32, ESP32-S2, ESP32-S3, ESP32-C2, ESP32-C3, ESP32-C5, ESP32-C6, ESP32-H2 or ESP32-P4.Other plugins' skills for the same job