esp32: print ELF file SHA256 in panic handler

This commit is contained in:
Ivan Grokhotkov
2019-01-24 21:05:08 +08:00
parent ea52a19c00
commit 37b55a5eb5

View File

@@ -42,6 +42,7 @@
#include "esp_app_trace.h" #include "esp_app_trace.h"
#include "esp_system_internal.h" #include "esp_system_internal.h"
#include "sdkconfig.h" #include "sdkconfig.h"
#include "esp_ota_ops.h"
#if CONFIG_SYSVIEW_ENABLE #if CONFIG_SYSVIEW_ENABLE
#include "SEGGER_RTT.h" #include "SEGGER_RTT.h"
#endif #endif
@@ -473,7 +474,7 @@ static void doBacktrace(XtExcFrame *frame)
break; break;
} }
} }
panicPutStr("\r\n\r\n"); panicPutStr("\r\n");
} }
/* /*
@@ -541,9 +542,16 @@ static void commonErrorHandler_dump(XtExcFrame *frame, int core_id)
} }
panicPutStr("\r\nELF file SHA256: ");
char sha256_buf[65];
esp_ota_get_app_elf_sha256(sha256_buf, sizeof(sha256_buf));
panicPutStr(sha256_buf);
panicPutStr("\r\n");
/* With windowed ABI backtracing is easy, let's do it. */ /* With windowed ABI backtracing is easy, let's do it. */
doBacktrace(frame); doBacktrace(frame);
panicPutStr("\r\n");
} }
/* /*