From 00f2e33008206e2ca39eb07f916931d89830b880 Mon Sep 17 00:00:00 2001 From: Konstantin Kondrashov Date: Wed, 20 Mar 2024 21:50:55 +0200 Subject: [PATCH] fix(esp_system): Fix build when ANTI_ROLLBACK=y and PANIC_SILENT_REBOOT=y Fix a case when two options are set as CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK=y CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT=y Closes https://github.com/espressif/esp-idf/issues/13417 --- components/esp_system/CMakeLists.txt | 2 +- tools/test_apps/system/build_test/partitions.csv | 6 ++++++ .../sdkconfig.ci.panic_silent_reboot_anti_rollback | 8 ++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 tools/test_apps/system/build_test/partitions.csv create mode 100644 tools/test_apps/system/build_test/sdkconfig.ci.panic_silent_reboot_anti_rollback diff --git a/components/esp_system/CMakeLists.txt b/components/esp_system/CMakeLists.txt index c63a27df0b..1be7b4fdcf 100644 --- a/components/esp_system/CMakeLists.txt +++ b/components/esp_system/CMakeLists.txt @@ -114,7 +114,7 @@ endif() # need to introduce panic "event" concept to remove this dependency (IDF-2194) idf_component_optional_requires(PRIVATE esp_gdbstub) -if(NOT CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT) +if(NOT CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT OR CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK) idf_component_optional_requires(PRIVATE esp_app_format) endif() diff --git a/tools/test_apps/system/build_test/partitions.csv b/tools/test_apps/system/build_test/partitions.csv new file mode 100644 index 0000000000..ea6778949a --- /dev/null +++ b/tools/test_apps/system/build_test/partitions.csv @@ -0,0 +1,6 @@ +# Name, Type, SubType, Offset, Size, Flags +nvs, data, nvs, 0xA000, 0x4000, +otadata, data, ota, 0xE000, 0x2000, +ota_0, app, ota_0, , 1M, +ota_1, app, ota_1, , 1M, +nvs_key, data, nvs_keys, , 4K, diff --git a/tools/test_apps/system/build_test/sdkconfig.ci.panic_silent_reboot_anti_rollback b/tools/test_apps/system/build_test/sdkconfig.ci.panic_silent_reboot_anti_rollback new file mode 100644 index 0000000000..a82fff43b9 --- /dev/null +++ b/tools/test_apps/system/build_test/sdkconfig.ci.panic_silent_reboot_anti_rollback @@ -0,0 +1,8 @@ +CONFIG_IDF_TARGET="esp32" +CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y +CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y +CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK=y +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_OFFSET=0x9000 +CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT=y