scripts: west: runners: add initial nRF92 support
Add initial support flashing and erasing the application and radio cores of the nRF9280. Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
This commit is contained in:
parent
c0410e1a22
commit
b511704dd8
1 changed files with 12 additions and 7 deletions
|
@ -70,7 +70,7 @@ class NrfBinaryRunner(ZephyrBinaryRunner):
|
|||
def do_add_parser(cls, parser):
|
||||
parser.add_argument('--nrf-family',
|
||||
choices=['NRF51', 'NRF52', 'NRF53', 'NRF54L',
|
||||
'NRF54H', 'NRF91'],
|
||||
'NRF54H', 'NRF91', 'NRF92'],
|
||||
help='''MCU family; still accepted for
|
||||
compatibility only''')
|
||||
parser.add_argument('--softreset', required=False,
|
||||
|
@ -178,6 +178,8 @@ class NrfBinaryRunner(ZephyrBinaryRunner):
|
|||
self.family = 'NRF54H_FAMILY'
|
||||
elif self.build_conf.getboolean('CONFIG_SOC_SERIES_NRF91X'):
|
||||
self.family = 'NRF91_FAMILY'
|
||||
elif self.build_conf.getboolean('CONFIG_SOC_SERIES_NRF92X'):
|
||||
self.family = 'NRF92_FAMILY'
|
||||
else:
|
||||
raise RuntimeError(f'unknown nRF; update {__file__}')
|
||||
|
||||
|
@ -229,7 +231,7 @@ class NrfBinaryRunner(ZephyrBinaryRunner):
|
|||
|
||||
|
||||
def recover_target(self):
|
||||
if self.family in ('NRF53_FAMILY', 'NRF54H_FAMILY'):
|
||||
if self.family in ('NRF53_FAMILY', 'NRF54H_FAMILY', 'NRF92_FAMILY'):
|
||||
self.logger.info(
|
||||
'Recovering and erasing flash memory for both the network '
|
||||
'and application cores.')
|
||||
|
@ -242,7 +244,7 @@ class NrfBinaryRunner(ZephyrBinaryRunner):
|
|||
# keeps the debug access port open, recovering the network core last
|
||||
# would result in that small image being deleted from the app core.
|
||||
# In the case of the 54H, the order is indifferent.
|
||||
if self.family in ('NRF53_FAMILY', 'NRF54H_FAMILY'):
|
||||
if self.family in ('NRF53_FAMILY', 'NRF54H_FAMILY', 'NRF92_FAMILY'):
|
||||
self.exec_op('recover', core='NRFDL_DEVICE_CORE_NETWORK')
|
||||
|
||||
self.exec_op('recover')
|
||||
|
@ -254,9 +256,12 @@ class NrfBinaryRunner(ZephyrBinaryRunner):
|
|||
# What type of erase/core arguments should we pass to the tool?
|
||||
core = None
|
||||
|
||||
if self.family == 'NRF54H_FAMILY':
|
||||
if self.family in ('NRF54H_FAMILY', 'NRF92_FAMILY'):
|
||||
erase_arg = 'ERASE_NONE'
|
||||
|
||||
cpuapp = self.build_conf.getboolean('CONFIG_SOC_NRF54H20_CPUAPP') or self.build_conf.getboolean('CONFIG_SOC_NRF9280_CPUAPP')
|
||||
cpurad = self.build_conf.getboolean('CONFIG_SOC_NRF54H20_CPURAD') or self.build_conf.getboolean('CONFIG_SOC_NRF9280_CPURAD')
|
||||
|
||||
if self.erase:
|
||||
self.exec_op('erase', core='NRFDL_DEVICE_CORE_APPLICATION')
|
||||
self.exec_op('erase', core='NRFDL_DEVICE_CORE_NETWORK')
|
||||
|
@ -279,18 +284,18 @@ class NrfBinaryRunner(ZephyrBinaryRunner):
|
|||
# Handle SUIT root manifest if application manifests are not used.
|
||||
# If an application firmware is built, the root envelope is merged with other application manifests
|
||||
# as well as the output HEX file.
|
||||
if not self.build_conf.getboolean('CONFIG_SOC_NRF54H20_CPUAPP') and self.sysbuild_conf.get('SB_CONFIG_SUIT_ENVELOPE'):
|
||||
if not cpuapp and self.sysbuild_conf.get('SB_CONFIG_SUIT_ENVELOPE'):
|
||||
app_root_envelope_hex_file = os.fspath(
|
||||
mpi_hex_dir / 'suit_installed_envelopes_application_merged.hex')
|
||||
self.op_program(app_root_envelope_hex_file, 'ERASE_NONE', None, defer=True, core='NRFDL_DEVICE_CORE_APPLICATION')
|
||||
|
||||
if self.build_conf.getboolean('CONFIG_SOC_NRF54H20_CPUAPP'):
|
||||
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 self.build_conf.getboolean('CONFIG_SOC_NRF54H20_CPURAD'):
|
||||
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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue