Skip to content

Commit

Permalink
[NXP] Unset ZEPHYR_TOOLCHAIN_VARIANT using the shell commands
Browse files Browse the repository at this point in the history
To be able to track shell commands needed to build an example with
`--dry-run`, any environment manipulation shall be done with shell
commands and not using Python specific commands.
  • Loading branch information
axelnxp committed Sep 17, 2024
1 parent e73249c commit e5b9d69
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions scripts/build/builders/nxp.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,9 @@ def generate(self):
if 'ZEPHYR_NXP_BASE' not in os.environ:
raise Exception("ZEPHYR_NXP_BASE need to be set")

if 'ZEPHYR_TOOLCHAIN_VARIANT' in os.environ:
del os.environ['ZEPHYR_TOOLCHAIN_VARIANT']

cmd = 'export ZEPHYR_SDK_INSTALL_DIR="$ZEPHYR_NXP_SDK_INSTALL_DIR"'
cmd += '\nexport ZEPHYR_BASE="$ZEPHYR_NXP_BASE"'
cmd += '\nunset ZEPHYR_TOOLCHAIN_VARIANT'

cmd += '\nwest build -p --cmake-only -b {board_name} -d {out_folder} {example_folder}{build_args}'.format(
board_name=self.board.Name(self.os_env),
Expand Down

0 comments on commit e5b9d69

Please sign in to comment.