diff --git a/scripts/build/builders/efr32.py b/scripts/build/builders/efr32.py index f4aa05fc762842..d4eb7bfa0870d8 100644 --- a/scripts/build/builders/efr32.py +++ b/scripts/build/builders/efr32.py @@ -218,6 +218,12 @@ def __init__(self, self.extra_gn_options.append( 'sl_matter_version_str="v1.0-%s-%s"' % (branchName, shortCommitSha)) + if "GSDK_ROOT" in os.environ: + # EFR32 SDK is very large. If the SDK path is already known (the + # case for pre-installed images), use it directly. + sdk_path = shlex.quote(os.environ['GSDK_ROOT']) + self.extra_gn_options.append(f"efr32_sdk_root=\"{sdk_path}\"") + def GnBuildArgs(self): return self.extra_gn_options