core dump: skip core dump to flash if the stack pointer is in PSRAM

Since flash operations disable the cache, we shouldn't try to run
core dump to flash when the stack is in PSRAM.

Ref. AUD-1355
This commit is contained in:
Ivan Grokhotkov
2020-03-04 11:19:00 +01:00
committed by maojianxin
parent 1167a5c2f9
commit 1fb82085b9
2 changed files with 6 additions and 2 deletions

View File

@@ -612,7 +612,11 @@ static __attribute__((noreturn)) void commonErrorHandler(XtExcFrame *frame)
disableAllWdts();
s_dumping_core = true;
#if CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH
esp_core_dump_to_flash(frame);
if (esp_ptr_external_ram(get_sp())) {
panicPutStr("Stack in PSRAM, skipping core dump to Flash.")
} else {
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);

View File

@@ -985,7 +985,7 @@ void vTaskPrioritySet( TaskHandle_t xTask, UBaseType_t uxNewPriority ) PRIVILEGE
*
* @param uxNewPriority The priority to which the task will be set.
*/
void vTaskPrioritySetCurrent( TaskHandle_t xTask, UBaseType_t uxNewPriority )
void vTaskPrioritySetCurrent( TaskHandle_t xTask, UBaseType_t uxNewPriority );
/**
* Suspend a task.