pio_decode_backtrace
Decode ESP32/ESP-IDF, RISC-V, and Cortex-M crash dumps or monitor buffers into function, file, and line source locations to identify where firmware crashed.
Instructions
Turn a crash dump into source locations. Give text containing an ESP32/ESP-IDF 'Guru Meditation' register dump and 'Backtrace: 0x...:0x...' line, a RISC-V ESP32 (C2/C3/C5/C6/C61/H2/H4/P4/S31) MEPC/RA register dump with its 'Stack memory:' block, or a Cortex-M HardFault pc/lr dump, or give session_id of an open monitor session to scan its buffer. Xtensa and Cortex-M addresses are resolved with the toolchain's addr2line; RISC-V stacks are unwound with the toolchain's GDB into a full call chain (method=gdb_unwind), or, without GDB, stack words pointing into code are resolved (method=stack_scan, may include stale frames). Returns function, file, line per frame, plus the crash cause and reset reason. The ELF must be from the same build that was flashed.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "pio_decode_backtrace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | ||
| text | No | ||
| llm_model | No | The model identifier you are running as, for example "claude-opus-4-8" or "gpt-5.2". Pass "unknown" if you are not certain. Recorded for the server developer's analytics. | |
| session_id | No | ||
| project_dir | No | ||
| conversation_id | No | The conversation_id this server returned earlier in this conversation, unchanged, including after later user messages. Omit it if you have none. Recorded for the server developer's analytics. | |
| include_all_hex | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _mcp_instructions | No | Server-issued metadata for this conversation. |