Skip to content

Commit 875448a

Browse files
[nrf noup] scripts: west_commands: runners: nrf: workarounds for SDFW v8.0.0
SDFW v8.0.0 introduces certain changes that require matching changes in nrfutil device to ensure that west flash works properly on nrf54h20dk and nrf9280pdk. This commit adds a few temporary workarounds to ensure that west flash works with an older nrfutil device version as well: 1. Don't erase UICR, as this tries to erase the extended UICR regions as well, and those regions no longer exist (resulting in an error). 2. Do a RESET_VIA_SECDOM reset before programming firmware. This ensures that all the cores are stopped before writing firmware. Removing the UICR erase step seemed to cause some instability when programming, which is suspected to be caused by the firmware running while programming. Signed-off-by: Jonathan Nilsen <[email protected]>
1 parent 0ae992e commit 875448a

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

scripts/west_commands/runners/nrf_common.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,9 @@ def program_hex(self):
270270
self.build_conf.getboolean('CONFIG_SOC_NRF9280_CPURAD')
271271
)
272272

273+
# Ensure that firmware is not executing while erasing/programming
274+
self.exec_op("reset", option="RESET_VIA_SECDOM")
275+
273276
if self.erase:
274277
self.exec_op('erase', core='NRFDL_DEVICE_CORE_APPLICATION')
275278
self.exec_op('erase', core='NRFDL_DEVICE_CORE_NETWORK')
@@ -298,16 +301,8 @@ def program_hex(self):
298301
self.op_program(app_root_envelope_hex_file, 'ERASE_NONE', None, defer=True, core='NRFDL_DEVICE_CORE_APPLICATION')
299302

300303
if cpuapp:
301-
if not self.erase and self.build_conf.getboolean('CONFIG_NRF_REGTOOL_GENERATE_UICR'):
302-
self.exec_op('erase', core='NRFDL_DEVICE_CORE_APPLICATION',
303-
option={'chip_erase_mode': 'ERASE_UICR',
304-
'qspi_erase_mode': 'ERASE_NONE'})
305304
core = 'NRFDL_DEVICE_CORE_APPLICATION'
306305
elif cpurad:
307-
if not self.erase and self.build_conf.getboolean('CONFIG_NRF_REGTOOL_GENERATE_UICR'):
308-
self.exec_op('erase', core='NRFDL_DEVICE_CORE_NETWORK',
309-
option={'chip_erase_mode': 'ERASE_UICR',
310-
'qspi_erase_mode': 'ERASE_NONE'})
311306
core = 'NRFDL_DEVICE_CORE_NETWORK'
312307
else:
313308
if self.erase:

0 commit comments

Comments
 (0)