From 3d77e95b119cf8839416398e2826f5da3f609eff Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 16 Mar 2026 15:47:32 -1000 Subject: [PATCH] merge --- esphome/core/application.cpp | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/esphome/core/application.cpp b/esphome/core/application.cpp index 225e22a06f..ca6c203b18 100644 --- a/esphome/core/application.cpp +++ b/esphome/core/application.cpp @@ -9,14 +9,9 @@ #endif #ifdef USE_ESP32 #include -#if defined(USE_ESP32_FRAMEWORK_ESP_IDF) -#include -#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 2, 0) #include #include #endif -#endif -#endif #ifdef USE_LWIP_FAST_SELECT #include "esphome/core/lwip_fast_select.h" #ifdef USE_ESP32 @@ -246,18 +241,19 @@ void Application::process_dump_config_() { chip_info.revision % 100, chip_info.cores); static const char *const ESP32_ADVANCED_PATH = "under esp32 > framework > advanced"; #if defined(USE_ESP32_VARIANT_ESP32) && !defined(USE_ESP32_MIN_CHIP_REVISION_SET) - // Suggest optimization for chips that don't need the PSRAM cache workaround - if (chip_info.revision >= 300) { + { + // Suggest optimization for chips that don't need the PSRAM cache workaround + if (chip_info.revision >= 300) { #ifdef USE_PSRAM - ESP_LOGW(TAG, "Chip rev >= 3.0 detected. Set minimum_chip_revision: \"%d.%d\" %s to save ~10KB IRAM", - chip_info.revision / 100, chip_info.revision % 100, ESP32_ADVANCED_PATH); + ESP_LOGW(TAG, "Chip rev >= 3.0 detected. Set minimum_chip_revision: \"%d.%d\" %s to save ~10KB IRAM", + chip_info.revision / 100, chip_info.revision % 100, ESP32_ADVANCED_PATH); #else - ESP_LOGW(TAG, "Chip rev >= 3.0 detected. Set minimum_chip_revision: \"%d.%d\" %s to reduce binary size", - chip_info.revision / 100, chip_info.revision % 100, ESP32_ADVANCED_PATH); + ESP_LOGW(TAG, "Chip rev >= 3.0 detected. Set minimum_chip_revision: \"%d.%d\" %s to reduce binary size", + chip_info.revision / 100, chip_info.revision % 100, ESP32_ADVANCED_PATH); #endif + } } #endif -#if defined(USE_ESP32_FRAMEWORK_ESP_IDF) && ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 2, 0) { // esp_bootloader_desc_t is available in ESP-IDF >= 5.2; if readable the bootloader is modern. // @@ -270,8 +266,12 @@ void Application::process_dump_config_() { // Two flashes is a better outcome than a bricked device. esp_bootloader_desc_t boot_desc; if (esp_ota_get_bootloader_description(nullptr, &boot_desc) != ESP_OK) { +#ifdef USE_ESP32_VARIANT_ESP32 ESP_LOGW(TAG, "Bootloader too old for OTA rollback and SRAM1 as IRAM (+40KB). " "Flash via USB once to update the bootloader"); +#else + ESP_LOGW(TAG, "Bootloader too old for OTA rollback. Flash via USB once to update the bootloader"); +#endif } #if defined(USE_ESP32_VARIANT_ESP32) && !defined(USE_ESP32_SRAM1_AS_IRAM) else { @@ -279,8 +279,7 @@ void Application::process_dump_config_() { } #endif } -#endif -#endif +#endif // USE_ESP32 } this->components_[this->dump_config_at_]->call_dump_config_();