@@ -342,26 +342,28 @@ def program_hex(self):
342
342
mpi_hex_dir = Path (os .path .join (self .cfg .build_dir , 'zephyr' ))
343
343
344
344
# Handle Manifest Provisioning Information
345
- if self .build_conf .getboolean ('CONFIG_SUIT_MPI_GENERATE ' ):
345
+ if self .sysbuild_conf .getboolean ('SB_CONFIG_SUIT_MPI_GENERATE ' ):
346
346
app_mpi_hex_file = os .fspath (
347
- mpi_hex_dir / self .build_conf .get ('CONFIG_SUIT_MPI_APP_AREA_PATH ' ))
347
+ mpi_hex_dir / self .sysbuild_conf .get ('SB_CONFIG_SUIT_MPI_APP_AREA_PATH ' ))
348
348
rad_mpi_hex_file = os .fspath (
349
- mpi_hex_dir / self .build_conf .get ('CONFIG_SUIT_MPI_RAD_AREA_PATH' )
350
- )
351
- self .op_program (
352
- app_mpi_hex_file ,
353
- 'ERASE_NONE' ,
354
- None ,
355
- defer = True ,
356
- core = 'NRFDL_DEVICE_CORE_APPLICATION' ,
357
- )
358
- self .op_program (
359
- rad_mpi_hex_file ,
360
- 'ERASE_NONE' ,
361
- None ,
362
- defer = True ,
363
- core = 'NRFDL_DEVICE_CORE_NETWORK' ,
349
+ mpi_hex_dir / self .sysbuild_conf .get ('SB_CONFIG_SUIT_MPI_RAD_AREA_PATH' )
364
350
)
351
+ if os .path .exists (app_mpi_hex_file ):
352
+ self .op_program (
353
+ app_mpi_hex_file ,
354
+ 'ERASE_NONE' ,
355
+ None ,
356
+ defer = True ,
357
+ core = 'NRFDL_DEVICE_CORE_APPLICATION' ,
358
+ )
359
+ if os .path .exists (rad_mpi_hex_file ):
360
+ self .op_program (
361
+ rad_mpi_hex_file ,
362
+ 'ERASE_NONE' ,
363
+ None ,
364
+ defer = True ,
365
+ core = 'NRFDL_DEVICE_CORE_NETWORK' ,
366
+ )
365
367
366
368
# Handle SUIT root manifest if application manifests are not used.
367
369
# If an application firmware is built, the root envelope is merged
@@ -370,13 +372,14 @@ def program_hex(self):
370
372
app_root_envelope_hex_file = os .fspath (
371
373
mpi_hex_dir / 'suit_installed_envelopes_application_merged.hex'
372
374
)
373
- self .op_program (
374
- app_root_envelope_hex_file ,
375
- 'ERASE_NONE' ,
376
- None ,
377
- defer = True ,
378
- core = 'NRFDL_DEVICE_CORE_APPLICATION' ,
379
- )
375
+ if os .path .exists (app_root_envelope_hex_file ):
376
+ self .op_program (
377
+ app_root_envelope_hex_file ,
378
+ 'ERASE_NONE' ,
379
+ None ,
380
+ defer = True ,
381
+ core = 'NRFDL_DEVICE_CORE_APPLICATION' ,
382
+ )
380
383
381
384
if not self .erase and generated_uicr :
382
385
self .exec_op ('erase' , core = core , option = {'chip_erase_mode' : 'ERASE_UICR' ,
0 commit comments