coredump: Fixes ESP-specific panic reasons handling

This commit is contained in:
Alexey Gerenkov
2020-06-08 19:32:35 +03:00
parent 2f74b4e023
commit 21091c6b0e
15 changed files with 73 additions and 51 deletions

View File

@@ -43,7 +43,7 @@
#include "hal/uart_hal.h"
#endif
#include "panic_internal.h"
#include "esp_private/panic_internal.h"
#include "port/panic_funcs.h"
#include "sdkconfig.h"
@@ -204,7 +204,7 @@ void esp_panic_handler(panic_info_t *info)
* description - a short description regarding the exception that occured
* details - more details about the exception
* state - processor state like register contents, and backtrace
* elf_info - details about the image currently running
* elf_info - details about the image currently running
*
* NULL fields in panic_info_t are not printed.
*
@@ -302,10 +302,10 @@ void esp_panic_handler(panic_info_t *info)
disable_all_wdts();
s_dumping_core = true;
#if CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH
esp_core_dump_to_flash((XtExcFrame*) info->frame);
esp_core_dump_to_flash(info);
#endif
#if CONFIG_ESP32_ENABLE_COREDUMP_TO_UART && !CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT
esp_core_dump_to_uart((XtExcFrame*) info->frame);
esp_core_dump_to_uart(info);
#endif
s_dumping_core = false;
reconfigure_all_wdts();
@@ -332,7 +332,7 @@ void esp_panic_handler(panic_info_t *info)
break; // do not touch the previously set reset reason hint
}
}
panic_print_str("Rebooting...\r\n");
panic_restart();
#else