From 20af94ff53c5147a76342800d007a6c49be50a7b Mon Sep 17 00:00:00 2001 From: Mahavir Jain Date: Tue, 29 Sep 2020 21:02:17 +0530 Subject: [PATCH] Coredump config option rename throughout IDF --- components/esp_system/panic.c | 8 ++++---- components/esp_system/startup.c | 2 +- components/esptool_py/Makefile.projbuild | 2 +- components/freertos/Kconfig | 4 ++-- .../freertos/xtensa/include/freertos/FreeRTOSConfig.h | 2 +- components/mdns/test_afl_fuzz_host/sdkconfig.h | 2 +- components/partition_table/Kconfig.projbuild | 8 ++++---- docs/en/api-guides/core_dump.rst | 4 ++-- docs/zh_CN/api-guides/fatal-errors.rst | 2 +- .../ble_throughput/throughput_client/sdkconfig.defaults | 2 +- .../ble_throughput/throughput_server/sdkconfig.defaults | 2 +- tools/idf_py_actions/serial_ext.py | 2 +- tools/ldgen/samples/sdkconfig | 8 ++++---- .../system/monitor_ide_integration/sdkconfig.ci.coredump | 2 +- .../system/panic/sdkconfig.ci.coredump_flash_bin_crc | 6 +++--- .../system/panic/sdkconfig.ci.coredump_flash_elf_sha | 6 +++--- .../system/panic/sdkconfig.ci.coredump_uart_bin_crc | 6 +++--- .../system/panic/sdkconfig.ci.coredump_uart_elf_crc | 6 +++--- 18 files changed, 37 insertions(+), 37 deletions(-) diff --git a/components/esp_system/panic.c b/components/esp_system/panic.c index e7402df4ea..61b8a124fe 100644 --- a/components/esp_system/panic.c +++ b/components/esp_system/panic.c @@ -294,23 +294,23 @@ void esp_panic_handler(panic_info_t *info) panic_print_str("Entering gdb stub now.\r\n"); esp_gdbstub_panic_handler((XtExcFrame*) info->frame); #else -#if CONFIG_ESP32_ENABLE_COREDUMP +#if CONFIG_ESP_COREDUMP_ENABLE static bool s_dumping_core; if (s_dumping_core) { panic_print_str("Re-entered core dump! Exception happened during core dump!\r\n"); } else { disable_all_wdts(); s_dumping_core = true; -#if CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH +#if CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH esp_core_dump_to_flash(info); #endif -#if CONFIG_ESP32_ENABLE_COREDUMP_TO_UART && !CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT +#if CONFIG_ESP_COREDUMP_ENABLE_TO_UART && !CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT esp_core_dump_to_uart(info); #endif s_dumping_core = false; reconfigure_all_wdts(); } -#endif /* CONFIG_ESP32_ENABLE_COREDUMP */ +#endif /* CONFIG_ESP_COREDUMP_ENABLE */ wdt_hal_write_protect_disable(&rtc_wdt_ctx); wdt_hal_disable(&rtc_wdt_ctx); wdt_hal_write_protect_enable(&rtc_wdt_ctx); diff --git a/components/esp_system/startup.c b/components/esp_system/startup.c index 2545f7a613..405de15365 100644 --- a/components/esp_system/startup.c +++ b/components/esp_system/startup.c @@ -373,7 +373,7 @@ IRAM_ATTR ESP_SYSTEM_INIT_FN(init_components0, BIT(0)) esp_pm_impl_init(); #endif -#if CONFIG_ESP_ENABLE_COREDUMP +#if CONFIG_ESP_COREDUMP_ENABLE esp_core_dump_init(); #endif diff --git a/components/esptool_py/Makefile.projbuild b/components/esptool_py/Makefile.projbuild index c2d047b03d..1d3007b820 100644 --- a/components/esptool_py/Makefile.projbuild +++ b/components/esptool_py/Makefile.projbuild @@ -149,7 +149,7 @@ simple_monitor: $(call prereq_if_explicit,%flash) | check_python_dependencies PRINT_FILTER ?= MONITOR_CORE_DUMP_DECODE_ARG ?= -MONITOR_CORE_DUMP_DECODE = $(call dequote,$(CONFIG_ESP32_CORE_DUMP_DECODE)) +MONITOR_CORE_DUMP_DECODE = $(call dequote,$(CONFIG_ESP_COREDUMP_DECODE)) ifneq ("$(MONITOR_CORE_DUMP_DECODE)","") MONITOR_CORE_DUMP_DECODE_ARG = --decode-coredumps $(MONITOR_CORE_DUMP_DECODE) endif diff --git a/components/freertos/Kconfig b/components/freertos/Kconfig index d5ba05940c..af633b7ac6 100644 --- a/components/freertos/Kconfig +++ b/components/freertos/Kconfig @@ -174,8 +174,8 @@ menu "FreeRTOS" config FREERTOS_ISR_STACKSIZE int "ISR stack size" - range 2096 32768 if ESP32_COREDUMP_DATA_FORMAT_ELF - default 2096 if ESP32_COREDUMP_DATA_FORMAT_ELF + range 2096 32768 if ESP_COREDUMP_DATA_FORMAT_ELF + default 2096 if ESP_COREDUMP_DATA_FORMAT_ELF range 1536 32768 default 1536 help diff --git a/components/freertos/xtensa/include/freertos/FreeRTOSConfig.h b/components/freertos/xtensa/include/freertos/FreeRTOSConfig.h index 95dd00df6f..bc9079d252 100644 --- a/components/freertos/xtensa/include/freertos/FreeRTOSConfig.h +++ b/components/freertos/xtensa/include/freertos/FreeRTOSConfig.h @@ -319,7 +319,7 @@ extern void vPortCleanUpTCB ( void *pxTCB ); #define configXT_BOARD 1 /* Board mode */ #define configXT_SIMULATOR 0 -#if CONFIG_ESP32_ENABLE_COREDUMP +#if CONFIG_ESP_COREDUMP_ENABLE #define configENABLE_TASK_SNAPSHOT 1 #endif #ifndef configENABLE_TASK_SNAPSHOT diff --git a/components/mdns/test_afl_fuzz_host/sdkconfig.h b/components/mdns/test_afl_fuzz_host/sdkconfig.h index 335b039940..43d4a278a5 100644 --- a/components/mdns/test_afl_fuzz_host/sdkconfig.h +++ b/components/mdns/test_afl_fuzz_host/sdkconfig.h @@ -151,7 +151,7 @@ #define CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE 1 #define CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER 20 #define CONFIG_ESP32_PHY_MAX_TX_POWER 20 -#define CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE 1 +#define CONFIG_ESP_COREDUMP_ENABLE_TO_NONE 1 #define CONFIG_FATFS_CODEPAGE_437 1 #define CONFIG_FATFS_CODEPAGE 437 #define CONFIG_FATFS_LFN_NONE 1 diff --git a/components/partition_table/Kconfig.projbuild b/components/partition_table/Kconfig.projbuild index 6dfa8a5626..e43a5cd2c5 100644 --- a/components/partition_table/Kconfig.projbuild +++ b/components/partition_table/Kconfig.projbuild @@ -29,10 +29,10 @@ menu "Partition Table" config PARTITION_TABLE_FILENAME string - default "partitions_singleapp.csv" if PARTITION_TABLE_SINGLE_APP && !ESP32_ENABLE_COREDUMP_TO_FLASH - default "partitions_singleapp_coredump.csv" if PARTITION_TABLE_SINGLE_APP && ESP32_ENABLE_COREDUMP_TO_FLASH - default "partitions_two_ota.csv" if PARTITION_TABLE_TWO_OTA && !ESP32_ENABLE_COREDUMP_TO_FLASH - default "partitions_two_ota_coredump.csv" if PARTITION_TABLE_TWO_OTA && ESP32_ENABLE_COREDUMP_TO_FLASH + default "partitions_singleapp.csv" if PARTITION_TABLE_SINGLE_APP && !ESP_COREDUMP_ENABLE_TO_FLASH + default "partitions_singleapp_coredump.csv" if PARTITION_TABLE_SINGLE_APP && ESP_COREDUMP_ENABLE_TO_FLASH + default "partitions_two_ota.csv" if PARTITION_TABLE_TWO_OTA && !ESP_COREDUMP_ENABLE_TO_FLASH + default "partitions_two_ota_coredump.csv" if PARTITION_TABLE_TWO_OTA && ESP_COREDUMP_ENABLE_TO_FLASH default PARTITION_TABLE_CUSTOM_FILENAME if PARTITION_TABLE_CUSTOM config PARTITION_TABLE_OFFSET diff --git a/docs/en/api-guides/core_dump.rst b/docs/en/api-guides/core_dump.rst index fc1ccd2162..227f389141 100644 --- a/docs/en/api-guides/core_dump.rst +++ b/docs/en/api-guides/core_dump.rst @@ -122,7 +122,7 @@ Supported notations and RAM regions Example ^^^^^^^ -1. In :ref:`project-configuration-menu`, enable :ref:`COREDUMP TO FLASH `, then save and exit. +1. In :ref:`project-configuration-menu`, enable :ref:`COREDUMP TO FLASH `, then save and exit. 2. In your project, create a global variable in DRAM area as such as: @@ -175,4 +175,4 @@ Generic command syntax: * --save-core,-s SAVE_CORE. Save core to file. Othwerwise temporary core file will be deleted. Ignored with "-c". * --rom-elf,-r ROM_ELF. Path to ROM ELF file to use (if skipped "esp32_rom.elf" is used). * --print-mem,-m Print memory dump. Used only with "info_corefile". - * Path to program ELF file. \ No newline at end of file + * Path to program ELF file. diff --git a/docs/zh_CN/api-guides/fatal-errors.rst b/docs/zh_CN/api-guides/fatal-errors.rst index 8c99acc7d5..8db3ac6a14 100644 --- a/docs/zh_CN/api-guides/fatal-errors.rst +++ b/docs/zh_CN/api-guides/fatal-errors.rst @@ -62,7 +62,7 @@ - 如果 :ref:`CONFIG_{IDF_TARGET_CFG_PREFIX}_DEBUG_OCDAWARE` 被使能了(默认),紧急处理程序会检测 {IDF_TARGET_NAME} 是否已经连接 JTAG 调试器。如果检测成功,程序会暂停运行,并将控制权交给调试器。在这种情况下,寄存器和回溯不会被打印到控制台,并且也不会使用 GDB Stub 和 Core Dump 的功能。 -- 如果使能了 :doc:`Core Dump ` 功能(``CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH`` 或者 ``CONFIG_ESP32_ENABLE_COREDUMP_TO_UART`` 选项),系统状态(任务堆栈和寄存器)会被转储到 Flash 或者 UART 以供后续分析。 +- 如果使能了 :doc:`Core Dump ` 功能(``CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH`` 或者 ``CONFIG_ESP_COREDUMP_ENABLE_TO_UART`` 选项),系统状态(任务堆栈和寄存器)会被转储到 Flash 或者 UART 以供后续分析。 下图展示了紧急处理程序的行为: diff --git a/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_client/sdkconfig.defaults b/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_client/sdkconfig.defaults index 00cfa32ecd..f83241a2f2 100644 --- a/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_client/sdkconfig.defaults +++ b/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_client/sdkconfig.defaults @@ -18,5 +18,5 @@ CONFIG_ESPTOOLPY_MONITOR_BAUD=921600 # ESP32-specific # CONFIG_ESP32_TRACEMEM_RESERVE_DRAM=0x0 -CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y +CONFIG_ESP_COREDUMP_ENABLE_TO_NONE=y CONFIG_ESP_CONSOLE_UART_BAUDRATE=921600 diff --git a/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_server/sdkconfig.defaults b/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_server/sdkconfig.defaults index 3c869dae0b..3949fbe662 100644 --- a/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_server/sdkconfig.defaults +++ b/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_server/sdkconfig.defaults @@ -18,5 +18,5 @@ CONFIG_ESPTOOLPY_MONITOR_BAUD=921600 # ESP32-specific # CONFIG_ESP32_TRACEMEM_RESERVE_DRAM=0x0 -CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y +CONFIG_ESP_COREDUMP_ENABLE_TO_NONE=y CONFIG_ESP_CONSOLE_UART_BAUDRATE=921600 diff --git a/tools/idf_py_actions/serial_ext.py b/tools/idf_py_actions/serial_ext.py index 4affe20129..60c4c017c4 100644 --- a/tools/idf_py_actions/serial_ext.py +++ b/tools/idf_py_actions/serial_ext.py @@ -90,7 +90,7 @@ def action_extensions(base_actions, project_path): monitor_args += ["-b", monitor_baud] monitor_args += ["--toolchain-prefix", project_desc["monitor_toolprefix"]] - coredump_decode = get_sdkconfig_value(project_desc["config_file"], "CONFIG_ESP32_CORE_DUMP_DECODE") + coredump_decode = get_sdkconfig_value(project_desc["config_file"], "CONFIG_ESP_COREDUMP_DECODE") if coredump_decode is not None: monitor_args += ["--decode-coredumps", coredump_decode] diff --git a/tools/ldgen/samples/sdkconfig b/tools/ldgen/samples/sdkconfig index 34bef9f38f..30c053f86d 100644 --- a/tools/ldgen/samples/sdkconfig +++ b/tools/ldgen/samples/sdkconfig @@ -139,10 +139,10 @@ CONFIG_ESP32_MEMMAP_TRACEMEM= CONFIG_ESP32_MEMMAP_TRACEMEM_TWOBANKS= CONFIG_ESP32_TRAX= CONFIG_ESP32_TRACEMEM_RESERVE_DRAM=0x0 -CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH= -CONFIG_ESP32_ENABLE_COREDUMP_TO_UART= -CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y -CONFIG_ESP32_ENABLE_COREDUMP= +CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH= +CONFIG_ESP_COREDUMP_ENABLE_TO_UART= +CONFIG_ESP_COREDUMP_ENABLE_TO_NONE=y +CONFIG_ESP_COREDUMP_ENABLE= CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_TWO= CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR=y CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES=4 diff --git a/tools/test_apps/system/monitor_ide_integration/sdkconfig.ci.coredump b/tools/test_apps/system/monitor_ide_integration/sdkconfig.ci.coredump index ac111d1617..48ffbae9a2 100644 --- a/tools/test_apps/system/monitor_ide_integration/sdkconfig.ci.coredump +++ b/tools/test_apps/system/monitor_ide_integration/sdkconfig.ci.coredump @@ -1 +1 @@ -CONFIG_ESP32_ENABLE_COREDUMP_TO_UART=y +CONFIG_ESP_COREDUMP_ENABLE_TO_UART=y 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 index 9b6a7c6cfd..627ace5460 100644 --- a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_bin_crc +++ b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_bin_crc @@ -1,3 +1,3 @@ -CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH=y -CONFIG_ESP32_COREDUMP_DATA_FORMAT_BIN=y -CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32=y +CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=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_flash_elf_sha b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_elf_sha index 5be3bd9b2b..adc99c343b 100644 --- a/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_elf_sha +++ b/tools/test_apps/system/panic/sdkconfig.ci.coredump_flash_elf_sha @@ -1,4 +1,4 @@ CONFIG_IDF_TARGET="esp32" -CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH=y -CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF=y -CONFIG_ESP32_COREDUMP_CHECKSUM_SHA256=y +CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y +CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y +CONFIG_ESP_COREDUMP_CHECKSUM_SHA256=y 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 index 3e146fe38d..b0a336274d 100644 --- a/tools/test_apps/system/panic/sdkconfig.ci.coredump_uart_bin_crc +++ b/tools/test_apps/system/panic/sdkconfig.ci.coredump_uart_bin_crc @@ -1,3 +1,3 @@ -CONFIG_ESP32_ENABLE_COREDUMP_TO_UART=y -CONFIG_ESP32_COREDUMP_DATA_FORMAT_BIN=y -CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32=y +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_elf_crc b/tools/test_apps/system/panic/sdkconfig.ci.coredump_uart_elf_crc index a395ccefff..46b621039b 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,3 @@ -CONFIG_ESP32_ENABLE_COREDUMP_TO_UART=y -CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF=y -CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32=y +CONFIG_ESP_COREDUMP_ENABLE_TO_UART=y +CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y +CONFIG_ESP_COREDUMP_CHECKSUM_CRC32=y