From 5796ff847fd8ba2ef90c4ff4f2b33c2d996a59e0 Mon Sep 17 00:00:00 2001 From: Kamil Kasperczyk <66371704+kkasperczyk-no@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:37:37 +0200 Subject: [PATCH] [nrfconnect] Fixed nrfconnect flashing after NCS 2.7.0 update (#34480) The flashing script used by cloudbuild stopped to work after NCS update to 2.7.0, due to the path and files location changes. --- config/nrfconnect/app/flashing.cmake | 4 ++-- scripts/build/builders/nrf.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) 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):