mirror of
https://github.com/esphome/esphome.git
synced 2026-07-11 01:15:33 +00:00
merge
This commit is contained in:
@@ -9,14 +9,9 @@
|
||||
#endif
|
||||
#ifdef USE_ESP32
|
||||
#include <esp_chip_info.h>
|
||||
#if defined(USE_ESP32_FRAMEWORK_ESP_IDF)
|
||||
#include <esp_idf_version.h>
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 2, 0)
|
||||
#include <esp_ota_ops.h>
|
||||
#include <esp_bootloader_desc.h>
|
||||
#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_();
|
||||
|
||||
Reference in New Issue
Block a user