Drop the temporary IDF 6.1 pins, guard the V2 block on the IDF version, cover V2 with a logger test pinned to 6.1.0

This commit is contained in:
J. Nick Koston
2026-10-02 08:31:10 -05:00
parent 003698970e
commit e217df8d41
4 changed files with 17 additions and 27 deletions
+3 -22
View File
@@ -938,10 +938,6 @@ def _format_framework_pio_espidf_version(
) -> str:
# format the given espidf (https://github.com/pioarduino/esp-idf/releases) version to
# a PIO platformio/framework-espidf value
# TEMP: pioarduino has no 6.1 package yet; pioarduino-style repack of
# espressif v6.1. Remove before merge.
if ver == cv.Version(6, 1, 0):
return "pioarduino/framework-espidf@https://github.com/bdraco/esp-idf/releases/download/v6.1.0/esp-idf-v6.1.0.tar.xz"
if ver == cv.Version(5, 4, 3) or ver >= cv.Version(5, 5, 1):
ext = "tar.xz"
else:
@@ -1034,19 +1030,12 @@ ARDUINO_IDF_VERSION_LOOKUP = {
# The default/recommended esp-idf framework version
# - https://github.com/espressif/esp-idf/releases
ESP_IDF_FRAMEWORK_VERSION_LOOKUP = {
# TEMP: default to 6.1.0 for CI testing of Log V2; revert to 5.5.5 before merge
"recommended": cv.Version(6, 1, 0),
"latest": cv.Version(6, 1, 0),
"dev": cv.Version(6, 1, 0),
"recommended": cv.Version(5, 5, 5),
"latest": cv.Version(5, 5, 5),
"dev": cv.Version(5, 5, 5),
}
ESP_IDF_PLATFORM_VERSION_LOOKUP = {
# TEMP: prep_IDF6 plus the IDF 6.1 fixes (deps, bootloader ld, --wrap,
# tf-psa sublibs); only 6.1 has the Log V2 defines. Remove with the 6.1
# default once pioarduino publishes 6.1 support.
cv.Version(
6, 1, 0
): "https://github.com/bdraco/platform-espressif32.git#idf61-test",
cv.Version(
6, 0, 1
): "https://github.com/pioarduino/platform-espressif32.git#prep_IDF6",
@@ -1142,14 +1131,6 @@ def _check_pio_versions(config: ConfigType) -> ConfigType:
version = _resolve_framework_version(value)
# TEMP: named versions take the platform from PLATFORM_VERSION_LOOKUP
# above, bypassing the per-IDF-version lookup; force the IDF 6 platform
# without disturbing Arduino (still on 5.5.5). Remove with the 6.1 default.
if value[CONF_TYPE] != FRAMEWORK_ARDUINO and version == cv.Version(6, 1, 0):
value[CONF_PLATFORM_VERSION] = _parse_pio_platform_version(
ESP_IDF_PLATFORM_VERSION_LOOKUP[version]
)
if value[CONF_TYPE] == FRAMEWORK_ARDUINO:
platform_lookup = ARDUINO_PLATFORM_VERSION_LOOKUP.get(version)
value[CONF_SOURCE] = value.get(
+4 -2
View File
@@ -164,7 +164,9 @@ const LogString *Logger::get_uart_selection_() {
} // namespace esphome::logger
#ifdef USE_ESP32_LOG_V2
// The version guard keeps builds that define USE_ESP32_LOG_V2 unconditionally (static analysis) off
// IDF private headers that only 6.1 has
#if defined(USE_ESP32_LOG_V2) && ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(6, 1, 0)
#include <esp_private/log_message.h>
#include <esp_log_write.h>
#include <esp_rom_sys.h>
@@ -222,5 +224,5 @@ void __wrap_esp_log_format(esp_log_msg_t *message) { // NOLINT
esp_log_vprint_func(message->format, message->args);
}
} // extern "C"
#endif // USE_ESP32_LOG_V2
#endif // USE_ESP32_LOG_V2 && IDF >= 6.1
#endif
+2 -3
View File
@@ -181,10 +181,9 @@ extra_scripts =
; This are common settings for the ESP32 (all variants) using IDF.
[common:esp32-idf]
extends = common:idf
; TEMP: IDF 6.1 for Log V2 CI testing; revert to 55.03.311 / v5.5.5 before merge
platform = https://github.com/bdraco/platform-espressif32.git#idf61-test
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.312/platform-espressif32.zip
platform_packages =
pioarduino/framework-espidf@https://github.com/bdraco/esp-idf/releases/download/v6.1.0/esp-idf-v6.1.0.tar.xz
pioarduino/framework-espidf@https://github.com/pioarduino/esp-idf/releases/download/v5.5.5/esp-idf-v5.5.5.tar.xz
framework = espidf
lib_deps =
@@ -0,0 +1,8 @@
packages:
logger: !include common-default_uart.yaml
# IDF 6.1 is where Log V2 and the esp_log_format wrap are enabled; the default IDF has no V2
esp32:
framework:
type: esp-idf
version: 6.1.0