Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nrf-nrf52840dongle-light build #17212

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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