5252 },
5353}
5454
55- # Relative to the root of the hal_nordic module
56- SUIT_STARTER_PATH = Path ('zephyr/blobs/suit/bin/suit_manifest_starter.hex' )
57-
58- @functools .cache
59- def _get_suit_starter ():
60- path = None
61- modules = zephyr_module .parse_modules (ZEPHYR_BASE )
62- for m in modules :
63- if 'hal_nordic' in m .meta .get ('name' ):
64- path = Path (m .project )
65- break
66-
67- if not path :
68- raise RuntimeError ("hal_nordic project missing in the manifest" )
69-
70- suit_starter = path / SUIT_STARTER_PATH
71- if not suit_starter .exists ():
72- raise RuntimeError ("Unable to find suit manifest starter file, "
73- "please make sure to run \' west blobs fetch "
74- "hal_nordic\' " )
75-
76- return str (suit_starter .resolve ())
77-
7855class NrfBinaryRunner (ZephyrBinaryRunner ):
7956 '''Runner front-end base class for nrf tools.'''
8057
@@ -95,9 +72,6 @@ def __init__(self, cfg, family, softreset, pinreset, dev_id, erase=False,
9572 self .force = force
9673 self .recover = bool (recover )
9774
98- # Only applicable for nrfutil
99- self .suit_starter = False
100-
10175 self .tool_opt = []
10276 if tool_opt is not None :
10377 for opts in [shlex .split (opt ) for opt in tool_opt ]:
@@ -384,55 +358,6 @@ def program_hex(self):
384358 self .exec_op ('erase' , core = 'Application' , kind = 'all' )
385359 self .exec_op ('erase' , core = 'Network' , kind = 'all' )
386360
387- # Manage SUIT artifacts.
388- # This logic should be executed only once per build.
389- # Use sysbuild board qualifiers to select the context,
390- # with which the artifacts will be programmed.
391- if self .build_conf .get ('CONFIG_BOARD_QUALIFIERS' ) == self .sysbuild_conf .get (
392- 'SB_CONFIG_BOARD_QUALIFIERS'
393- ):
394- mpi_hex_dir = Path (os .path .join (self .cfg .build_dir , 'zephyr' ))
395-
396- # Handle Manifest Provisioning Information
397- if self .sysbuild_conf .getboolean ('SB_CONFIG_SUIT_MPI_GENERATE' ):
398- app_mpi_hex_file = os .fspath (
399- mpi_hex_dir / self .sysbuild_conf .get ('SB_CONFIG_SUIT_MPI_APP_AREA_PATH' ))
400- rad_mpi_hex_file = os .fspath (
401- mpi_hex_dir / self .sysbuild_conf .get ('SB_CONFIG_SUIT_MPI_RAD_AREA_PATH' )
402- )
403- if os .path .exists (app_mpi_hex_file ):
404- self .op_program (
405- app_mpi_hex_file ,
406- 'ERASE_NONE' ,
407- None ,
408- defer = True ,
409- core = 'Application' ,
410- )
411- if os .path .exists (rad_mpi_hex_file ):
412- self .op_program (
413- rad_mpi_hex_file ,
414- 'ERASE_NONE' ,
415- None ,
416- defer = True ,
417- core = 'Network' ,
418- )
419-
420- # Handle SUIT root manifest if application manifests are not used.
421- # If an application firmware is built, the root envelope is merged
422- # with other application manifests as well as the output HEX file.
423- if core != 'Application' and self .sysbuild_conf .get ('SB_CONFIG_SUIT_ENVELOPE' ):
424- app_root_envelope_hex_file = os .fspath (
425- mpi_hex_dir / 'suit_installed_envelopes_application_merged.hex'
426- )
427- if os .path .exists (app_root_envelope_hex_file ):
428- self .op_program (
429- app_root_envelope_hex_file ,
430- 'ERASE_NONE' ,
431- None ,
432- defer = True ,
433- core = 'Application' ,
434- )
435-
436361 if self .build_conf .getboolean ("CONFIG_NRF_HALTIUM_GENERATE_UICR" ):
437362 zephyr_build_dir = Path (self .cfg .build_dir ) / 'zephyr'
438363
@@ -518,18 +443,6 @@ def reset_target(self):
518443 def do_require (self ):
519444 ''' Ensure the tool is installed '''
520445
521- def _check_suit_starter (self , op ):
522- op = op ['operation' ]
523- if op ['type' ] not in ('erase' , 'recover' , 'program' ):
524- return None
525- if op ['type' ] == 'program' and op ['options' ]['chip_erase_mode' ] != "ERASE_UICR" :
526- return None
527-
528- file = _get_suit_starter ()
529- self .logger .debug (f'suit starter: { file } ' )
530-
531- return file
532-
533446 def op_program (self , hex_file , erase , ext_mem_erase , defer = False , core = None ):
534447 args = self ._op_program (hex_file , erase , ext_mem_erase )
535448 self .exec_op ('program' , defer , core , ** args )
@@ -556,12 +469,6 @@ def _exec_op(op, defer=False, core=None, **kwargs):
556469 return op
557470
558471 _op = _exec_op (op , defer , core , ** kwargs )
559- # Check if the suit manifest starter needs programming
560- if self .suit_starter and self .family == 'nrf54h' :
561- file = self ._check_suit_starter (_op )
562- if file :
563- args = self ._op_program (file , 'ERASE_NONE' , None )
564- _exec_op ('program' , defer , core , ** args )
565472
566473 @abc .abstractmethod
567474 def do_exec_op (self , op , force = False ):
0 commit comments