Skip to content

Commit

Permalink
Use generic GCC toolchain for mbed and zephyr frameworks
Browse files Browse the repository at this point in the history
  • Loading branch information
valeros committed Apr 5, 2023
1 parent a3b37f7 commit 525598d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
6 changes: 6 additions & 0 deletions platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
12 changes: 7 additions & 5 deletions platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 525598d

Please sign in to comment.