From fb53d6e719390541bf01dca9fba9b664b3755740 Mon Sep 17 00:00:00 2001 From: Erhan Kurubas Date: Wed, 2 Jul 2025 16:00:28 +0200 Subject: [PATCH] change(coredump): drop binary format and crc checksum --- components/espcoredump/CMakeLists.txt | 9 +- components/espcoredump/Kconfig | 31 +- .../espcoredump/include/esp_core_dump.h | 28 +- .../port/riscv/esp_core_dump_summary_port.h | 4 +- .../port/xtensa/esp_core_dump_summary_port.h | 4 +- .../include_core_dump/core_dump_checksum.h | 7 +- .../include_core_dump/esp_core_dump_common.h | 4 +- .../include_core_dump/esp_core_dump_port.h | 10 +- .../include_core_dump/esp_core_dump_types.h | 27 +- components/espcoredump/linker.lf | 2 - components/espcoredump/sdkconfig.rename | 4 - components/espcoredump/src/core_dump_binary.c | 283 ------------------ components/espcoredump/src/core_dump_common.c | 2 +- components/espcoredump/src/core_dump_crc.c | 79 ----- components/espcoredump/src/core_dump_elf.c | 13 +- components/espcoredump/src/core_dump_sha.c | 4 - .../src/port/riscv/core_dump_port.c | 4 +- .../src/port/xtensa/core_dump_port.c | 4 +- components/freertos/Kconfig | 4 +- docs/en/api-guides/core_dump.rst | 25 +- docs/en/api-guides/core_dump_internals.rst | 9 +- .../release-6.x/6.0/system.rst | 7 + docs/zh_CN/api-guides/core_dump.rst | 24 +- docs/zh_CN/api-guides/core_dump_internals.rst | 11 +- tools/test_apps/system/panic/CMakeLists.txt | 8 +- .../system/panic/main/include/test_panic.h | 2 +- .../system/panic/main/test_app_main.c | 2 +- .../test_apps/system/panic/main/test_panic.c | 2 +- tools/test_apps/system/panic/pytest_panic.py | 27 +- .../panic/sdkconfig.ci.coredump_flash_bin_crc | 7 - .../sdkconfig.ci.coredump_flash_capture_dram | 2 - .../sdkconfig.ci.coredump_flash_custom_stack | 2 - .../panic/sdkconfig.ci.coredump_flash_default | 2 + .../panic/sdkconfig.ci.coredump_flash_elf_sha | 4 - .../sdkconfig.ci.coredump_flash_encrypted | 2 - ...ci.coredump_flash_encrypted_coredump_plain | 2 - ...g.ci.coredump_flash_extram_stack_bss_esp32 | 2 - ...ci.coredump_flash_extram_stack_bss_esp32s2 | 2 - ...ci.coredump_flash_extram_stack_bss_esp32s3 | 2 - ....ci.coredump_flash_extram_stack_heap_esp32 | 2 - ...i.coredump_flash_extram_stack_heap_esp32s2 | 2 - ...i.coredump_flash_extram_stack_heap_esp32s3 | 2 - ...a => sdkconfig.ci.coredump_flash_soft_sha} | 2 - .../panic/sdkconfig.ci.coredump_uart_bin_crc | 3 - .../sdkconfig.ci.coredump_uart_capture_dram | 2 - .../panic/sdkconfig.ci.coredump_uart_elf_crc | 2 - .../panic/sdkconfig.ci.gdbstub_coredump | 2 - 47 files changed, 75 insertions(+), 609 deletions(-) delete mode 100644 components/espcoredump/src/core_dump_binary.c delete mode 100644 components/espcoredump/src/core_dump_crc.c delete mode 100644 tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_bin_crc create mode 100644 tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_default delete mode 100644 tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_elf_sha rename tools/test_apps/system/panic/{sdkconfig.ci.coredump_flash_elf_soft_sha => sdkconfig.ci.coredump_flash_soft_sha} (56%) delete mode 100644 tools/test_apps/system/panic/sdkconfig.ci.coredump_uart_bin_crc diff --git a/components/espcoredump/CMakeLists.txt b/components/espcoredump/CMakeLists.txt index cc4cd78977..892ed2ca17 100644 --- a/components/espcoredump/CMakeLists.txt +++ b/components/espcoredump/CMakeLists.txt @@ -9,9 +9,7 @@ set(srcs "src/core_dump_init.c" "src/core_dump_flash.c" "src/core_dump_uart.c" "src/core_dump_elf.c" - "src/core_dump_binary.c" - "src/core_dump_sha.c" - "src/core_dump_crc.c") + "src/core_dump_sha.c") set(includes "include") set(priv_includes "include_core_dump") @@ -38,7 +36,4 @@ idf_component_register(SRCS ${srcs} # make sure 'core_dump_init' object file is considered by the linker target_link_libraries(${COMPONENT_LIB} INTERFACE "-u esp_system_include_coredump_init") - -if(CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF) - target_link_libraries(${COMPONENT_LIB} PRIVATE idf::esp_app_format) -endif() +target_link_libraries(${COMPONENT_LIB} PRIVATE idf::esp_app_format) diff --git a/components/espcoredump/Kconfig b/components/espcoredump/Kconfig index 90b806d96a..04a64a1c18 100644 --- a/components/espcoredump/Kconfig +++ b/components/espcoredump/Kconfig @@ -22,35 +22,10 @@ menu "Core dump" bool "None" endchoice - choice ESP_COREDUMP_DATA_FORMAT - prompt "Core dump data format" - default ESP_COREDUMP_DATA_FORMAT_ELF - depends on !ESP_COREDUMP_ENABLE_TO_NONE - help - Select the data format for core dump. - config ESP_COREDUMP_DATA_FORMAT_BIN - bool "Binary format" - config ESP_COREDUMP_DATA_FORMAT_ELF - bool "ELF format" - endchoice - - choice ESP_COREDUMP_CHECKSUM - prompt "Core dump data integrity check" - default ESP_COREDUMP_CHECKSUM_CRC32 - depends on !ESP_COREDUMP_ENABLE_TO_NONE - help - Select the integrity check for the core dump. - config ESP_COREDUMP_CHECKSUM_CRC32 - bool "Use CRC32 for integrity verification" - config ESP_COREDUMP_CHECKSUM_SHA256 - bool "Use SHA256 for integrity verification" - depends on ESP_COREDUMP_DATA_FORMAT_ELF - endchoice - config ESP_COREDUMP_CAPTURE_DRAM bool "Include whole .bss and .data sections and heap data into core dump file" default n - depends on ESP_COREDUMP_DATA_FORMAT_ELF + depends on ESP_COREDUMP_ENABLE help Storing these sections can help with easier debugging and troubleshooting. However, additional storage space will be required in the core dump partition. @@ -69,6 +44,8 @@ menu "Core dump" config ESP_COREDUMP_ENABLE bool default F + select ESP_COREDUMP_DATA_FORMAT_ELF + select ESP_COREDUMP_CHECKSUM_SHA256 help Enables/disable core dump module. @@ -129,7 +106,7 @@ menu "Core dump" config ESP_COREDUMP_SUMMARY_STACKDUMP_SIZE int "Size of the stack dump buffer" - depends on ESP_COREDUMP_DATA_FORMAT_ELF && ESP_COREDUMP_ENABLE_TO_FLASH && IDF_TARGET_ARCH_RISCV + depends on ESP_COREDUMP_ENABLE_TO_FLASH && IDF_TARGET_ARCH_RISCV range 512 4096 default 1024 help diff --git a/components/espcoredump/include/esp_core_dump.h b/components/espcoredump/include/esp_core_dump.h index 8f8a31271e..4c741d282f 100644 --- a/components/espcoredump/include/esp_core_dump.h +++ b/components/espcoredump/include/esp_core_dump.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -18,7 +18,7 @@ extern "C" { #define APP_ELF_SHA256_SZ (CONFIG_APP_RETRIEVE_LEN_ELF_SHA + 1) -#if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH && CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF +#if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH /** * @brief Core dump summary, Most meaningful contents of the core dump @@ -34,7 +34,7 @@ typedef struct { esp_core_dump_summary_extra_info_t ex_info; /*!< Architecture specific extra data */ } esp_core_dump_summary_t; -#endif /* CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH && CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF */ +#endif /* CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH */ /**************************************************************************************/ /******************************** EXCEPTION MODE API **********************************/ @@ -52,27 +52,17 @@ void esp_core_dump_init(void); /**************************************************************************************/ /** - * Core dump file consists of header and data (in binary or ELF format) for every task in the system at the moment of crash. + * Core dump file consists of header and data (in ELF format) for every task in the system at the moment of crash. * For the data integrity, a checksum is used at the end of core the dump data. * The structure of core dump file is described below in details. * 1) Core dump starts with header: * 1.1) TOTAL_LEN is total length of core dump data in flash including the checksum. Size is 4 bytes. * 1.2) VERSION field keeps 4 byte version of core dump. - * 1.2) TASKS_NUM is the number of tasks for which data are stored. Size is 4 bytes. Unused in ELF format - * 1.3) TCB_SIZE is the size of task's TCB structure. Size is 4 bytes. Unused in ELF format - * 1.4) MEM_SEG_NUM is the number of memory segment. Size is 4 bytes. Unused in ELF format - * 1.5) CHIP_REV is the revision of the chip. Size is 4 bytes. - * 2) Core dump header is followed by the data for every task in the system. Data part is differs for the binary - * and elf formats. + * 1.3) CHIP_REV is the revision of the chip. Size is 4 bytes. + * 2) Core dump header is followed by the data for every task in the system. * 2.1) The core dump file uses a subset of the ELF structures to store the crash information. * Loadable ELF segments and ELF notes (ELF.PT_NOTE) used with a special name and type (CORE, NT_PRSTATUS type) - * 2.2) In Binary format task data are started with the task header: - * 2.2.1) TCB_ADDR is the address of TCB in memory. Size is 4 bytes. - * 2.2.2) STACK_TOP is the top of task's stack (address of the topmost stack item). Size is 4 bytes. - * 2.2.3) STACK_END is the end of task's stack (address from which task's stack starts). Size is 4 bytes. - * 2.2.4) Task header is followed by TCB data. Size is TCB_SIZE bytes. - * 2.2.5) Task's stack is placed after TCB data. Size is (STACK_END - STACK_TOP) bytes. - * 2.3) The checksum is placed at the end of the data. + * 2.2) The checksum is placed at the end of the data. * 3) The structure of the uart data is the same as the data stored in flash * 3.1) Uart data is printed in base64 format surrounded with special messages to help user recognize the start and * end of actual data. @@ -123,7 +113,7 @@ esp_err_t esp_core_dump_image_get(size_t* out_addr, size_t *out_size); */ esp_err_t esp_core_dump_image_erase(void); -#if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH && CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF +#if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH /** * @brief Get panic reason from the core dump. @@ -171,7 +161,7 @@ esp_err_t esp_core_dump_get_panic_reason(char *reason_buffer, size_t buffer_size */ esp_err_t esp_core_dump_get_summary(esp_core_dump_summary_t *summary); -#endif /* CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH && CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF */ +#endif /* CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH */ #ifdef __cplusplus } diff --git a/components/espcoredump/include/port/riscv/esp_core_dump_summary_port.h b/components/espcoredump/include/port/riscv/esp_core_dump_summary_port.h index 8c9295a724..de935f1ef4 100644 --- a/components/espcoredump/include/port/riscv/esp_core_dump_summary_port.h +++ b/components/espcoredump/include/port/riscv/esp_core_dump_summary_port.h @@ -12,7 +12,7 @@ extern "C" { #endif -#if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH && CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF +#if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH /** * @brief Backtrace information @@ -40,7 +40,7 @@ typedef struct { uint32_t exc_a[8]; /* A0-A7 registers when the exception caused */ } esp_core_dump_summary_extra_info_t; -#endif /* CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH && CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF */ +#endif /* CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH */ #ifdef __cplusplus } diff --git a/components/espcoredump/include/port/xtensa/esp_core_dump_summary_port.h b/components/espcoredump/include/port/xtensa/esp_core_dump_summary_port.h index 350570a7c9..0bc67650bc 100644 --- a/components/espcoredump/include/port/xtensa/esp_core_dump_summary_port.h +++ b/components/espcoredump/include/port/xtensa/esp_core_dump_summary_port.h @@ -13,7 +13,7 @@ extern "C" { #endif -#if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH && CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF +#if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH #define EPCx_REGISTER_COUNT XCHAL_NUM_INTLEVELS @@ -39,7 +39,7 @@ typedef struct { uint8_t epcx_reg_bits; /*!< Bit mask of available EPCx registers */ } esp_core_dump_summary_extra_info_t; -#endif /* CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH && CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF */ +#endif /* CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH */ #ifdef __cplusplus } diff --git a/components/espcoredump/include_core_dump/core_dump_checksum.h b/components/espcoredump/include_core_dump/core_dump_checksum.h index 34c63c791b..0c42afc89d 100644 --- a/components/espcoredump/include_core_dump/core_dump_checksum.h +++ b/components/espcoredump/include_core_dump/core_dump_checksum.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -10,8 +10,7 @@ * * This file contains all the functions required by the core dump component to * calculate checksums for data to write (or already written) on the flash. - * Currently, both CRC32 and SHA256 are supported, but this interface is - * implementation independent. + * Currently, only SHA256 is supported. */ #ifndef CORE_DUMP_CHECKSUM_H_ @@ -25,7 +24,7 @@ extern "C" { /** * @brief Maximum possible length for a checksum (regardless of the - * implentation). This can be modified in the future if a new implementation + * implementation). This can be modified in the future if a new implementation * requires a larger size. */ #define COREDUMP_CHECKSUM_MAX_LEN 32 diff --git a/components/espcoredump/include_core_dump/esp_core_dump_common.h b/components/espcoredump/include_core_dump/esp_core_dump_common.h index 1292e97246..9019b03bfa 100644 --- a/components/espcoredump/include_core_dump/esp_core_dump_common.h +++ b/components/espcoredump/include_core_dump/esp_core_dump_common.h @@ -137,9 +137,9 @@ esp_err_t esp_core_dump_write_data(core_dump_write_data_t *wr_data, void *data, esp_err_t esp_core_dump_write_end(core_dump_write_data_t *wr_data); /** - * @brief Stores the core dump in either binary or ELF format. + * @brief Stores the core dump in ELF format. */ -esp_err_t esp_core_dump_store(void); +esp_err_t esp_core_dump_write_elf(void); /** * @brief Get TCB length, in bytes. diff --git a/components/espcoredump/include_core_dump/esp_core_dump_port.h b/components/espcoredump/include_core_dump/esp_core_dump_port.h index 39658b29dd..013626d643 100644 --- a/components/espcoredump/include_core_dump/esp_core_dump_port.h +++ b/components/espcoredump/include_core_dump/esp_core_dump_port.h @@ -106,10 +106,10 @@ uint32_t esp_core_dump_get_stack(core_dump_task_header_t* task_snapshot, * @note The goal of this function is to check whether the task passed is the * task that crashed or not. If this is the case and if it didn't crash * within an ISR, its stack pointer will be set to the panic frame, - * containing all the registers values when the error occured. This + * containing all the registers values when the error occurred. This * function also checks if the TCB address is sane or not. * - * @param task Pointer to the frame exception generated when the panic occured. + * @param task Pointer to the frame exception generated when the panic occurred. * * @return True if the TCB is sane, false else. */ @@ -120,7 +120,7 @@ bool esp_core_dump_check_task(core_dump_task_header_t *task); * * @note In practice, this function is used to fill the ELF file with the * PR_STATUS sections for all the existing tasks. This structure - * contains the CPU registers value when the exception occured. + * contains the CPU registers value when the exception occurred. * * @param task Task to dump the registers from. * @param reg_dump Pointer that will be filled with the registers dump. @@ -152,7 +152,7 @@ void esp_core_dump_port_set_crashed_tcb(uint32_t handle); */ uint32_t esp_core_dump_get_extra_info(void **info); -#if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH && CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF +#if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH /** * @brief Parse extra information into summary @@ -180,7 +180,7 @@ void esp_core_dump_summary_parse_exc_regs(esp_core_dump_summary_t *summary, void */ void esp_core_dump_summary_parse_backtrace_info(esp_core_dump_bt_info_t *bt_info, const void *vaddr, const void *paddr, uint32_t stack_size); -#endif /* CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH && CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF */ +#endif /* CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH */ #ifdef __cplusplus } diff --git a/components/espcoredump/include_core_dump/esp_core_dump_types.h b/components/espcoredump/include_core_dump/esp_core_dump_types.h index 79a92d59e4..13b5c49bbd 100644 --- a/components/espcoredump/include_core_dump/esp_core_dump_types.h +++ b/components/espcoredump/include_core_dump/esp_core_dump_types.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -66,14 +66,9 @@ extern "C" { (((_maj_)&0xFF) << 8) | \ (((_min_)&0xFF) << 0) \ ) -#define COREDUMP_VERSION_BIN 0 #define COREDUMP_VERSION_ELF 1 -/* legacy bin coredumps (before IDF v4.1) has version set to 1 */ -#define COREDUMP_VERSION_BIN_LEGACY COREDUMP_VERSION_MAKE(COREDUMP_VERSION_BIN, 1) // -> 0x0001 -#define COREDUMP_VERSION_BIN_CURRENT COREDUMP_VERSION_MAKE(COREDUMP_VERSION_BIN, 3) // -> 0x0003 -#define COREDUMP_VERSION_ELF_CRC32 COREDUMP_VERSION_MAKE(COREDUMP_VERSION_ELF, 2) // -> 0x0102 -#define COREDUMP_VERSION_ELF_SHA256 COREDUMP_VERSION_MAKE(COREDUMP_VERSION_ELF, 3) // -> 0x0103 +#define COREDUMP_VERSION_ELF_SHA256 COREDUMP_VERSION_MAKE(COREDUMP_VERSION_ELF, 4) // -> 0x0104 #define COREDUMP_CURR_TASK_MARKER 0xDEADBEEF #define COREDUMP_CURR_TASK_NOT_FOUND -1 @@ -93,17 +88,6 @@ extern "C" { typedef uint32_t core_dump_crc_t; -#if CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 - -typedef struct { - core_dump_crc_t crc; - uint32_t total_bytes_checksum; /* Number of bytes used to calculate the checksum */ -} core_dump_crc_ctx_t; - -typedef core_dump_crc_ctx_t checksum_ctx_t; - -#else - #if CONFIG_IDF_TARGET_ESP32 #include "mbedtls/sha256.h" /* mbedtls_sha256_context */ typedef mbedtls_sha256_context sha256_ctx_t; @@ -122,8 +106,6 @@ typedef struct { typedef core_dump_sha_ctx_t checksum_ctx_t; -#endif - /** * @brief Chip ID associated to this implementation. */ @@ -138,13 +120,10 @@ typedef struct _core_dump_write_data_t { /** * @brief Core dump data header - * This header predecesses the actual core dump data (ELF or binary). */ + * This header predecesses the actual core dump data (ELF). */ typedef struct _core_dump_header_t { uint32_t data_len; /*!< Data length */ uint32_t version; /*!< Core dump version */ - uint32_t tasks_num; /*!< Number of tasks */ - uint32_t tcb_sz; /*!< Size of a TCB, in bytes */ - uint32_t mem_segs_num; /*!< Number of memory segments */ uint32_t chip_rev; /*!< Chip revision */ } core_dump_header_t; diff --git a/components/espcoredump/linker.lf b/components/espcoredump/linker.lf index 0a5ef1f8bf..6cb460aa43 100644 --- a/components/espcoredump/linker.lf +++ b/components/espcoredump/linker.lf @@ -42,8 +42,6 @@ entries: core_dump_common (noflash) core_dump_port (noflash) core_dump_elf (noflash) - core_dump_binary (noflash) - core_dump_crc (noflash) # ESP32 uses mbedtls for the sha and mbedtls is in the flash if IDF_TARGET_ESP32 = n: core_dump_sha (noflash) diff --git a/components/espcoredump/sdkconfig.rename b/components/espcoredump/sdkconfig.rename index 5b73e863b6..250760ea7f 100644 --- a/components/espcoredump/sdkconfig.rename +++ b/components/espcoredump/sdkconfig.rename @@ -3,10 +3,6 @@ CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH CONFIG_ESP32_ENABLE_COREDUMP_TO_UART CONFIG_ESP_COREDUMP_ENABLE_TO_UART CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE CONFIG_ESP_COREDUMP_ENABLE_TO_NONE -CONFIG_ESP32_COREDUMP_DATA_FORMAT_BIN CONFIG_ESP_COREDUMP_DATA_FORMAT_BIN -CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF -CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32 CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 -CONFIG_ESP32_COREDUMP_CHECKSUM_SHA256 CONFIG_ESP_COREDUMP_CHECKSUM_SHA256 CONFIG_ESP32_ENABLE_COREDUMP CONFIG_ESP_COREDUMP_ENABLE CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM CONFIG_ESP_COREDUMP_MAX_TASKS_NUM CONFIG_ESP32_CORE_DUMP_UART_DELAY CONFIG_ESP_COREDUMP_UART_DELAY diff --git a/components/espcoredump/src/core_dump_binary.c b/components/espcoredump/src/core_dump_binary.c deleted file mode 100644 index 68c3a8ae07..0000000000 --- a/components/espcoredump/src/core_dump_binary.c +++ /dev/null @@ -1,283 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Apache-2.0 - */ -#include -#include -#include -#include "sdkconfig.h" -#include "esp_core_dump_port.h" -#include "esp_core_dump_common.h" -#include "hal/efuse_hal.h" - -#if CONFIG_ESP_COREDUMP_DATA_FORMAT_BIN - -const static char TAG[] __attribute__((unused)) = "esp_core_dump_binary"; - -esp_err_t esp_core_dump_store(void) __attribute__((alias("esp_core_dump_write_binary"))); - -static esp_err_t esp_core_dump_save_task(core_dump_write_data_t *write_data, core_dump_task_header_t *task) -{ - esp_err_t err = ESP_FAIL; - uint32_t stk_vaddr = 0; - uint32_t stk_paddr = 0; - uint32_t stk_len = esp_core_dump_get_stack(task, &stk_vaddr, &stk_paddr); - - stk_len = esp_core_dump_get_memory_len(stk_vaddr, stk_vaddr + stk_len); - - // Save memory segment header - err = esp_core_dump_write_data(write_data, task, sizeof(core_dump_task_header_t)); - if (err != ESP_OK) { - ESP_COREDUMP_LOGE("Failed to write task header, error=%d!", err); - return err; - } - // Save TCB block - err = esp_core_dump_write_data(write_data, task->tcb_addr, esp_core_dump_get_tcb_len()); - if (err != ESP_OK) { - ESP_COREDUMP_LOGE("Failed to write TCB, error=%d!", err); - return err; - } - // Save task stack - err = esp_core_dump_write_data(write_data, (void *)stk_paddr, stk_len); - if (err != ESP_OK) { - ESP_COREDUMP_LOGE("Failed to write stack for task (TCB:%p), stack_start=%" PRIx32 ", error=%d!", - task->tcb_addr, - stk_vaddr, - err); - return err; - } - - ESP_COREDUMP_LOG_PROCESS("Task (TCB:%p) dump is saved.", task->tcb_addr); - - return ESP_OK; -} - -static esp_err_t esp_core_dump_save_mem_segment(core_dump_write_data_t* write_data, - core_dump_mem_seg_header_t* seg) -{ - esp_err_t err = ESP_FAIL; - - if (!esp_core_dump_mem_seg_is_sane(seg->start, seg->size)) { - ESP_COREDUMP_LOGE("Failed to write memory segment, (%" PRIx32 ", %" PRIu32 ")!", - seg->start, seg->size); - return ESP_FAIL; - } - // Save TCB address, stack base and stack top addrq - err = esp_core_dump_write_data(write_data, seg, sizeof(core_dump_mem_seg_header_t)); - if (err != ESP_OK) { - ESP_COREDUMP_LOGE("Failed to write memory segment header, error=%d!", err); - return err; - } - // Save memory contents - err = esp_core_dump_write_data(write_data, (void *)seg->start, seg->size); - if (err != ESP_OK) { - ESP_COREDUMP_LOGE("Failed to write memory segment, (%" PRIx32 ", %" PRIu32 "), error=%d!", - seg->start, seg->size, err); - return err; - } - ESP_COREDUMP_LOG_PROCESS("Memory segment (%" PRIx32 ", %" PRIu32 ") is saved.", - seg->start, seg->size); - return ESP_OK; -} - -static esp_err_t esp_core_dump_write_binary(void) -{ - uint32_t tcb_sz = esp_core_dump_get_tcb_len(); - uint32_t data_len = 0; - uint32_t bad_tasks_num = 0; - core_dump_write_data_t write_data = { 0 }; - core_dump_header_t hdr = { 0 }; - core_dump_task_header_t task_hdr = { 0 }; - core_dump_mem_seg_header_t mem_seg = { 0 }; - TaskIterator_t task_iter; - void *cur_task = NULL; - - esp_err_t err = esp_core_dump_write_init(); - if (err != ESP_OK) { - ESP_COREDUMP_LOGE("Binary write init failed!"); - return ESP_FAIL; - } - - // Verifies all tasks in the snapshot - esp_core_dump_reset_tasks_snapshots_iter(); - esp_core_dump_task_iterator_init(&task_iter); - while (esp_core_dump_task_iterator_next(&task_iter) != -1) { - if (!esp_core_dump_get_task_snapshot(task_iter.pxTaskHandle, &task_hdr, &mem_seg)) { - bad_tasks_num++; - continue; - } - hdr.tasks_num++; - if (task_iter.pxTaskHandle == esp_core_dump_get_current_task_handle()) { - cur_task = task_iter.pxTaskHandle; - ESP_COREDUMP_LOG_PROCESS("Task %p %p is first crashed task.", cur_task, task_hdr.tcb_addr); - } - ESP_COREDUMP_LOG_PROCESS("Stack len = %" PRIu32 " (%" PRIx32 " %" PRIx32 ")", task_hdr.stack_end - task_hdr.stack_start, - task_hdr.stack_start, task_hdr.stack_end); - // Increase core dump size by task stack size - uint32_t stk_vaddr = 0; - uint32_t stk_paddr = 0; - uint32_t stk_len = esp_core_dump_get_stack(&task_hdr, &stk_vaddr, &stk_paddr); - data_len += esp_core_dump_get_memory_len(stk_vaddr, stk_vaddr + stk_len); - // Add tcb size - data_len += (tcb_sz + sizeof(core_dump_task_header_t)); - if (mem_seg.size > 0) { - ESP_COREDUMP_LOG_PROCESS("Add interrupted task stack %" PRIu32 " bytes @ %" PRIx32, - mem_seg.size, mem_seg.start); - data_len += esp_core_dump_get_memory_len(mem_seg.start, mem_seg.start + mem_seg.size); - data_len += sizeof(core_dump_mem_seg_header_t); - hdr.mem_segs_num++; - } - } - ESP_COREDUMP_LOGI("Found tasks: good %" PRIu32 ", bad %" PRIu32 ", mem segs %" PRIu32, hdr.tasks_num, bad_tasks_num, hdr.mem_segs_num); - - // Check if current task TCB is broken - if (cur_task == NULL) { - ESP_COREDUMP_LOG_PROCESS("The current crashed task is broken."); - esp_core_dump_task_iterator_init(&task_iter); - while (esp_core_dump_task_iterator_next(&task_iter) != -1) { - if (task_iter.pxTaskHandle != NULL) { - cur_task = task_iter.pxTaskHandle; - break; - } - } - if (cur_task == NULL) { - ESP_COREDUMP_LOGE("No valid tasks in the system!"); - return ESP_FAIL; - } - } - - // Add user memory regions data size - for (coredump_region_t i = COREDUMP_MEMORY_START; i < COREDUMP_MEMORY_MAX; i++) { - uint32_t start = 0; - int data_sz = esp_core_dump_get_user_ram_info(i, &start); - if (data_sz < 0) { - ESP_COREDUMP_LOGE("Invalid memory segment size!"); - return ESP_FAIL; - } - if (data_sz > 0) { - hdr.mem_segs_num++; - data_len += sizeof(core_dump_mem_seg_header_t) + esp_core_dump_get_memory_len(start, start + data_sz); - } - } - - // Add core dump header size - data_len += sizeof(core_dump_header_t); - - ESP_COREDUMP_LOG_PROCESS("Core dump length=%" PRIu32 ", tasks processed: %" PRIu32 ", broken tasks: %" PRIu32, - data_len, hdr.tasks_num, bad_tasks_num); - // Prepare write - err = esp_core_dump_write_prepare(&write_data, &data_len); - if (err != ESP_OK) { - ESP_COREDUMP_LOGE("Failed to prepare core dump, error=%d!", err); - return err; - } - - // Write start - err = esp_core_dump_write_start(&write_data); - if (err != ESP_OK) { - ESP_COREDUMP_LOGE("Failed to start core dump, error=%d!", err); - return err; - } - - // Write header - hdr.data_len = data_len; - hdr.version = COREDUMP_VERSION_BIN_CURRENT; - hdr.tcb_sz = tcb_sz; - hdr.chip_rev = efuse_hal_chip_revision(); - err = esp_core_dump_write_data(&write_data, &hdr, sizeof(core_dump_header_t)); - if (err != ESP_OK) { - ESP_COREDUMP_LOGE("Failed to write core dump header error=%d!", err); - return err; - } - - // Save tasks - esp_core_dump_reset_tasks_snapshots_iter(); - // Write first crashed task data first (not always first task in the snapshot) - ESP_COREDUMP_LOGD("Save first crashed task %p", cur_task); - if (esp_core_dump_get_task_snapshot(cur_task, &task_hdr, NULL)) { - err = esp_core_dump_save_task(&write_data, &task_hdr); - if (err != ESP_OK) { - ESP_COREDUMP_LOGE("Failed to save first crashed task %p, error=%d!", - task_hdr.tcb_addr, err); - return err; - } - } - // Write all other tasks in the snapshot - esp_core_dump_task_iterator_init(&task_iter); - while (esp_core_dump_task_iterator_next(&task_iter) != -1) { - if (!esp_core_dump_get_task_snapshot(task_iter.pxTaskHandle, &task_hdr, NULL)) { - continue; - } - // Skip first crashed task - if (task_iter.pxTaskHandle == cur_task) { - continue; - } - ESP_COREDUMP_LOGD("Save task %p (TCB:%p, stack:%" PRIx32 "..%" PRIx32 ")", - task_iter.pxTaskHandle, task_hdr.tcb_addr, task_hdr.stack_start, task_hdr.stack_end); - err = esp_core_dump_save_task(&write_data, &task_hdr); - if (err != ESP_OK) { - ESP_COREDUMP_LOGE("Failed to save core dump task %p, error=%d!", - task_hdr.tcb_addr, err); - return err; - } - } - - // Save interrupted stacks of the tasks - // Actually there can be tasks interrupted at the same time, one on every core including the crashed one. - esp_core_dump_reset_tasks_snapshots_iter(); - esp_core_dump_task_iterator_init(&task_iter); - while (esp_core_dump_task_iterator_next(&task_iter) != -1) { - if (!esp_core_dump_get_task_snapshot(task_iter.pxTaskHandle, &task_hdr, &mem_seg)) { - continue; - } - if (mem_seg.size > 0) { - ESP_COREDUMP_LOG_PROCESS("Save interrupted task stack %" PRIu32 " bytes @ %" PRIx32, - mem_seg.size, mem_seg.start); - err = esp_core_dump_save_mem_segment(&write_data, &mem_seg); - if (err != ESP_OK) { - ESP_COREDUMP_LOGE("Failed to save interrupted task stack, error=%d!", err); - return err; - } - } - } - - // save user memory regions - if (esp_core_dump_get_user_ram_segments() > 0) { - for (coredump_region_t i = COREDUMP_MEMORY_START; i < COREDUMP_MEMORY_MAX; i++) { - uint32_t start = 0; - int data_sz = esp_core_dump_get_user_ram_info(i, &start); - - if (data_sz < 0) { - ESP_COREDUMP_LOGE("Invalid memory segment size"); - return ESP_FAIL; - } - - if (data_sz > 0) { - mem_seg.start = start; - mem_seg.size = esp_core_dump_get_memory_len(start, start + data_sz);; - ESP_COREDUMP_LOG_PROCESS("Save user memory region %" PRIu32 " bytes @ %" PRIx32, - mem_seg.size, mem_seg.start); - err = esp_core_dump_save_mem_segment(&write_data, &mem_seg); - if (err != ESP_OK) { - ESP_COREDUMP_LOGE("Failed to save user memory region, error=%d!", err); - return err; - } - } - } - } - - // Write end - err = esp_core_dump_write_end(&write_data); - if (err != ESP_OK) { - ESP_COREDUMP_LOGE("Failed to end core dump error=%d!", err); - return err; - } - - if (bad_tasks_num) { - ESP_COREDUMP_LOGE("Found %" PRIu32 " broken tasks!", bad_tasks_num); - } - return err; -} - -#endif diff --git a/components/espcoredump/src/core_dump_common.c b/components/espcoredump/src/core_dump_common.c index 7442d85688..13fc8a78d5 100644 --- a/components/espcoredump/src/core_dump_common.c +++ b/components/espcoredump/src/core_dump_common.c @@ -192,7 +192,7 @@ inline static void esp_core_dump_write_internal(panic_info_t *info) esp_core_dump_setup_stack(); esp_core_dump_port_init(info, isr_context); - esp_err_t err = esp_core_dump_store(); + esp_err_t err = esp_core_dump_write_elf(); if (err != ESP_OK) { ESP_COREDUMP_LOGE("Core dump write failed with error=%d", err); } diff --git a/components/espcoredump/src/core_dump_crc.c b/components/espcoredump/src/core_dump_crc.c deleted file mode 100644 index 02065f4e2a..0000000000 --- a/components/espcoredump/src/core_dump_crc.c +++ /dev/null @@ -1,79 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#include "sdkconfig.h" - -#if CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 - -#include "esp_rom_crc.h" -#include "esp_core_dump_types.h" - -const static char TAG[] __attribute__((unused)) = "esp_core_dump_crc"; - -void esp_core_dump_checksum_init(core_dump_checksum_ctx cks_ctx) __attribute__((alias("core_dump_crc_init"))); -void esp_core_dump_checksum_update(core_dump_checksum_ctx cks_ctx, void* data, size_t data_len) __attribute__((alias("core_dump_crc_update"))); -uint32_t esp_core_dump_checksum_finish(core_dump_checksum_ctx cks_ctx, core_dump_checksum_bytes* chs_ptr) __attribute__((alias("core_dump_crc_finish"))); -void esp_core_dump_print_checksum(const char* msg, core_dump_checksum_bytes checksum) __attribute__((alias("core_dump_crc_print"))); -uint32_t esp_core_dump_checksum_size(void) __attribute__((alias("core_dump_crc_size"))); -uint32_t esp_core_dump_elf_version(void) __attribute__((alias("core_dump_crc_version"))); - -static void core_dump_crc_print(const char *msg, const uint8_t *checksum) -{ - ESP_COREDUMP_DEBUG_ASSERT(checksum != NULL); - - if (msg != NULL) { - ESP_COREDUMP_PRINT("%s=", msg); - } - ESP_COREDUMP_PRINT("'%08" PRIx32 "'\r\n", *((const uint32_t*)checksum)); -} - -static uint32_t core_dump_crc_size(void) -{ - return sizeof(core_dump_crc_t); -} - -static uint32_t core_dump_crc_version(void) -{ - return COREDUMP_VERSION_ELF_CRC32; -} - -static void core_dump_crc_init(core_dump_checksum_ctx cks_ctx) -{ - if (cks_ctx) { - core_dump_crc_ctx_t *crc_ctx = cks_ctx; - crc_ctx->crc = 0; - crc_ctx->total_bytes_checksum = 0; - } -} - -static void core_dump_crc_update(core_dump_checksum_ctx cks_ctx, void* data, size_t data_len) -{ - if (data) { - core_dump_crc_ctx_t *crc_ctx = cks_ctx; - crc_ctx->crc = esp_rom_crc32_le(crc_ctx->crc, data, data_len); - // keep counter of cashed bytes - crc_ctx->total_bytes_checksum += data_len; - } else { - ESP_COREDUMP_LOGE("Empty data to add to checksum calculation!"); - } -} - -static uint32_t core_dump_crc_finish(core_dump_checksum_ctx cks_ctx, core_dump_checksum_bytes* chs_ptr) -{ - if (cks_ctx) { - core_dump_crc_ctx_t *crc_ctx = cks_ctx; - - if (chs_ptr) { - *chs_ptr = (core_dump_checksum_bytes)&crc_ctx->crc; - } - - ESP_COREDUMP_LOG_PROCESS("Total length of hashed data: %" PRIu32, crc_ctx->total_bytes_checksum); - } - - return core_dump_crc_size(); -} - -#endif /* CONFIG_ESP_COREDUMP_CHECKSUM_CRC32 */ diff --git a/components/espcoredump/src/core_dump_elf.c b/components/espcoredump/src/core_dump_elf.c index 4a4ccdb955..06e4a4cfac 100644 --- a/components/espcoredump/src/core_dump_elf.c +++ b/components/espcoredump/src/core_dump_elf.c @@ -15,11 +15,9 @@ #include "hal/efuse_hal.h" #include "esp_task_wdt.h" -#ifdef CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF #include // for the MIN macro #include "esp_app_desc.h" #include "esp_memory_utils.h" -#endif #define ELF_CLASS ELFCLASS32 @@ -91,15 +89,11 @@ typedef struct { // Represents lightweight implementation to save core dump data into ELF formatted binary -#if CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF - #ifdef ALIGN_UP #undef ALIGN_UP #endif #define ALIGN_UP(x, a) (((x) + (a) - 1) & ~((a) - 1)) -esp_err_t esp_core_dump_store(void) __attribute__((alias("esp_core_dump_write_elf"))); - // Builds elf header and check all data offsets static int elf_write_file_header(core_dump_elf_t *self, uint32_t seg_count) { @@ -761,7 +755,7 @@ static int esp_core_dump_do_write_elf_pass(core_dump_elf_t *self) return tot_len; } -static esp_err_t esp_core_dump_write_elf(void) +esp_err_t esp_core_dump_write_elf(void) { core_dump_elf_t self = { 0 }; core_dump_header_t dump_hdr = { 0 }; @@ -802,9 +796,6 @@ static esp_err_t esp_core_dump_write_elf(void) // Write core dump header dump_hdr.data_len = tot_len; dump_hdr.version = esp_core_dump_elf_version(); - dump_hdr.tasks_num = 0; // unused in ELF format - dump_hdr.tcb_sz = 0; // unused in ELF format - dump_hdr.mem_segs_num = 0; // unused in ELF format dump_hdr.chip_rev = efuse_hal_chip_revision(); err = esp_core_dump_write_data(&self.write_data, &dump_hdr, sizeof(core_dump_header_t)); if (err != ESP_OK) { @@ -1030,5 +1021,3 @@ esp_err_t esp_core_dump_get_summary(esp_core_dump_summary_t *summary) } #endif // CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH - -#endif //CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF diff --git a/components/espcoredump/src/core_dump_sha.c b/components/espcoredump/src/core_dump_sha.c index fcd81ae978..6be47081ae 100644 --- a/components/espcoredump/src/core_dump_sha.c +++ b/components/espcoredump/src/core_dump_sha.c @@ -6,8 +6,6 @@ #include "sdkconfig.h" -#if CONFIG_ESP_COREDUMP_CHECKSUM_SHA256 - #include #include "esp_core_dump_types.h" @@ -124,5 +122,3 @@ static uint32_t core_dump_sha_finish(core_dump_checksum_ctx cks_ctx, core_dump_c return core_dump_sha_size(); } - -#endif /* CONFIG_ESP_COREDUMP_CHECKSUM_SHA256 */ diff --git a/components/espcoredump/src/port/riscv/core_dump_port.c b/components/espcoredump/src/port/riscv/core_dump_port.c index 7d872ce62e..5473ee6d6d 100644 --- a/components/espcoredump/src/port/riscv/core_dump_port.c +++ b/components/espcoredump/src/port/riscv/core_dump_port.c @@ -377,7 +377,7 @@ uint32_t esp_core_dump_get_extra_info(void **info) return size; } -#if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH && CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF +#if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH void esp_core_dump_summary_parse_extra_info(esp_core_dump_summary_t *summary, void *ei_data) { @@ -445,6 +445,6 @@ void esp_core_dump_summary_parse_backtrace_info(esp_core_dump_bt_info_t *bt_info bt_info->dump_size = dump_size; } -#endif /* #if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH && CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF */ +#endif /* #if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH */ #endif diff --git a/components/espcoredump/src/port/xtensa/core_dump_port.c b/components/espcoredump/src/port/xtensa/core_dump_port.c index b6d0075faa..e7eadfcbd0 100644 --- a/components/espcoredump/src/port/xtensa/core_dump_port.c +++ b/components/espcoredump/src/port/xtensa/core_dump_port.c @@ -470,7 +470,7 @@ uint32_t esp_core_dump_get_extra_info(void **info) return sizeof(s_extra_info); } -#if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH && CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF +#if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH void esp_core_dump_summary_parse_extra_info(esp_core_dump_summary_t *summary, void *ei_data) { @@ -563,6 +563,6 @@ void esp_core_dump_summary_parse_backtrace_info(esp_core_dump_bt_info_t *bt_info bt_info->corrupted = corrupted; } -#endif /* #if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH && CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF */ +#endif /* #if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH */ #endif diff --git a/components/freertos/Kconfig b/components/freertos/Kconfig index 66d01b0c03..36c20b2ba2 100644 --- a/components/freertos/Kconfig +++ b/components/freertos/Kconfig @@ -442,8 +442,8 @@ menu "FreeRTOS" config FREERTOS_ISR_STACKSIZE int "ISR stack size" - range 2096 32768 if ESP_COREDUMP_DATA_FORMAT_ELF - default 2096 if ESP_COREDUMP_DATA_FORMAT_ELF + range 2096 32768 if ESP_COREDUMP_ENABLE + default 2096 if ESP_COREDUMP_ENABLE range 1536 32768 default 1536 help diff --git a/docs/en/api-guides/core_dump.rst b/docs/en/api-guides/core_dump.rst index d03ac3b209..f52f180079 100644 --- a/docs/en/api-guides/core_dump.rst +++ b/docs/en/api-guides/core_dump.rst @@ -29,27 +29,14 @@ The :ref:`CONFIG_ESP_COREDUMP_TO_FLASH_OR_UART` option enables or disables core Format & Size ^^^^^^^^^^^^^ -The :ref:`CONFIG_ESP_COREDUMP_DATA_FORMAT` option controls the format of the core dump file, namely ELF format or Binary format. - -The ELF format contains extended features and allows more information regarding erroneous tasks and crashed software to be saved. However, using the ELF format causes the core dump file to be larger. This format is recommended for new software designs and is flexible enough to be extended in future revisions to save more information. - -The Binary format is kept for compatibility reasons. Binary format core dump files are smaller while provide better performance. +Core dump files are generated in ELF format, which contains extended features and allows comprehensive information regarding erroneous tasks and crashed software to be saved. The ELF format is flexible and can be extended in future revisions to save additional information. The :ref:`CONFIG_ESP_COREDUMP_MAX_TASKS_NUM` option configures the number of task snapshots saved by the core dump. -Core dump data integrity checking is supported via the ``Components`` > ``Core dump`` > ``Core dump data integrity check`` option. - -.. only:: esp32 - - Data Integrity Check - ^^^^^^^^^^^^^^^^^^^^ - - Core dump files include a checksum, which can be used to verify the integrity of the core dump file, i.e., the file has not been corrupted. The :ref:`CONFIG_ESP_COREDUMP_CHECKSUM` option controls the type of checksum, namely CRC32 or SHA256 (only supported in the ELF format). - - The CRC32 option provides better calculation performance and consumes less memory for storage. - - The SHA256 hash algorithm provides a greater probability of detecting corruption than a CRC32 with multiple-bit errors. +Data Integrity Check +^^^^^^^^^^^^^^^^^^^^ +Core dump files include a SHA256 checksum, which can be used to verify the integrity of the core dump file and ensure it has not been corrupted. The SHA256 hash algorithm provides a high probability of detecting corruption, including multiple-bit errors. Reserved Stack Size ^^^^^^^^^^^^^^^^^^^ @@ -78,10 +65,6 @@ Setting this option to 0 bytes will cause the core dump routines to run from the Apart from the crashed task's TCB and stack, data located in the external RAM will not be stored in the core dump file, this include variables defined with ``EXT_RAM_BSS_ATTR`` or ``EXT_RAM_NOINIT_ATTR`` attributes, as well as any data stored in the ``extram_bss`` section. - .. note:: - - This feature is only enabled when using the ELF file format. - Core Dump to Flash ------------------ diff --git a/docs/en/api-guides/core_dump_internals.rst b/docs/en/api-guides/core_dump_internals.rst index 0f2d26fbfb..30edbcad44 100644 --- a/docs/en/api-guides/core_dump_internals.rst +++ b/docs/en/api-guides/core_dump_internals.rst @@ -3,7 +3,7 @@ Anatomy of Core Dump Image :link_to_translation:`zh_CN:[中文]` -A core dump file's format can be configured to use the ELF format, or a legacy binary format. The ELF format is recommended for all new designs as it provides more information regarding the software's state at the moment the crash occurs, e.g., CPU registers and memory contents. +Core dump files are generated in ELF format, which provides comprehensive information regarding the software's state at the moment the crash occurs, including CPU registers and memory contents. The memory state embeds a snapshot of all tasks mapped in the memory space of the program. The CPU state contains register values when the core dump has been generated. The core dump file uses a subset of the ELF structures to register this information. @@ -18,13 +18,6 @@ Here is an overview of the core dump layout: Core Dump ELF Image Format -.. figure:: ../../_static/core_dump_format_bin.png - :align: center - :alt: Core Dump Binary Image Format - :figclass: align-center - - Core Dump Binary Image Format - .. note:: The format of the image file shown in the above pictures represents the current version of the image and can be changed in future releases. diff --git a/docs/en/migration-guides/release-6.x/6.0/system.rst b/docs/en/migration-guides/release-6.x/6.0/system.rst index ced2f9c3f1..bb2a2b49f1 100644 --- a/docs/en/migration-guides/release-6.x/6.0/system.rst +++ b/docs/en/migration-guides/release-6.x/6.0/system.rst @@ -93,3 +93,10 @@ The following deprecated FreeRTOS functions have been removed in ESP-IDF v6.0: **Deprecated Functions** The function :cpp:func:`pxTaskGetStackStart` has been deprecated. Use :cpp:func:`xTaskGetStackStart` instead for improved type safety. + +Core Dump +--------- + +Binary data format has been dropped. `CONFIG_ESP_COREDUMP_DATA_FORMAT_BIN` is no longer supported. Elf is now the default data format. + +CRC data integrity check has been dropped. `ESP_COREDUMP_CHECKSUM_CRC32` is no longer supported. SHA256 is now the default checksum algorithm. diff --git a/docs/zh_CN/api-guides/core_dump.rst b/docs/zh_CN/api-guides/core_dump.rst index 0b1b014550..1b5455f2f0 100644 --- a/docs/zh_CN/api-guides/core_dump.rst +++ b/docs/zh_CN/api-guides/core_dump.rst @@ -29,26 +29,14 @@ 格式和大小 ^^^^^^^^^^^^^ -选项 :ref:`CONFIG_ESP_COREDUMP_DATA_FORMAT` 控制核心转储文件格式,即 ELF 格式或二进制格式。 - -ELF 格式具备扩展特性,支持在发生崩溃时保存更多关于错误任务和崩溃软件的信息,但使用 ELF 格式会使核心转储文件变大。建议在新的软件设计中使用此格式,该格式足够灵活,可以在未来的修订版本中进行扩展,保存更多信息。 - -出于兼容性考虑,核心转储文件保留二进制格式。二进制格式的核心转储文件更小,性能更优。 +核心转储文件以 ELF 格式生成,该格式具备扩展特性,支持在发生崩溃时保存关于错误任务和崩溃软件的全面信息。ELF 格式足够灵活,可以在未来的修订版本中进行扩展,保存更多信息。 选项 :ref:`CONFIG_ESP_COREDUMP_MAX_TASKS_NUM` 配置核心转储保存的任务快照数量。 -通过 ``Components`` > ``Core dump`` > ``Core dump data integrity check`` 选项可进行核心转储数据完整性检查。 +数据完整性检查 +^^^^^^^^^^^^^^^^^^^^ -.. only:: esp32 - - 数据完整性检查 - ^^^^^^^^^^^^^^^^^^^^ - - 核心转储文件包含一个校验和,用于验证核心转储文件在保存时是否完整(即未损坏)。选项 :ref:`CONFIG_ESP_COREDUMP_CHECKSUM` 控制校验和的类型,即 CRC32 或 SHA256(仅在 ELF 格式中支持)。 - - CRC32 选项能够提供更好的计算性能,在存储时占用内存较少。 - - SHA256 哈希算法检测到损坏的概率高于具有多位错误的 CRC32。 +核心转储文件包含 SHA256 校验和,用于验证核心转储文件的完整性并确保文件未被损坏。SHA256 哈希算法在检测损坏方面具有很高的准确率,包括多位错误。 保留栈大小 @@ -78,10 +66,6 @@ ELF 格式具备扩展特性,支持在发生崩溃时保存更多关于错误 除了崩溃任务的 TCB 和栈外,位于外部 RAM 中的数据不会保存到核心转储文件中,包括使用 ``EXT_RAM_BSS_ATTR`` 或 ``EXT_RAM_NOINIT_ATTR`` 属性定义的变量,以及存储在 ``extram_bss`` 段中的任何数据。 - .. note:: - - 该功能仅在使用 ELF 文件格式时可用。 - 将核心转储保存到 flash ----------------------- diff --git a/docs/zh_CN/api-guides/core_dump_internals.rst b/docs/zh_CN/api-guides/core_dump_internals.rst index 0d10fcf090..8dac21f893 100644 --- a/docs/zh_CN/api-guides/core_dump_internals.rst +++ b/docs/zh_CN/api-guides/core_dump_internals.rst @@ -3,7 +3,7 @@ :link_to_translation:`en:[English]` -核心转储文件的格式可以配置为使用 ELF 格式或传统的二进制格式。建议在所有新设计中使用 ELF 格式,该格式在发生崩溃时会提供更多关于软件状态的信息,例如 CPU 寄存器和内存内容。 +核心转储文件以 ELF 格式生成,该格式在发生崩溃时会提供关于软件状态的全面信息,包括 CPU 寄存器和内存内容。 内存状态包含程序内存空间中映射的所有任务的快照;CPU 状态包含核心转储生成时的寄存器值。核心转储文件使用 ELF 结构的子集注册这些信息。 @@ -18,19 +18,12 @@ 核心转储 ELF 镜像文件格式 -.. figure:: ../../_static/core_dump_format_bin.png - :align: center - :alt: 核心转储二进制镜像文件格式 - :figclass: align-center - - 核心转储二进制镜像文件格式 - .. note:: 上图仅展示当前版本镜像的文件格式,在未来的发布版本中可能会发生变化。 -核心转储实现 +实现概述 -------------------------- 下图展示了核心转储实现的基本情况: diff --git a/tools/test_apps/system/panic/CMakeLists.txt b/tools/test_apps/system/panic/CMakeLists.txt index c34e5b12a5..6f446fa80e 100644 --- a/tools/test_apps/system/panic/CMakeLists.txt +++ b/tools/test_apps/system/panic/CMakeLists.txt @@ -34,11 +34,9 @@ if(NOT CONFIG_TEST_MEMPROT AND NOT CONFIG_ESP_COREDUMP_CAPTURE_DRAM) # due to RAM size limitations. set(ubsan_components main espcoredump esp_system spi_flash esp_common esp_hw_support soc hal freertos) - if(CONFIG_ESP_COREDUMP_CHECKSUM_SHA256) - if(CONFIG_IDF_TARGET_ESP32S2) - # due to the ram limitation, coredump and freertos are removed from esp32s2 built - list(REMOVE_ITEM ubsan_components espcoredump freertos) - endif() + if(CONFIG_IDF_TARGET_ESP32S2) + # due to the ram limitation, coredump and freertos are removed from esp32s2 built + list(REMOVE_ITEM ubsan_components espcoredump freertos) endif() foreach(component IN LISTS ubsan_components) idf_component_get_property(lib ${component} COMPONENT_LIB) diff --git a/tools/test_apps/system/panic/main/include/test_panic.h b/tools/test_apps/system/panic/main/include/test_panic.h index ab62a637d4..eaa573ddfd 100644 --- a/tools/test_apps/system/panic/main/include/test_panic.h +++ b/tools/test_apps/system/panic/main/include/test_panic.h @@ -76,7 +76,7 @@ void test_capture_dram(void); void test_tcb_corrupted(void); -#if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH && CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF +#if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH void test_setup_coredump_summary(void); void test_coredump_summary(void); #endif diff --git a/tools/test_apps/system/panic/main/test_app_main.c b/tools/test_apps/system/panic/main/test_app_main.c index 9b883d0e00..4b68ce2457 100644 --- a/tools/test_apps/system/panic/main/test_app_main.c +++ b/tools/test_apps/system/panic/main/test_app_main.c @@ -129,7 +129,7 @@ void app_main(void) #if CONFIG_ESP_SYSTEM_USE_FRAME_POINTER HANDLE_TEST(test_name, test_panic_print_backtrace); #endif -#if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH && CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF +#if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH HANDLE_TEST(test_name, test_setup_coredump_summary); HANDLE_TEST(test_name, test_coredump_summary); #endif diff --git a/tools/test_apps/system/panic/main/test_panic.c b/tools/test_apps/system/panic/main/test_panic.c index b808fad6b8..20015774bc 100644 --- a/tools/test_apps/system/panic/main/test_panic.c +++ b/tools/test_apps/system/panic/main/test_panic.c @@ -319,7 +319,7 @@ void test_ub(void) printf("%d\n", stuff[rand()]); } -#if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH && CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF +#if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH void test_setup_coredump_summary(void) { if (esp_core_dump_image_erase() != ESP_OK) diff --git a/tools/test_apps/system/panic/pytest_panic.py b/tools/test_apps/system/panic/pytest_panic.py index 23f062f063..7b10874b42 100644 --- a/tools/test_apps/system/panic/pytest_panic.py +++ b/tools/test_apps/system/panic/pytest_panic.py @@ -34,11 +34,9 @@ CONFIGS = list( itertools.chain( itertools.product( [ - 'coredump_flash_bin_crc', - 'coredump_flash_elf_sha', - 'coredump_flash_elf_soft_sha', - 'coredump_uart_bin_crc', - 'coredump_uart_elf_crc', + 'coredump_flash_default', + 'coredump_flash_soft_sha', + 'coredump_uart_default', 'gdbstub', 'panic', ], @@ -62,10 +60,8 @@ CONFIGS_DUAL_CORE = list( itertools.chain( itertools.product( [ - 'coredump_flash_bin_crc', - 'coredump_flash_elf_sha', - 'coredump_uart_bin_crc', - 'coredump_uart_elf_crc', + 'coredump_flash_default', + 'coredump_uart_default', 'gdbstub', 'panic', ], @@ -77,7 +73,7 @@ CONFIGS_DUAL_CORE = list( CONFIGS_HW_STACK_GUARD = list( itertools.chain( itertools.product( - ['coredump_flash_bin_crc', 'coredump_uart_bin_crc', 'coredump_uart_elf_crc', 'gdbstub', 'panic'], + ['coredump_uart_default', 'gdbstub', 'panic'], TARGETS_RISCV, ) ) @@ -86,7 +82,7 @@ CONFIGS_HW_STACK_GUARD = list( CONFIGS_HW_STACK_GUARD_DUAL_CORE = list( itertools.chain( itertools.product( - ['coredump_flash_bin_crc', 'coredump_uart_bin_crc', 'coredump_uart_elf_crc', 'gdbstub', 'panic'], + ['coredump_uart_default', 'gdbstub', 'panic'], TARGETS_RISCV_DUAL_CORE, ) ) @@ -96,7 +92,7 @@ CONFIG_CAPTURE_DRAM = list( itertools.chain(itertools.product(['coredump_flash_capture_dram', 'coredump_uart_capture_dram'], TARGETS_ALL)) ) -CONFIG_COREDUMP_SUMMARY = list(itertools.chain(itertools.product(['coredump_flash_elf_sha'], TARGETS_ALL))) +CONFIG_COREDUMP_SUMMARY = list(itertools.chain(itertools.product(['coredump_flash_default'], TARGETS_ALL))) CONFIG_COREDUMP_SUMMARY_FLASH_ENCRYPTED = list( itertools.chain( @@ -165,11 +161,6 @@ def common_test( dut.revert_log_level() return # don't expect "Rebooting" output below - # We will only perform comparisons for ELF files, - # as we are not introducing any new fields to the binary file format. - if 'bin' in config: - expected_coredump = None - if 'uart' in config: coredump_base64 = expect_coredump_uart_write_logs(dut, check_cpu_reset) dut.process_coredump_uart(coredump_base64, expected_coredump) @@ -1210,7 +1201,7 @@ def test_coredump_summary_flash_encrypted(dut: PanicTestDut, config: str) -> Non @pytest.mark.generic -@idf_parametrize('config', ['coredump_flash_elf_sha'], indirect=['config']) +@idf_parametrize('config', ['coredump_flash_default'], indirect=['config']) @idf_parametrize('target', TARGETS_ALL, indirect=['target']) def test_tcb_corrupted(dut: PanicTestDut, target: str, config: str, test_func_name: str) -> None: dut.run_test_func(test_func_name) diff --git a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_bin_crc b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_bin_crc deleted file mode 100644 index 948fec4789..0000000000 --- a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_bin_crc +++ /dev/null @@ -1,7 +0,0 @@ -CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y -CONFIG_ESP_COREDUMP_DATA_FORMAT_BIN=y -CONFIG_ESP_COREDUMP_CHECKSUM_CRC32=y -CONFIG_LOG_DEFAULT_LEVEL_INFO=y - -# static D/IRAM usage 97%, add this to reduce -CONFIG_HAL_ASSERTION_DISABLE=y diff --git a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_capture_dram b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_capture_dram index d8e5231dc1..5cad8dee4a 100644 --- a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_capture_dram +++ b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_capture_dram @@ -1,6 +1,4 @@ CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y -CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y -CONFIG_ESP_COREDUMP_CHECKSUM_SHA256=y CONFIG_ESP_COREDUMP_CAPTURE_DRAM=y CONFIG_PARTITION_TABLE_CUSTOM=y CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_capture_dram.csv" diff --git a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_custom_stack b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_custom_stack index b85ce194dc..75abfb084c 100644 --- a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_custom_stack +++ b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_custom_stack @@ -1,5 +1,3 @@ CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y -CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y -CONFIG_ESP_COREDUMP_CHECKSUM_SHA256=y CONFIG_LOG_DEFAULT_LEVEL_INFO=y CONFIG_ESP_COREDUMP_STACK_SIZE=2048 diff --git a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_default b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_default new file mode 100644 index 0000000000..0700f63454 --- /dev/null +++ b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_default @@ -0,0 +1,2 @@ +CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y +CONFIG_LOG_DEFAULT_LEVEL_INFO=y diff --git a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_elf_sha b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_elf_sha deleted file mode 100644 index 43d6fdc6e6..0000000000 --- a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_elf_sha +++ /dev/null @@ -1,4 +0,0 @@ -CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y -CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y -CONFIG_ESP_COREDUMP_CHECKSUM_SHA256=y -CONFIG_LOG_DEFAULT_LEVEL_INFO=y diff --git a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_encrypted b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_encrypted index b0f4d96191..acfb415127 100644 --- a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_encrypted +++ b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_encrypted @@ -2,8 +2,6 @@ CONFIG_PARTITION_TABLE_CUSTOM=y CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_coredump_encrypted.csv" CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y -CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y -CONFIG_ESP_COREDUMP_CHECKSUM_SHA256=y CONFIG_SECURE_FLASH_ENC_ENABLED=y CONFIG_SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT=y diff --git a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_encrypted_coredump_plain b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_encrypted_coredump_plain index da72c14012..1cd16634a0 100644 --- a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_encrypted_coredump_plain +++ b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_encrypted_coredump_plain @@ -2,8 +2,6 @@ CONFIG_PARTITION_TABLE_CUSTOM=y CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_coredump_plain.csv" CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y -CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y -CONFIG_ESP_COREDUMP_CHECKSUM_SHA256=y CONFIG_SECURE_FLASH_ENC_ENABLED=y CONFIG_SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT=y diff --git a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_extram_stack_bss_esp32 b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_extram_stack_bss_esp32 index 065b49d68b..dfc32c40f8 100644 --- a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_extram_stack_bss_esp32 +++ b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_extram_stack_bss_esp32 @@ -1,7 +1,5 @@ CONFIG_IDF_TARGET="esp32" CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y -CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y -CONFIG_ESP_COREDUMP_CHECKSUM_SHA256=y # We need to have the coredump info log CONFIG_LOG_DEFAULT_LEVEL_INFO=y CONFIG_SPIRAM=y diff --git a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_extram_stack_bss_esp32s2 b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_extram_stack_bss_esp32s2 index 7c372f58f2..70155aa199 100644 --- a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_extram_stack_bss_esp32s2 +++ b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_extram_stack_bss_esp32s2 @@ -1,7 +1,5 @@ CONFIG_IDF_TARGET="esp32s2" CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y -CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y -CONFIG_ESP_COREDUMP_CHECKSUM_SHA256=y # We need to have the coredump info log CONFIG_LOG_DEFAULT_LEVEL_INFO=y CONFIG_SPIRAM=y diff --git a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_extram_stack_bss_esp32s3 b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_extram_stack_bss_esp32s3 index a1533240cb..73121a75ab 100644 --- a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_extram_stack_bss_esp32s3 +++ b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_extram_stack_bss_esp32s3 @@ -1,7 +1,5 @@ CONFIG_IDF_TARGET="esp32s3" CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y -CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y -CONFIG_ESP_COREDUMP_CHECKSUM_SHA256=y # We need to have the coredump info log CONFIG_LOG_DEFAULT_LEVEL_INFO=y CONFIG_SPIRAM=y diff --git a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_extram_stack_heap_esp32 b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_extram_stack_heap_esp32 index a98716641a..b84f8b6cd6 100644 --- a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_extram_stack_heap_esp32 +++ b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_extram_stack_heap_esp32 @@ -1,7 +1,5 @@ CONFIG_IDF_TARGET="esp32" CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y -CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y -CONFIG_ESP_COREDUMP_CHECKSUM_SHA256=y # We need to have the coredump info log CONFIG_LOG_DEFAULT_LEVEL_INFO=y CONFIG_SPIRAM=y diff --git a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_extram_stack_heap_esp32s2 b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_extram_stack_heap_esp32s2 index dddebf12c0..173078cabf 100644 --- a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_extram_stack_heap_esp32s2 +++ b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_extram_stack_heap_esp32s2 @@ -1,7 +1,5 @@ CONFIG_IDF_TARGET="esp32s2" CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y -CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y -CONFIG_ESP_COREDUMP_CHECKSUM_SHA256=y # We need to have the coredump info log CONFIG_LOG_DEFAULT_LEVEL_INFO=y CONFIG_SPIRAM=y diff --git a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_extram_stack_heap_esp32s3 b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_extram_stack_heap_esp32s3 index 5520211894..c3bf37673f 100644 --- a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_extram_stack_heap_esp32s3 +++ b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_extram_stack_heap_esp32s3 @@ -1,7 +1,5 @@ CONFIG_IDF_TARGET="esp32s3" CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y -CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y -CONFIG_ESP_COREDUMP_CHECKSUM_SHA256=y # We need to have the coredump info log CONFIG_LOG_DEFAULT_LEVEL_INFO=y CONFIG_SPIRAM=y diff --git a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_elf_soft_sha b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_soft_sha similarity index 56% rename from tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_elf_soft_sha rename to tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_soft_sha index e426d2e4d1..77757b17c9 100644 --- a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_elf_soft_sha +++ b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_soft_sha @@ -1,5 +1,3 @@ CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y -CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y -CONFIG_ESP_COREDUMP_CHECKSUM_SHA256=y CONFIG_LOG_DEFAULT_LEVEL_INFO=y CONFIG_MBEDTLS_HARDWARE_SHA=n diff --git a/tools/test_apps/system/panic/sdkconfig.ci.coredump_uart_bin_crc b/tools/test_apps/system/panic/sdkconfig.ci.coredump_uart_bin_crc deleted file mode 100644 index b0a336274d..0000000000 --- a/tools/test_apps/system/panic/sdkconfig.ci.coredump_uart_bin_crc +++ /dev/null @@ -1,3 +0,0 @@ -CONFIG_ESP_COREDUMP_ENABLE_TO_UART=y -CONFIG_ESP_COREDUMP_DATA_FORMAT_BIN=y -CONFIG_ESP_COREDUMP_CHECKSUM_CRC32=y diff --git a/tools/test_apps/system/panic/sdkconfig.ci.coredump_uart_capture_dram b/tools/test_apps/system/panic/sdkconfig.ci.coredump_uart_capture_dram index 75c1052813..53662607ff 100644 --- a/tools/test_apps/system/panic/sdkconfig.ci.coredump_uart_capture_dram +++ b/tools/test_apps/system/panic/sdkconfig.ci.coredump_uart_capture_dram @@ -1,5 +1,3 @@ CONFIG_ESP_COREDUMP_ENABLE_TO_UART=y -CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y -CONFIG_ESP_COREDUMP_CHECKSUM_SHA256=y CONFIG_ESP_COREDUMP_CAPTURE_DRAM=y CONFIG_LOG_DEFAULT_LEVEL_INFO=y diff --git a/tools/test_apps/system/panic/sdkconfig.ci.coredump_uart_elf_crc b/tools/test_apps/system/panic/sdkconfig.ci.coredump_uart_elf_crc index 46b621039b..48ffbae9a2 100644 --- a/tools/test_apps/system/panic/sdkconfig.ci.coredump_uart_elf_crc +++ b/tools/test_apps/system/panic/sdkconfig.ci.coredump_uart_elf_crc @@ -1,3 +1 @@ CONFIG_ESP_COREDUMP_ENABLE_TO_UART=y -CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y -CONFIG_ESP_COREDUMP_CHECKSUM_CRC32=y diff --git a/tools/test_apps/system/panic/sdkconfig.ci.gdbstub_coredump b/tools/test_apps/system/panic/sdkconfig.ci.gdbstub_coredump index dfece5b172..8d01742be8 100644 --- a/tools/test_apps/system/panic/sdkconfig.ci.gdbstub_coredump +++ b/tools/test_apps/system/panic/sdkconfig.ci.gdbstub_coredump @@ -1,4 +1,2 @@ CONFIG_ESP_COREDUMP_ENABLE_TO_UART=y -CONFIG_ESP_COREDUMP_DATA_FORMAT_BIN=y -CONFIG_ESP_COREDUMP_CHECKSUM_CRC32=y CONFIG_ESP_SYSTEM_PANIC_GDBSTUB=y