diff --git a/platform.json b/platform.json index 8d356f834..394002553 100644 --- a/platform.json +++ b/platform.json @@ -90,9 +90,10 @@ }, "tool-esptoolpy": { "type": "uploader", - "optional": false, + "optional": true, "owner": "pioarduino", - "version": "https://github.com/pioarduino/esptool/releases/download/v5.0.0/esptool.zip" + "package-version": "5.0.0", + "version": "https://github.com/pioarduino/registry/releases/download/0.0.1/esptoolpy-v5.0.0.zip" }, "tl-install": { "type": "tool", diff --git a/platform.py b/platform.py index 8e3ba8db0..8ac632904 100644 --- a/platform.py +++ b/platform.py @@ -430,6 +430,10 @@ def _configure_installer(self) -> None: if os.path.exists(installer_path): self.packages["tl-install"]["optional"] = True + def _install_esptool_package(self) -> None: + """Install esptool package required for all builds.""" + self.install_tool("tool-esptoolpy") + def _install_common_idf_packages(self) -> None: """Install common ESP-IDF packages required for all builds.""" for package in COMMON_IDF_PACKAGES: @@ -534,6 +538,7 @@ def configure_default_packages(self, variables: Dict, targets: List[str]) -> Any try: # Configuration steps self._configure_installer() + self._install_esptool_package() self._configure_arduino_framework(frameworks) self._configure_espidf_framework(frameworks, variables, board_config, mcu) self._configure_mcu_toolchains(mcu, variables, targets)