From 525598dfdaafd4e3a93769f1e9120a4439112048 Mon Sep 17 00:00:00 2001 From: Valerii Koval Date: Wed, 5 Apr 2023 19:46:07 +0300 Subject: [PATCH] Use generic GCC toolchain for mbed and zephyr frameworks --- platform.json | 6 ++++++ platform.py | 12 +++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/platform.json b/platform.json index 315218f..1c378d9 100644 --- a/platform.json +++ b/platform.json @@ -42,6 +42,12 @@ "version": "~1.50400.0", "optionalVersions": [">=1.60301.0,<1.80000.0"] }, + "toolchain-gccarmnoneeabi": { + "type": "toolchain", + "optional": true, + "owner": "platformio", + "version": "~1.80201.0" + }, "toolchain-gccarmnoneeabi-teensy": { "type": "toolchain", "optional": false, diff --git a/platform.py b/platform.py index 1e04d35..b85b655 100644 --- a/platform.py +++ b/platform.py @@ -32,16 +32,18 @@ def configure_default_packages(self, variables, targets): del self.packages[del_toolchain] frameworks = variables.get("pioframework", []) - if "mbed" in frameworks: - self.packages["toolchain-gccarmnoneeabi"][ - "version"] = ">=1.60301.0,<1.80000.0" - elif "zephyr" in frameworks: + if "arduino" in frameworks: + self.packages.pop("toolchain-gccarmnoneeabi", None) + else: + self.packages["toolchain-gccarmnoneeabi"]["optional"] = False + self.packages.pop("toolchain-gccarmnoneeabi-teensy", None) + + if "zephyr" in frameworks: for p in self.packages: if p in ("tool-cmake", "tool-dtc", "tool-ninja"): self.packages[p]["optional"] = False if not IS_WINDOWS: self.packages["tool-gperf"]["optional"] = False - self.packages["toolchain-gccarmnoneeabi"]["version"] = "~1.80201.0" elif "arduino" in frameworks and board_config.get("build.core", "") == "teensy4": self.packages["tool-teensy"]["optional"] = False