|
35 | 35 | 'NRFDL_DEVICE_CORE_APPLICATION': (0x00FF8000, 0x00FF8800), |
36 | 36 | 'NRFDL_DEVICE_CORE_NETWORK': (0x01FF8000, 0x01FF8800), |
37 | 37 | }, |
| 38 | + 'NRF54H_FAMILY': { |
| 39 | + 'NRFDL_DEVICE_CORE_APPLICATION': (0x0FFF8000, 0x0FFF8800), |
| 40 | + 'NRFDL_DEVICE_CORE_NETWORK': (0x0FFFA000, 0x0FFFA800), |
| 41 | + }, |
38 | 42 | 'NRF91_FAMILY': { |
39 | 43 | 'NRFDL_DEVICE_CORE_APPLICATION': (0x00FF8000, 0x00FF8800), |
40 | | - } |
| 44 | + }, |
| 45 | + 'NRF92_FAMILY': { |
| 46 | + 'NRFDL_DEVICE_CORE_APPLICATION': (0x0FFF8000, 0x0FFF8800), |
| 47 | + 'NRFDL_DEVICE_CORE_NETWORK': (0x0FFFA000, 0x0FFFA800), |
| 48 | + }, |
41 | 49 | } |
42 | 50 |
|
43 | 51 | # Relative to the root of the hal_nordic module |
@@ -307,6 +315,19 @@ def program_hex(self): |
307 | 315 | self.build_conf.getboolean('CONFIG_SOC_NRF54H20_ENGB_CPURAD') or |
308 | 316 | self.build_conf.getboolean('CONFIG_SOC_NRF9280_CPURAD') |
309 | 317 | ) |
| 318 | + generated_uicr = self.build_conf.getboolean('CONFIG_NRF_REGTOOL_GENERATE_UICR') |
| 319 | + |
| 320 | + if cpuapp: |
| 321 | + core = 'NRFDL_DEVICE_CORE_APPLICATION' |
| 322 | + elif cpurad: |
| 323 | + core = 'NRFDL_DEVICE_CORE_NETWORK' |
| 324 | + |
| 325 | + if generated_uicr and not self.hex_get_uicrs().get(core): |
| 326 | + raise RuntimeError( |
| 327 | + f"Expected a UICR to be contained in: {self.hex_}\n" |
| 328 | + "Please ensure that the correct version of nrf-regtool is " |
| 329 | + "installed, then run 'west build --cmake' to try again." |
| 330 | + ) |
310 | 331 |
|
311 | 332 | if self.erase: |
312 | 333 | self.exec_op('erase', core='NRFDL_DEVICE_CORE_APPLICATION') |
@@ -335,18 +356,9 @@ def program_hex(self): |
335 | 356 | mpi_hex_dir / 'suit_installed_envelopes_application_merged.hex') |
336 | 357 | self.op_program(app_root_envelope_hex_file, 'ERASE_NONE', None, defer=True, core='NRFDL_DEVICE_CORE_APPLICATION') |
337 | 358 |
|
338 | | - if cpuapp: |
339 | | - if not self.erase and self.build_conf.getboolean('CONFIG_NRF_REGTOOL_GENERATE_UICR'): |
340 | | - self.exec_op('erase', core='NRFDL_DEVICE_CORE_APPLICATION', |
341 | | - option={'chip_erase_mode': 'ERASE_UICR', |
342 | | - 'qspi_erase_mode': 'ERASE_NONE'}) |
343 | | - core = 'NRFDL_DEVICE_CORE_APPLICATION' |
344 | | - elif cpurad: |
345 | | - if not self.erase and self.build_conf.getboolean('CONFIG_NRF_REGTOOL_GENERATE_UICR'): |
346 | | - self.exec_op('erase', core='NRFDL_DEVICE_CORE_NETWORK', |
347 | | - option={'chip_erase_mode': 'ERASE_UICR', |
348 | | - 'qspi_erase_mode': 'ERASE_NONE'}) |
349 | | - core = 'NRFDL_DEVICE_CORE_NETWORK' |
| 359 | + if not self.erase and generated_uicr: |
| 360 | + self.exec_op('erase', core=core, option={'chip_erase_mode': 'ERASE_UICR', |
| 361 | + 'qspi_erase_mode': 'ERASE_NONE'}) |
350 | 362 | else: |
351 | 363 | if self.erase: |
352 | 364 | erase_arg = 'ERASE_ALL' |
|
0 commit comments