mirror of
https://github.com/esphome/esphome.git
synced 2026-05-23 22:40:46 +08:00
[esp8266] Pin tool-esptoolpy to 5.x to match ESP32 platform
The platform-espressif8266 4.2.1 platform manifest pins tool-esptoolpy to ~1.30000.0, while the pioarduino ESP32 platform uses 5.2.0. Because PlatformIO stores tool-esptoolpy in a single shared package directory, switching between esp8266 and esp32 builds forces PlatformIO to uninstall and reinstall the package every time. Override the pin on the ESP8266 side to the same pioarduino 5.2.0 build so both platforms resolve to the same installed package. ESPHome already invokes its own Python esptool 5.2.0 for uploads, and modern esptool still accepts the legacy underscore CLI flags used by the ESP8266 platform's builder scripts.
This commit is contained in:
@@ -264,7 +264,14 @@ async def to_code(config):
|
||||
cg.add_platformio_option("platform", conf[CONF_PLATFORM_VERSION])
|
||||
cg.add_platformio_option(
|
||||
"platform_packages",
|
||||
[f"platformio/framework-arduinoespressif8266@{conf[CONF_SOURCE]}"],
|
||||
[
|
||||
f"platformio/framework-arduinoespressif8266@{conf[CONF_SOURCE]}",
|
||||
# Override the ancient tool-esptoolpy ~1.30000.0 pinned by
|
||||
# platform-espressif8266 4.2.1 with the same 5.x build the
|
||||
# pioarduino ESP32 platform uses, so both platforms share the
|
||||
# same installed package and stop reinstalling on every switch.
|
||||
"pioarduino/tool-esptoolpy@https://github.com/pioarduino/registry/releases/download/0.0.1/esptoolpy-v5.2.0.zip",
|
||||
],
|
||||
)
|
||||
|
||||
# Default for platformio is LWIP2_LOW_MEMORY with:
|
||||
|
||||
Reference in New Issue
Block a user