Add core dump partition for crash analysis

Carve 64KB from SPIFFS for a coredump partition at 0x7F0000.
On any crash (panic, WDT, assert), the ESP32 writes CPU state
and backtrace to flash, readable on next boot with espcoredump.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
torlando-tech
2026-02-23 16:57:05 -05:00
parent 5949cd97ff
commit bb58c69d38
2 changed files with 11 additions and 1 deletions

View File

@@ -4,4 +4,5 @@ nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x300000,
app1, app, ota_1, 0x310000, 0x300000,
spiffs, data, spiffs, 0x610000, 0x1F0000,
spiffs, data, spiffs, 0x610000, 0x1E0000,
coredump, data, coredump,0x7F0000, 0x10000,
1 # ESP-IDF Partition Table for T-Deck Plus (8MB Flash)
4 otadata, data, ota, 0xe000, 0x2000,
5 app0, app, ota_0, 0x10000, 0x300000,
6 app1, app, ota_1, 0x310000, 0x300000,
7 spiffs, data, spiffs, 0x610000, 0x1F0000, spiffs, data, spiffs, 0x610000, 0x1E0000,
8 coredump, data, coredump,0x7F0000, 0x10000,

View File

@@ -84,3 +84,12 @@ CONFIG_ESP_TASK_WDT_EN=y
CONFIG_ESP_TASK_WDT_TIMEOUT_S=30
CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0=y
CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1=y
# ============================================================================
# Core Dump — writes CPU state + backtrace to flash on crash
# Read with: espcoredump.py info_corefile -t raw -c 0x7F0000 -s 0x10000 <port>
# ============================================================================
CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y
CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y
CONFIG_ESP_COREDUMP_CHECKSUM_SHA256=y
CONFIG_ESP_COREDUMP_MAX_TASKS_NUM=64