diff --git a/scripts/build/builders/nrf.py b/scripts/build/builders/nrf.py index b2a89f3d690453..4bfb80961ab8e6 100644 --- a/scripts/build/builders/nrf.py +++ b/scripts/build/builders/nrf.py @@ -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) diff --git a/scripts/build/testdata/build_all_except_host.txt b/scripts/build/testdata/build_all_except_host.txt index 81ae8a8de857b0..47f3ad2bcc53ad 100644 --- a/scripts/build/testdata/build_all_except_host.txt +++ b/scripts/build/testdata/build_all_except_host.txt @@ -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";