Skip to content

Commit 8689b04

Browse files
committed
Sync Zephyr package with the latest changes
Resolves #16
1 parent 95eb2b4 commit 8689b04

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

platform.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"type": "framework",
4949
"optional": true,
5050
"owner": "platformio",
51-
"version": "~2.40000.0"
51+
"version": "~3.40000.0"
5252
},
5353
"tool-openocd": {
5454
"type": "debugger",

platform.py

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,26 @@ def install_package(self, name, *args, **kwargs):
6868
if name != "framework-zephyr":
6969
return pkg
7070

71-
if not os.path.isfile(os.path.join(pkg.path, "_pio", "state.json")):
72-
self.pm.log.info("Installing Zephyr project dependencies...")
73-
try:
74-
subprocess.run([
75-
os.path.normpath(sys.executable),
76-
os.path.join(pkg.path, "scripts", "platformio", "install-deps.py"),
77-
"--platform", self.name
78-
])
79-
except subprocess.CalledProcessError:
80-
self.pm.log.info("Failed to install Zephyr dependencies!")
71+
prj_west_manifest = os.path.join(get_project_dir(), "west.yml")
72+
try:
73+
(
74+
subprocess.run(
75+
[
76+
os.path.normpath(sys.executable),
77+
os.path.join(
78+
pkg.path, "scripts", "platformio", "install-deps.py"
79+
),
80+
"--platform",
81+
self.name,
82+
] + (
83+
["--manifest", prj_west_manifest]
84+
if os.path.isfile(prj_west_manifest)
85+
else []
86+
)
87+
)
88+
)
89+
except subprocess.CalledProcessError:
90+
self.pm.log.info("Failed to install Zephyr dependencies!")
8191

8292
return pkg
8393

0 commit comments

Comments
 (0)