diff --git a/scripts/west_commands/runners/nrf_common.py b/scripts/west_commands/runners/nrf_common.py index e6576ca2455..55ff3741aa9 100644 --- a/scripts/west_commands/runners/nrf_common.py +++ b/scripts/west_commands/runners/nrf_common.py @@ -390,8 +390,7 @@ class NrfBinaryRunner(ZephyrBinaryRunner): ) if not self.erase and generated_uicr: - self.exec_op('erase', core=core, option={'chip_erase_mode': 'ERASE_UICR', - 'ext_mem_erase_mode': 'ERASE_NONE'}) + self.exec_op('erase', core=core, kind='uicr') else: if self.erase: erase_arg = 'ERASE_ALL' diff --git a/scripts/west_commands/runners/nrfjprog.py b/scripts/west_commands/runners/nrfjprog.py index f8f1a404520..941a6d18f55 100644 --- a/scripts/west_commands/runners/nrfjprog.py +++ b/scripts/west_commands/runners/nrfjprog.py @@ -106,6 +106,8 @@ class NrfJprogBinaryRunner(NrfBinaryRunner): cmd.append('--reset') if _op['kind'] == 'RESET_PIN': cmd.append('--pinreset') + elif op_type == 'erase': + cmd.append(f'--erase{_op["kind"]}') else: raise RuntimeError(f'Invalid operation: {op_type}') diff --git a/scripts/west_commands/runners/nrfutil.py b/scripts/west_commands/runners/nrfutil.py index a943c3ddd4f..e9c27c9ed16 100644 --- a/scripts/west_commands/runners/nrfutil.py +++ b/scripts/west_commands/runners/nrfutil.py @@ -121,8 +121,7 @@ class NrfUtilBinaryRunner(NrfBinaryRunner): elif op_type == 'reset': cmd += ['--reset-kind', _op['kind']] elif op_type == 'erase': - cmd += ['--reset-kind', _op['kind']] - + cmd.append(f'--{_op["kind"]}') cmd += ['--core', op['core']] if op.get('core') else [] cmd += ['--x-family', f'{self.family}']