Skip to content

Commit

Permalink
use environment variables for EFR SDK root (project-chip#25730)
Browse files Browse the repository at this point in the history
* Use efr32 sdk root if available for building efr examples

* Add a comment

* Fix typo

* Add shell escape

* Use shell escape for the sdk root

* Restyle

---------

Co-authored-by: Andrei Litvin <andreilitvin@google.com>
  • Loading branch information
andy31415 and andreilitvin authored Mar 18, 2023
1 parent 8caa797 commit c5458d9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/build/builders/efr32.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit c5458d9

Please sign in to comment.