Skip to content

Commit 4fecad4

Browse files
carlescufinashif
authored andcommitted
scripts: runners: nrf_common: Fix recover on 54H20
In order for the --recover option to work properly on the nRF54H20, it requires executing it for both cores, the radio and the application one. Extend the recover_target() function so that it does so for both 53 and 54H20. Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
1 parent 71c4526 commit 4fecad4

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

scripts/west_commands/runners/nrf_common.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -229,19 +229,20 @@ def flush(self, force=False):
229229

230230

231231
def recover_target(self):
232-
if self.family == 'NRF53_FAMILY':
232+
if self.family in ('NRF53_FAMILY', 'NRF54H_FAMILY'):
233233
self.logger.info(
234234
'Recovering and erasing flash memory for both the network '
235235
'and application cores.')
236236
else:
237237
self.logger.info('Recovering and erasing all flash memory.')
238238

239-
# The network core needs to be recovered first due to the fact that
240-
# recovering it erases the flash of *both* cores. Since a recover
241-
# operation unlocks the core and then flashes a small image that keeps
242-
# the debug access port open, recovering the network core last would
243-
# result in that small image being deleted from the app core.
244-
if self.family == 'NRF53_FAMILY':
239+
# The network core of the nRF53 needs to be recovered first due to the
240+
# fact that recovering it erases the flash of *both* cores. Since a
241+
# recover operation unlocks the core and then flashes a small image that
242+
# keeps the debug access port open, recovering the network core last
243+
# would result in that small image being deleted from the app core.
244+
# In the case of the 54H, the order is indifferent.
245+
if self.family in ('NRF53_FAMILY', 'NRF54H_FAMILY'):
245246
self.exec_op('recover', core='NRFDL_DEVICE_CORE_NETWORK')
246247

247248
self.exec_op('recover')

0 commit comments

Comments
 (0)