diff --git a/components/espcoredump/src/core_dump_uart.c b/components/espcoredump/src/core_dump_uart.c index 0071ac18215..06f2513a9c1 100644 --- a/components/espcoredump/src/core_dump_uart.c +++ b/components/espcoredump/src/core_dump_uart.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -140,9 +140,13 @@ void esp_core_dump_to_uart(panic_info_t *info) //Make sure txd/rxd are enabled // use direct reg access instead of gpio_pullup_dis which can cause exception when flash cache is disabled REG_CLR_BIT(GPIO_PIN_REG_1, FUN_PU); +#if CONFIG_IDF_TARGET_ESP32P4 + gpio_hal_iomux_func_sel(PERIPHS_IO_MUX_U_PAD_GPIO38, FUNC_GPIO38_UART0_RXD_PAD); + gpio_hal_iomux_func_sel(PERIPHS_IO_MUX_U_PAD_GPIO37, FUNC_GPIO37_UART0_TXD_PAD); +#else gpio_hal_iomux_func_sel(PERIPHS_IO_MUX_U0RXD_U, FUNC_U0RXD_U0RXD); gpio_hal_iomux_func_sel(PERIPHS_IO_MUX_U0TXD_U, FUNC_U0TXD_U0TXD); - +#endif ESP_COREDUMP_LOGI("Press Enter to print core dump to UART..."); const int cpu_ticks_per_ms = esp_clk_cpu_freq() / 1000; tm_end = esp_cpu_get_cycle_count() / cpu_ticks_per_ms + CONFIG_ESP_COREDUMP_UART_DELAY; diff --git a/docs/docs_not_updated/esp32p4.txt b/docs/docs_not_updated/esp32p4.txt index 23c3a93dcae..101c3d9b372 100644 --- a/docs/docs_not_updated/esp32p4.txt +++ b/docs/docs_not_updated/esp32p4.txt @@ -1,4 +1,3 @@ -api-guides/core_dump_internals.rst api-guides/performance/speed.rst api-guides/performance/size.rst api-guides/performance/ram-usage.rst @@ -38,7 +37,6 @@ api-guides/usb-otg-console.rst api-guides/wireshark-user-guide.rst api-guides/esp-wifi-mesh.rst api-guides/SYSVIEW_FreeRTOS.txt -api-guides/core_dump.rst api-guides/dfu.rst api-guides/current-consumption-measurement-modules.rst api-guides/wifi-security.rst diff --git a/docs/en/api-guides/core_dump.rst b/docs/en/api-guides/core_dump.rst index 3deeaa2192a..d163a33f9c8 100644 --- a/docs/en/api-guides/core_dump.rst +++ b/docs/en/api-guides/core_dump.rst @@ -116,36 +116,45 @@ The :ref:`CONFIG_ESP_COREDUMP_UART_DELAY` allows for an optional delay to be add =============================================================== ==================== ESP32 CORE DUMP START ==================== - Crashed task handle: 0x3ffc5640, name: 'main', GDB name: 'process 1073501760' + Crashed task handle: 0x3ffafba0, name: 'main', GDB name: 'process 1073413024' + Crashed task is not in the interrupt context + Panic reason: abort() was called at PC 0x400d66b9 on core 0 ================== CURRENT THREAD REGISTERS =================== exccause 0x1d (StoreProhibitedCause) excvaddr 0x0 - epc1 0x40027657 + epc1 0x40084013 epc2 0x0 ... ==================== CURRENT THREAD STACK ===================== - #0 0x400251cd in panic_abort (details=0x3ffc553b "abort() was called at PC 0x40087b84 on core 0") at /home/User/esp/esp-idf/components/esp_system/panic.c:452 - #1 0x40028970 in esp_system_abort (details=0x3ffc553b "abort() was called at PC 0x40087b84 on core 0") at /home/User/esp/esp-idf/components/esp_system/port/esp_system_chip.c:93 + #0 0x4008110d in panic_abort (details=0x3ffb4f0b "abort() was called at PC 0x400d66b9 on core 0") at /builds/espressif/esp-idf/components/esp_system/panic.c:472 + #1 0x4008510c in esp_system_abort (details=0x3ffb4f0b "abort() was called at PC 0x400d66b9 on core 0") at /builds/espressif/esp-idf/components/esp_system/port/esp_system_chip.c:93 ... ======================== THREADS INFO ========================= - Id Target Id Frame - * 1 process 1073501760 0x400251cd in panic_abort (details=0x3ffc553b "abort() was called at PC 0x40087b84 on core 0") at /home/User/esp/esp-idf/components/esp_system/panic.c:452 - 2 process 1073503644 vPortTaskWrapper (pxCode=0x0, pvParameters=0x0) at /home/User/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:161 + Id Target Id Frame + * 1 process 1073413024 0x4008110d in panic_abort (details=0x3ffb4f0b "abort() was called at PC 0x400d66b9 on core 0") at /builds/espressif/esp-idf/components/esp_system/panic.c:472 + 2 process 1073413368 vPortTaskWrapper (pxCode=0x0, pvParameters=0x0) at /builds/espressif/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:133 ... - ==================== THREAD 1 (TCB: 0x3ffc5640, name: 'main') ===================== - #0 0x400251cd in panic_abort (details=0x3ffc553b "abort() was called at PC 0x40087b84 on core 0") at /home/User/esp/esp-idf/components/esp_system/panic.c:452 - #1 0x40028970 in esp_system_abort (details=0x3ffc553b "abort() was called at PC 0x40087b84 on core 0") at /home/User/esp/esp-idf/components/esp_system/port/esp_system_chip.c:93 + TCB NAME PRIO C/B STACK USED/FREE + ---------- ---------------- -------- ---------------- + 0x3ffafba0 main 1/1 368/3724 + 0x3ffafcf8 IDLE0 0/0 288/1240 + 0x3ffafe50 IDLE1 0/0 416/1108 ... - ==================== THREAD 2 (TCB: 0x3ffc5d9c, name: 'IDLE') ===================== - #0 vPortTaskWrapper (pxCode=0x0, pvParameters=0x0) at /home/User/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:161 + ==================== THREAD 1 (TCB: 0x3ffafba0, name: 'main') ===================== + #0 0x4008110d in panic_abort (details=0x3ffb4f0b "abort() was called at PC 0x400d66b9 on core 0") at /builds/espressif/esp-idf/components/esp_system/panic.c:472 + #1 0x4008510c in esp_system_abort (details=0x3ffb4f0b "abort() was called at PC 0x400d66b9 on core 0") at /builds/espressif/esp-idf/components/esp_system/port/esp_system_chip.c:93 + ... + ==================== THREAD 2 (TCB: 0x3ffafcf8, name: 'IDLE0') ===================== + #0 vPortTaskWrapper (pxCode=0x0, pvParameters=0x0) at /builds/espressif/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:133 #1 0x40000000 in ?? () ... ======================= ALL MEMORY REGIONS ======================== Name Address Size Attrs ... - .iram0.vectors 0x40024000 0x403 R XA - .dram0.data 0x3ffbf1c0 0x2c0c RW A + .iram0.vectors 0x40080000 0x403 R XA + .iram0.text 0x40080404 0xb8ab R XA + .dram0.data 0x3ffb0000 0x2114 RW A ... ===================== ESP32 CORE DUMP END ===================== =============================================================== diff --git a/docs/zh_CN/api-guides/core_dump.rst b/docs/zh_CN/api-guides/core_dump.rst index 504d160c92b..335fee835cc 100644 --- a/docs/zh_CN/api-guides/core_dump.rst +++ b/docs/zh_CN/api-guides/core_dump.rst @@ -116,36 +116,45 @@ ELF 格式具备扩展特性,支持在发生崩溃时保存更多关于错误 =============================================================== ==================== ESP32 CORE DUMP START ==================== - Crashed task handle: 0x3ffc5640, name: 'main', GDB name: 'process 1073501760' + Crashed task handle: 0x3ffafba0, name: 'main', GDB name: 'process 1073413024' + Crashed task is not in the interrupt context + Panic reason: abort() was called at PC 0x400d66b9 on core 0 ================== CURRENT THREAD REGISTERS =================== exccause 0x1d (StoreProhibitedCause) excvaddr 0x0 - epc1 0x40027657 + epc1 0x40084013 epc2 0x0 ... ==================== CURRENT THREAD STACK ===================== - #0 0x400251cd in panic_abort (details=0x3ffc553b "abort() was called at PC 0x40087b84 on core 0") at /home/User/esp/esp-idf/components/esp_system/panic.c:452 - #1 0x40028970 in esp_system_abort (details=0x3ffc553b "abort() was called at PC 0x40087b84 on core 0") at /home/User/esp/esp-idf/components/esp_system/port/esp_system_chip.c:93 + #0 0x4008110d in panic_abort (details=0x3ffb4f0b "abort() was called at PC 0x400d66b9 on core 0") at /builds/espressif/esp-idf/components/esp_system/panic.c:472 + #1 0x4008510c in esp_system_abort (details=0x3ffb4f0b "abort() was called at PC 0x400d66b9 on core 0") at /builds/espressif/esp-idf/components/esp_system/port/esp_system_chip.c:93 ... ======================== THREADS INFO ========================= - Id Target Id Frame - * 1 process 1073501760 0x400251cd in panic_abort (details=0x3ffc553b "abort() was called at PC 0x40087b84 on core 0") at /home/User/esp/esp-idf/components/esp_system/panic.c:452 - 2 process 1073503644 vPortTaskWrapper (pxCode=0x0, pvParameters=0x0) at /home/User/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:161 + Id Target Id Frame + * 1 process 1073413024 0x4008110d in panic_abort (details=0x3ffb4f0b "abort() was called at PC 0x400d66b9 on core 0") at /builds/espressif/esp-idf/components/esp_system/panic.c:472 + 2 process 1073413368 vPortTaskWrapper (pxCode=0x0, pvParameters=0x0) at /builds/espressif/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:133 ... - ==================== THREAD 1 (TCB: 0x3ffc5640, name: 'main') ===================== - #0 0x400251cd in panic_abort (details=0x3ffc553b "abort() was called at PC 0x40087b84 on core 0") at /home/User/esp/esp-idf/components/esp_system/panic.c:452 - #1 0x40028970 in esp_system_abort (details=0x3ffc553b "abort() was called at PC 0x40087b84 on core 0") at /home/User/esp/esp-idf/components/esp_system/port/esp_system_chip.c:93 + TCB NAME PRIO C/B STACK USED/FREE + ---------- ---------------- -------- ---------------- + 0x3ffafba0 main 1/1 368/3724 + 0x3ffafcf8 IDLE0 0/0 288/1240 + 0x3ffafe50 IDLE1 0/0 416/1108 ... - ==================== THREAD 2 (TCB: 0x3ffc5d9c, name: 'IDLE') ===================== - #0 vPortTaskWrapper (pxCode=0x0, pvParameters=0x0) at /home/User/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:161 + ==================== THREAD 1 (TCB: 0x3ffafba0, name: 'main') ===================== + #0 0x4008110d in panic_abort (details=0x3ffb4f0b "abort() was called at PC 0x400d66b9 on core 0") at /builds/espressif/esp-idf/components/esp_system/panic.c:472 + #1 0x4008510c in esp_system_abort (details=0x3ffb4f0b "abort() was called at PC 0x400d66b9 on core 0") at /builds/espressif/esp-idf/components/esp_system/port/esp_system_chip.c:93 + ... + ==================== THREAD 2 (TCB: 0x3ffafcf8, name: 'IDLE0') ===================== + #0 vPortTaskWrapper (pxCode=0x0, pvParameters=0x0) at /builds/espressif/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:133 #1 0x40000000 in ?? () ... ======================= ALL MEMORY REGIONS ======================== Name Address Size Attrs ... - .iram0.vectors 0x40024000 0x403 R XA - .dram0.data 0x3ffbf1c0 0x2c0c RW A + .iram0.vectors 0x40080000 0x403 R XA + .iram0.text 0x40080404 0xb8ab R XA + .dram0.data 0x3ffb0000 0x2114 RW A ... ===================== ESP32 CORE DUMP END ===================== ===============================================================