espsystem: add support for RISC-V panic backtrace

Add .eh_frame and .eh_frame_hdr sections to the binary (can be
enabled/disabled within menuconfig). These sections are parsed
when a panic occurs. Their DWARF instructions are decoded and
executed at runtime, to retrieve the whole backtrace. This
parser has been tested on both RISC-V and x86 architectures.

This feature needs esptool's merge adjacent ELF sections feature.
This commit is contained in:
Omar Chebib
2021-01-14 12:09:40 +08:00
parent 34c16dba93
commit b967dc0dbf
17 changed files with 1560 additions and 4 deletions

View File

@@ -831,7 +831,11 @@ void bootloader_reset(void)
void bootloader_atexit(void)
{
#ifdef BOOTLOADER_BUILD
bootloader_console_deinit();
#else
abort();
#endif
}
esp_err_t bootloader_sha256_hex_to_str(char *out_str, const uint8_t *in_array_hex, size_t len)