Skip to content

Commit 322243a

Browse files
committed
scripts: fw build: add option to force Zephyr SDK build
Add a -z option that forces the script to use the Zephyr SDK even when proprietary compilers are installed. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
1 parent 97fbd99 commit 322243a

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

scripts/xtensa-build-zephyr.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,8 @@ def parse_args():
386386
help="Prints version of this script.")
387387
parser.add_argument("-m", "--menuconfig", required=False, action="store_true",
388388
help="Build menuconfig for target")
389+
parser.add_argument("-z", "--zephyrsdk", required=False, action="store_true",
390+
help="Force Build using Zephyr SDK for target")
389391

390392
args = parser.parse_args()
391393

@@ -824,7 +826,12 @@ def build_platforms():
824826
_dict = dataclasses.asdict(platform_configs[platform])
825827
platform_dict = { k:v for (k,v) in _dict.items() if _dict[k] is not None }
826828

827-
xtensa_tools_root_dir = os.getenv("XTENSA_TOOLS_ROOT")
829+
if args.zephyrsdk:
830+
print("Using Zephyr SDK for building")
831+
xtensa_tools_root_dir = None
832+
else:
833+
print("Using Xtensa tools for building")
834+
xtensa_tools_root_dir = os.getenv("XTENSA_TOOLS_ROOT")
828835
# when XTENSA_TOOLS_ROOT environmental variable is set,
829836
# use user installed Xtensa tools not Zephyr SDK
830837
if "XTENSA_TOOLS_VERSION" in platform_dict and xtensa_tools_root_dir:

0 commit comments

Comments
 (0)