Skip to content

Commit

Permalink
Sync Zephyr package with the latest changes
Browse files Browse the repository at this point in the history
Resolves #16
  • Loading branch information
valeros committed Jan 31, 2025
1 parent 95eb2b4 commit 8689b04
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"type": "framework",
"optional": true,
"owner": "platformio",
"version": "~2.40000.0"
"version": "~3.40000.0"
},
"tool-openocd": {
"type": "debugger",
Expand Down
30 changes: 20 additions & 10 deletions platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,26 @@ def install_package(self, name, *args, **kwargs):
if name != "framework-zephyr":
return pkg

if not os.path.isfile(os.path.join(pkg.path, "_pio", "state.json")):
self.pm.log.info("Installing Zephyr project dependencies...")
try:
subprocess.run([
os.path.normpath(sys.executable),
os.path.join(pkg.path, "scripts", "platformio", "install-deps.py"),
"--platform", self.name
])
except subprocess.CalledProcessError:
self.pm.log.info("Failed to install Zephyr dependencies!")
prj_west_manifest = os.path.join(get_project_dir(), "west.yml")
try:
(
subprocess.run(
[
os.path.normpath(sys.executable),
os.path.join(
pkg.path, "scripts", "platformio", "install-deps.py"
),
"--platform",
self.name,
] + (
["--manifest", prj_west_manifest]
if os.path.isfile(prj_west_manifest)
else []
)
)
)
except subprocess.CalledProcessError:
self.pm.log.info("Failed to install Zephyr dependencies!")

return pkg

Expand Down

0 comments on commit 8689b04

Please sign in to comment.