Update toolchain packages for IDF integration

Issue #1360
This commit is contained in:
valeros
2024-04-23 16:43:58 +03:00
parent 77f8fc2ff4
commit 89dbe707cd
3 changed files with 41 additions and 18 deletions
+14 -2
View File
@@ -58,11 +58,23 @@ mcu = board.get("build.mcu", "esp32")
idf_variant = mcu.lower()
# Required until Arduino switches to v5
IDF5 = platform.get_package_version("framework-espidf").split(".")[1].startswith("5")
IDF5 = (
platform.get_package_version("framework-espidf")
.split(".")[1]
.startswith("5")
)
IDF_ENV_VERSION = "1.0.0"
FRAMEWORK_DIR = platform.get_package_dir("framework-espidf")
TOOLCHAIN_DIR = platform.get_package_dir(
"toolchain-%s" % ("riscv32-esp" if mcu in ("esp32c3", "esp32c6") else ("xtensa-%s" % mcu))
"toolchain-riscv32-esp"
if mcu in ("esp32c3", "esp32c6")
else (
(
"toolchain-xtensa-esp-elf"
if "arduino" not in env.subst("$PIOFRAMEWORK")
else "toolchain-xtensa-%s" % mcu
)
)
)
+9 -6
View File
@@ -33,22 +33,19 @@
"toolchain-xtensa-esp32": {
"type": "toolchain",
"owner": "espressif",
"version": "8.4.0+2021r2-patch5",
"optionalVersions": ["12.2.0+20230208"]
"version": "8.4.0+2021r2-patch5"
},
"toolchain-xtensa-esp32s2": {
"type": "toolchain",
"optional": true,
"owner": "espressif",
"version": "8.4.0+2021r2-patch5",
"optionalVersions": ["12.2.0+20230208"]
"version": "8.4.0+2021r2-patch5"
},
"toolchain-xtensa-esp32s3": {
"type": "toolchain",
"optional": true,
"owner": "espressif",
"version": "8.4.0+2021r2-patch5",
"optionalVersions": ["12.2.0+20230208"]
"version": "8.4.0+2021r2-patch5"
},
"toolchain-riscv32-esp": {
"type": "toolchain",
@@ -57,6 +54,12 @@
"version": "8.4.0+2021r2-patch5",
"optionalVersions": ["13.2.0+20230928"]
},
"toolchain-xtensa-esp-elf": {
"type": "toolchain",
"optional": true,
"owner": "platformio",
"version": "13.2.0+20230928"
},
"toolchain-esp32ulp": {
"type": "toolchain",
"optional": true,
+18 -10
View File
@@ -114,22 +114,30 @@ class Espressif32Platform(PlatformBase):
if "arduino" in frameworks:
# Downgrade the IDF version for mixed Arduino+IDF projects
self.packages["framework-espidf"]["version"] = "~3.40406.0"
# Delete the latest toolchain packages from config
self.packages.pop("toolchain-xtensa-esp-elf", None)
else:
# Use the latest toolchains available for IDF v5.0
# Disable old toolchain packages and use the latest
# available for IDF v5.0
for target in (
"xtensa-esp32",
"xtensa-esp32s2",
"xtensa-esp32s3",
"riscv32-esp",
):
self.packages["toolchain-%s" % target]["version"] = (
"13.2.0+20230928"
if target == "riscv32-esp"
else "12.2.0+20230208"
)
if target == "riscv32-esp":
# Pull the latest RISC-V toolchain from PlatformIO organization
self.packages["toolchain-%s" % target]["owner"] = "platformio"
self.packages.pop("toolchain-%s" % target, None)
if mcu in ("esp32c3", "esp32c6"):
self.packages.pop("toolchain-xtensa-esp-elf", None)
else:
self.packages["toolchain-xtensa-esp-elf"][
"optional"
] = False
# Pull the latest RISC-V toolchain from PlatformIO organization
self.packages["toolchain-riscv32-esp"]["owner"] = "platformio"
self.packages["toolchain-riscv32-esp"][
"version"
] = "13.2.0+20230928"
if "arduino" in frameworks:
# Disable standalone GDB packages for Arduino and Arduino/IDF projects