Skip to content

Commit

Permalink
Fix nrf-nrf52840dongle-light build (#17212)
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 authored and pull[bot] committed Feb 6, 2024
1 parent 9866bec commit 4412467
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 9 additions & 5 deletions scripts/build/builders/nrf.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,21 +144,25 @@ def generate(self):

raise Exception('ZEPHYR_BASE validation failed')

overlays = []
flags = []
if self.enable_rpcs:
overlays.append("-DOVERLAY_CONFIG=rpc.overlay")
flags.append("-DOVERLAY_CONFIG=rpc.overlay")

if self.board == NrfBoard.NRF52840DONGLE:
flags.append("-DCONF_FILE=prj_no_dfu.conf")

build_flags = " -- " + " ".join(flags) if len(flags) > 0 else ""

cmd = '''
source "$ZEPHYR_BASE/zephyr-env.sh";
export GNUARMEMB_TOOLCHAIN_PATH="$PW_ARM_CIPD_INSTALL_DIR";
west build --cmake-only -d {outdir} -b {board} {sourcedir}{overlayflags}
west build --cmake-only -d {outdir} -b {board} {sourcedir}{build_flags}
'''.format(
outdir=shlex.quote(self.output_dir),
board=self.board.GnArgName(),
sourcedir=shlex.quote(os.path.join(
self.root, self.app.AppPath(), 'nrfconnect')),
overlayflags=" -- " +
" ".join(overlays) if len(overlays) > 0 else ""
build_flags=build_flags
).strip()
self._Execute(['bash', '-c', cmd],
title='Generating ' + self.identifier)
Expand Down
2 changes: 1 addition & 1 deletion scripts/build/testdata/build_all_except_host.txt
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ west build --cmake-only -d {out}/nrf-nrf52840dk-shell -b nrf52840dk_nrf52840 {ro
# Generating nrf-nrf52840dongle-light
bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh";
export GNUARMEMB_TOOLCHAIN_PATH="$PW_ARM_CIPD_INSTALL_DIR";
west build --cmake-only -d {out}/nrf-nrf52840dongle-light -b nrf52840dongle_nrf52840 {root}/examples/lighting-app/nrfconnect'
west build --cmake-only -d {out}/nrf-nrf52840dongle-light -b nrf52840dongle_nrf52840 {root}/examples/lighting-app/nrfconnect -- -DCONF_FILE=prj_no_dfu.conf'

# Generating nrf-nrf5340dk-light
bash -c 'source "$ZEPHYR_BASE/zephyr-env.sh";
Expand Down

0 comments on commit 4412467

Please sign in to comment.