mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
esp32: Fixes infinite loop caused by exception during core dumping
This commit is contained in:
parent
51e8f439b8
commit
fb8b0c534a
@ -470,14 +470,21 @@ static __attribute__((noreturn)) void commonErrorHandler(XtExcFrame *frame)
|
|||||||
esp_gdbstub_panic_handler(frame);
|
esp_gdbstub_panic_handler(frame);
|
||||||
#else
|
#else
|
||||||
#if CONFIG_ESP32_ENABLE_COREDUMP
|
#if CONFIG_ESP32_ENABLE_COREDUMP
|
||||||
|
static bool s_dumping_core;
|
||||||
|
if (s_dumping_core) {
|
||||||
|
panicPutStr("Re-entered core dump! Exception happened during core dump!\r\n");
|
||||||
|
} else {
|
||||||
disableAllWdts();
|
disableAllWdts();
|
||||||
|
s_dumping_core = true;
|
||||||
#if CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH
|
#if CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH
|
||||||
esp_core_dump_to_flash(frame);
|
esp_core_dump_to_flash(frame);
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_ESP32_ENABLE_COREDUMP_TO_UART && !CONFIG_ESP32_PANIC_SILENT_REBOOT
|
#if CONFIG_ESP32_ENABLE_COREDUMP_TO_UART && !CONFIG_ESP32_PANIC_SILENT_REBOOT
|
||||||
esp_core_dump_to_uart(frame);
|
esp_core_dump_to_uart(frame);
|
||||||
#endif
|
#endif
|
||||||
|
s_dumping_core = false;
|
||||||
reconfigureAllWdts();
|
reconfigureAllWdts();
|
||||||
|
}
|
||||||
#endif /* CONFIG_ESP32_ENABLE_COREDUMP */
|
#endif /* CONFIG_ESP32_ENABLE_COREDUMP */
|
||||||
esp_panic_wdt_stop();
|
esp_panic_wdt_stop();
|
||||||
#if CONFIG_ESP32_PANIC_PRINT_REBOOT || CONFIG_ESP32_PANIC_SILENT_REBOOT
|
#if CONFIG_ESP32_PANIC_PRINT_REBOOT || CONFIG_ESP32_PANIC_SILENT_REBOOT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user