mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-14 06:04:19 +00:00
core dump: move stack into the internal memory when dumping to flash
Since SPI flash operations can not be performed when the stack is in external RAM, we need to switch to a different stack when doing a core dump to flash. This is achieved by a pair of longjmp's, one of which is crafted manually to jump into a designated function with a specific stack set up. The cost of this feature is a bit of IRAM, plus the DRAM required for the extra stack. Closes AUD-1355
This commit is contained in:

committed by
maojianxin

parent
a80cf2dc69
commit
de662d5e11
@@ -621,11 +621,7 @@ static __attribute__((noreturn)) void commonErrorHandler(XtExcFrame *frame)
|
||||
disableAllWdts();
|
||||
s_dumping_core = true;
|
||||
#if CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH
|
||||
if (esp_ptr_external_ram(get_sp())) {
|
||||
panicPutStr("Stack in PSRAM, skipping core dump to Flash.")
|
||||
} else {
|
||||
esp_core_dump_to_flash(frame);
|
||||
}
|
||||
esp_core_dump_to_flash(frame);
|
||||
#endif
|
||||
#if CONFIG_ESP32_ENABLE_COREDUMP_TO_UART && !CONFIG_ESP32_PANIC_SILENT_REBOOT
|
||||
esp_core_dump_to_uart(frame);
|
||||
|
Reference in New Issue
Block a user