coredump: Fixes ESP-specific panic reasons handling

This commit is contained in:
Alexey Gerenkov
2021-11-23 12:39:10 +03:00
committed by Roland Dobai
parent 943d4e4f72
commit 719974ac88
4 changed files with 32 additions and 1 deletions

View File

@@ -302,6 +302,13 @@ static inline void printCacheError(void)
panicPutStr("\r\n");
}
// panicHandler() gets called for when the double exception vector,
// kernel exception vector gets used; as well as handling interrupt-based
// faults cache error, wdt expiry. EXCAUSE register gets written with
// one of PANIC_RSN_* values.
// This flag indicate condition described above. Used by coredump to handle pseuso excauses properly.
bool g_panic_pseudo_excause;
void panicHandler(XtExcFrame *frame)
{
int core_id = xPortGetCoreID();
@@ -321,6 +328,7 @@ void panicHandler(XtExcFrame *frame)
if (frame->exccause <= PANIC_RSN_MAX) {
reason = reasons[frame->exccause];
}
g_panic_pseudo_excause = true;
if (frame->exccause == PANIC_RSN_INTWDT_CPU0) {
esp_reset_reason_set_hint(ESP_RST_INT_WDT);