Code: Select all
/*---------------------------------------------------------------------------*/
/* CODE */
static void reboot_to_dfu(void)
{
ESP_ERROR_CHECK(esp_register_shutdown_handler(usb_persist_shutdown_handler));
s_queue_reboot = REBOOT_BOOTLOADER_DFU;
esp_restart();
}
/*---------------------------------------------------------------------------*/
static void IRAM_ATTR usb_persist_shutdown_handler(void)
{
if (s_queue_reboot == REBOOT_BOOTLOADER)
{
// USB CDC Download
chip_usb_set_persist_flags(USBDC_PERSIST_ENA);
REG_WRITE(RTC_CNTL_OPTION1_REG, RTC_CNTL_FORCE_DOWNLOAD_BOOT);
}
else if (s_queue_reboot == REBOOT_BOOTLOADER_DFU)
{
// DFU Download
chip_usb_set_persist_flags(USBDC_BOOT_DFU);
REG_WRITE(RTC_CNTL_OPTION1_REG, RTC_CNTL_FORCE_DOWNLOAD_BOOT);
}
else
{
// USB Persist reboot
chip_usb_set_persist_flags(USBDC_PERSIST_ENA);
}
}
/* RESULTS */
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0x3 (DOWNLOAD(USB/UART0))
Saved PC:0x40375bed
0x40375bed: esp_restart_noos_dig at C:/Users/null/esp/esp-idf/components/esp_system/esp_system.c:64 (discriminator 1)
waiting for download
Guru Meditation Error: Core 0 panic'ed (LoadProhibited)
Core 0 register dump:
PC : 0x400511b1 PS : 0x00060330 A0 : 0x80049188 A1 : 0x3fceb640
A2 : 0x00000000 A3 : 0x3ff1e3fb A4 : 0x00000001 A5 : 0x00000000
A6 : 0x00000000 A7 : 0x00000088 A8 : 0x800533dc A9 : 0x3fceb620
A10 : 0xfffffffb A11 : 0x3fceeebc A12 : 0x3fceefbc A13 : 0x00000000
A14 : 0x00000000 A15 : 0x00000006 SAR : 0x0000001d EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x400570e8 LEND : 0x400570f3 LCOUNT : 0x00000000
Backtrace: 0x400511b1:0x3fceb640 0x40049185:0x3fceb670 0x400491e5:0x3fceb690 0x40043917:0x3fceb6b0 0x4004392a:0x3fceb6d0 0x40043c33:0x3fceb6f0 0x40034c45:0x3fceb710
Thanks
EDIT: Running xtensa-esp32s3-elf-addr2line.exe does not do any good. The addresses are also not found in the map file.
Code: Select all
xtensa-esp32s3-elf-addr2line.exe -pfiaC -e .\build\firmware.elf 0x400511b1:0x3fceb640 0x40049185:0x3fceb670 0x400491e5:0x3fceb690 0x40043917:0x3fceb6b0 0x4004392a:0x3fceb6d0 0x40043c33:0x3fceb6f0 0x40034c45:0x3fceb710
0x400511b1: ?? ??:0
0x40049185: ?? ??:0
0x400491e5: ?? ??:0
0x40043917: ?? ??:0
0x4004392a: ?? ??:0
0x40043c33: ?? ??:0
0x40034c45: ?? ??:0