From 5542d6119831adb163917e884b58b9f681907c10 Mon Sep 17 00:00:00 2001 From: Jonathan Nilsen Date: Sat, 14 Dec 2024 15:32:28 +0100 Subject: [PATCH] Revert "[nrf noup] scripts: west_commands: runners: nrf: workarounds for SDFW v8.0.0" No longer needed with SDFW v9.0.0 and more recent nrfutil device versions. This reverts commit f3e33c4fe7a4982b163df508ceca2dd476ebe3bd. Signed-off-by: Jonathan Nilsen --- scripts/west_commands/runners/nrf_common.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/west_commands/runners/nrf_common.py b/scripts/west_commands/runners/nrf_common.py index 67634132408..1479f254ac1 100644 --- a/scripts/west_commands/runners/nrf_common.py +++ b/scripts/west_commands/runners/nrf_common.py @@ -270,11 +270,6 @@ def program_hex(self): if self.erase: self.exec_op('erase', core='NRFDL_DEVICE_CORE_APPLICATION') self.exec_op('erase', core='NRFDL_DEVICE_CORE_NETWORK') - # A reset is needed if repartitioning the device memory - self.reset_target() - else: - # Ensure that firmware is not executing while erasing/programming - self.exec_op("reset", option="RESET_VIA_SECDOM") # Manage SUIT artifacts. # This logic should be executed only once per build. @@ -326,8 +321,16 @@ def program_hex(self): ) if cpuapp: + if not self.erase and self.build_conf.getboolean('CONFIG_NRF_REGTOOL_GENERATE_UICR'): + self.exec_op('erase', core='NRFDL_DEVICE_CORE_APPLICATION', + option={'chip_erase_mode': 'ERASE_UICR', + 'qspi_erase_mode': 'ERASE_NONE'}) core = 'NRFDL_DEVICE_CORE_APPLICATION' elif cpurad: + if not self.erase and self.build_conf.getboolean('CONFIG_NRF_REGTOOL_GENERATE_UICR'): + self.exec_op('erase', core='NRFDL_DEVICE_CORE_NETWORK', + option={'chip_erase_mode': 'ERASE_UICR', + 'qspi_erase_mode': 'ERASE_NONE'}) core = 'NRFDL_DEVICE_CORE_NETWORK' else: if self.erase: