Skip to content

Commit 0702e9b

Browse files
committed
Workaround for slc errors for efr32
1 parent 8d5dc83 commit 0702e9b

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

third_party/silabs/slc_gen/run_slc.py

+15-4
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,22 @@ def isMG26(partnumber):
6363
# If no gsdk path is set in the environment, use the standard path to the submodule
6464
sisdk_root = os.path.join(root_path, "third_party/silabs/simplicity_sdk/")
6565

66-
# make sure we have a configured and trusted gsdk in slc
67-
subprocess.run(["slc", "configuration", "--sdk", sisdk_root], check=True)
68-
subprocess.run(["slc", "signature", "trust", "--sdk", sisdk_root], check=True)
66+
# SLC needs to run the system python, so we force PATH to have /usr/bin in front
67+
# This is a workaround for CI builds failing with an odd `jinja2` module error when
68+
# leaving the default paths enabled
69+
cmds = f"""
70+
set -ex
71+
72+
export PATH="/usr/bin:$PATH"
73+
74+
slc configuration --sdk '{sisdk_root}'
75+
slc signature trust --sdk '{sisdk_root}'
76+
slc generate '{slcp_file_path}' -d '{output_path}' --with '{slc_arguments}'
77+
""".strip()
6978

70-
subprocess.run(["slc", "generate", slcp_file_path, "-d", output_path, "--with", slc_arguments], check=True)
79+
80+
# make sure we have a configured and trusted gsdk in slc
81+
subprocess.run(["bash", "-c", cmds], check=True)
7182

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

0 commit comments

Comments
 (0)