diff --git a/esphome/components/esp32/__init__.py b/esphome/components/esp32/__init__.py index 9ce50bb07c..4685c006cb 100644 --- a/esphome/components/esp32/__init__.py +++ b/esphome/components/esp32/__init__.py @@ -854,9 +854,8 @@ 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; use a repack of espressif v6.1 - # built the same way (shallow recursive clone, docs removed, package.json added). - # Remove before merge once pioarduino publishes v6.1. + # 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): @@ -956,9 +955,12 @@ ESP_IDF_FRAMEWORK_VERSION_LOOKUP = { } 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/pioarduino/platform-espressif32.git#prep_IDF6", + ): "https://github.com/bdraco/platform-espressif32.git#idf61-test", cv.Version( 6, 0, 1 ): "https://github.com/pioarduino/platform-espressif32.git#prep_IDF6", @@ -1054,6 +1056,14 @@ 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( diff --git a/platformio.ini b/platformio.ini index 2db621d32c..c00fa06015 100644 --- a/platformio.ini +++ b/platformio.ini @@ -179,7 +179,7 @@ extra_scripts = [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/pioarduino/platform-espressif32.git#prep_IDF6 +platform = https://github.com/bdraco/platform-espressif32.git#idf61-test platform_packages = pioarduino/framework-espidf@https://github.com/bdraco/esp-idf/releases/download/v6.1.0/esp-idf-v6.1.0.tar.xz