Skip to content

Commit

Permalink
build: nrf9280 support
Browse files Browse the repository at this point in the history
Signed-off-by: Mikko Parpala <[email protected]>
  • Loading branch information
mparpala committed Nov 8, 2024
1 parent 1f7752d commit 67a447d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions ncs/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ def get_absolute_address(node, use_offset: bool = True):
default=None,
help="Path to KConfig file",
)
cmd_storage_arg_parser.add_argument(
"--soc", required=True, type=str, help="SoC device"
)

cmd_update_arg_parser = subparsers.add_parser(
UPDATE_CMD, help="Generate files needed for Secure Domain update", parents=[parent_parser]
Expand Down Expand Up @@ -284,6 +287,7 @@ def get_absolute_address(node, use_offset: bool = True):
storage_output_directory=arguments.storage_output_directory,
storage_address=arguments.storage_address,
config_file=arguments.config_file,
soc=arguments.soc,
)
elif arguments.command == UPDATE_CMD:
ImageCreator.create_files_for_update(
Expand Down
16 changes: 8 additions & 8 deletions suit_generator/cmd_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,16 +556,16 @@ def _create_suit_storage_files_for_boot(
envelopes: list[SuitEnvelope],
storage_address: int,
dir_name: str,
platform: str,
config_file: str,
soc: str = "nrf54h20",
) -> None:
if platform == "nRF54H20":
if soc == "nrf54h20":
storage = EnvelopeStorageNrf54h20(storage_address, kconfig=config_file)
elif platform == "nRF9280":
elif soc == "nrf9280":
storage = EnvelopeStorageNrf9280(storage_address, kconfig=config_file)
else:
raise GeneratorError(f"Unknown platform: {platform}")
raise GeneratorError(f"Unknown soc: {soc}")

for envelope in envelopes:
storage.add_envelope(envelope)

Expand Down Expand Up @@ -604,16 +604,16 @@ def create_files_for_boot(
input_files: list[str],
storage_output_directory: str,
storage_address: int,
platform: str,
config_file: str | None,
soc: str = "nrf54h20",
) -> None:
"""Create storage and payload hex files allowing boot execution path.
:param input_files: file paths to SUIT envelope
:param storage_output_directory: directory path to store hex files with SUIT storage contents
:param storage_address: address of SUIT storage
:param platform: platfrom in use, nRF54H20 or nRF9280
:param config_file: path to KConfig file containing MPI settings
:param soc: soc in use, nrf54h20 or nrf9280
"""
try:
envelopes = []
Expand All @@ -628,8 +628,8 @@ def create_files_for_boot(
envelopes,
storage_address,
storage_output_directory,
platform,
config_file,
soc,
)
except FileNotFoundError as error:
raise GeneratorError(error)
Expand Down

0 comments on commit 67a447d

Please sign in to comment.