diff --git a/config/nrfconnect/app/flashing.cmake b/config/nrfconnect/app/flashing.cmake index c6c90ef0270986..578d47a7765c49 100644 --- a/config/nrfconnect/app/flashing.cmake +++ b/config/nrfconnect/app/flashing.cmake @@ -40,9 +40,9 @@ add_custom_command(OUTPUT "${FLASHBUNDLE_FLASHER_PLATFORM}" VERBATIM) if (merged_hex_to_flash) - set(flashbundle_hex_to_copy "zephyr/${merged_hex_to_flash}") + set(flashbundle_hex_to_copy "${merged_hex_to_flash}") else() - set(flashbundle_hex_to_copy "zephyr/${KERNEL_HEX_NAME}") + set(flashbundle_hex_to_copy "../merged.hex") endif() add_custom_command(OUTPUT "${FLASHBUNDLE_FIRMWARE}" diff --git a/scripts/build/builders/nrf.py b/scripts/build/builders/nrf.py index 567033e5fec200..6f650d23c7656a 100644 --- a/scripts/build/builders/nrf.py +++ b/scripts/build/builders/nrf.py @@ -224,16 +224,16 @@ def _build(self): def _bundle(self): logging.info(f'Generating flashbundle at {self.output_dir}') - self._Execute(['ninja', '-C', self.output_dir, 'flashing_script'], + self._Execute(['ninja', '-C', os.path.join(self.output_dir, 'nrfconnect'), 'flashing_script'], title='Generating flashable files of ' + self.identifier) def build_outputs(self): yield BuilderOutput( - os.path.join(self.output_dir, 'zephyr', 'zephyr.elf'), + os.path.join(self.output_dir, 'nrfconnect', 'zephyr', 'zephyr.elf'), '%s.elf' % self.app.AppNamePrefix()) if self.options.enable_link_map_file: yield BuilderOutput( - os.path.join(self.output_dir, 'zephyr', 'zephyr.map'), + os.path.join(self.output_dir, 'nrfconnect', 'zephyr', 'zephyr.map'), '%s.map' % self.app.AppNamePrefix()) def bundle_outputs(self):