Skip to content

Commit 0fe94cf

Browse files
committed
EFR32 slc call fix
1 parent 49b9767 commit 0fe94cf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

third_party/silabs/slc_gen/run_slc.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,11 @@ def isMG26(partnumber):
6666
# make sure we have a configured and trusted gsdk in slc
6767
subprocess.run(["slc", "configuration", "--sdk", sisdk_root], check=True)
6868
subprocess.run(["slc", "signature", "trust", "--sdk", sisdk_root], check=True)
69-
70-
subprocess.run(["slc", "generate", slcp_file_path, "-d", output_path, "--with", slc_arguments], check=True)
69+
# Use python defined in silabs sdk. I don't know why, but python called from venv by slc does not use `site-packages` installed in venv. This causes an error with missing `jinja2` module.
70+
env = os.environ.copy()
71+
env["PATH"] = "/opt/silabs/slc_cli/bin/slc-cli/developer/adapter_packs/python/bin" + os.pathsep + env["PATH"]
72+
print(env["PATH"])
73+
subprocess.run(["slc", "generate", slcp_file_path, "-d", output_path, "--with", slc_arguments], env=env, check=True)
7174

7275
# cleanup of unwanted files
7376
fileList = glob.glob(os.path.join(output_path, "matter-platform.*"))

0 commit comments

Comments
 (0)