How to enable core dump to flash


Does anybody know hot to enable core dump to flash within platform io? Should be done in esp-idf with menuconfig but how I can get it active within platform io? Perhaps an enhancement request to arduino-esp32 framework?


You can get into the menuconfig per doc, project tasks.

You need to also use a partition table that has space for the core dump, otherwise you’ll be running into No core dump partition found.

Do you have some more detailed infos? I cannot find something there about menuconfig.

But I found info that’s I have to compile arduino ESP32 as component with new setting as the only option but struggle a little how to implement it.


found this post PlatformIO Support for ESP32 Coredump

and checked the release notes that ESP-IDF v5.0.1 is support. Should core dump to flash still work there?

I tried it with the following easy code after calling esp_core_dump_init(); but no core dump is detected.

Did you trigger a crash that would cause a core dump?

Did you set the partitions to be the same?


found a good example from you and added it to my code. The coredump is created correctly, so no issue to create a coredump. :slight_smile: But I faced that my ESP32 projects crashing unregularly with interrupt watchdog issues, do you know why they are not results into a coredump? Is this because of the watchdog?

Anyway I solved my issue: during testing I found out that it seems caused by the esphome MqttClient library if wifi quality is poor. Switching to the original maintained repo and newest version fixed it. marvinroger/AsyncMqttClient@^0.9.0 contains an enhancement to queue messages which perhaps correct my problem.

Ok, the crash is there again but less. No core dump is created with the restart reason: last reset: Software reset due to exception/panic

Any idea how to analyse it best without connecting my laptop for days via USB? Using another ESP32S2 as USB logger?