Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions soc/nordic/common/uicr/Kconfig.gen_uicr
Original file line number Diff line number Diff line change
Expand Up @@ -404,4 +404,36 @@ config GEN_UICR_POLICY_MPCCONF_STAGE_VALUE
default 0x1730C77F if GEN_UICR_POLICY_MPCCONF_STAGE_NORMAL
default 0

config GEN_UICR_SNAPSHOT_REGIONS
bool "UICR.SNAPSHOT.REGIONS"
depends on SOC_SERIES_NRF54H
help
When enabled, the UICR generator will configure the snapshot regions
specified in Kconfig.

if GEN_UICR_SNAPSHOT_REGIONS

index = 0
rsource "Kconfig.template.gen_uicr_snapshot_region"

index = 1
rsource "Kconfig.template.gen_uicr_snapshot_region"

index = 2
rsource "Kconfig.template.gen_uicr_snapshot_region"

index = 3
rsource "Kconfig.template.gen_uicr_snapshot_region"

index = 4
rsource "Kconfig.template.gen_uicr_snapshot_region"

index = 5
rsource "Kconfig.template.gen_uicr_snapshot_region"

index = 6
rsource "Kconfig.template.gen_uicr_snapshot_region"

endif # GEN_UICR_SNAPSHOT_REGIONS

endmenu
22 changes: 22 additions & 0 deletions soc/nordic/common/uicr/Kconfig.template.gen_uicr_snapshot_region
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright (c) 2026 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

config GEN_UICR_SNAPSHOT_REGION_$(index)
bool "UICR.SNAPSHOT region"
depends on GEN_UICR_SNAPSHOT_REGIONS
help
When enabled, configures a UICR.SNAPSHOT region.

config GEN_UICR_SNAPSHOT_REGION_$(index)_ADDRESS
hex "UICR.SNAPSHOT region start address"
range 0x0e030000 0x0e1ff000
depends on GEN_UICR_SNAPSHOT_REGION_$(index)
help
UICR.SNAPSHOT region start address. Must be aligned to a 1 KB boundary.

config GEN_UICR_SNAPSHOT_REGION_$(index)_SIZE_BYTES
int "UICR.SNAPSHOT region size in bytes"
range 1024 1048576
depends on GEN_UICR_SNAPSHOT_REGION_$(index)
help
Size of the snapshot region in bytes. Must be a multiple of 1024.
15 changes: 15 additions & 0 deletions soc/nordic/common/uicr/gen_uicr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ set(eraseprotect_args)
set(approtect_args)
set(protectedmem_args)
set(periphconf_args)
set(snapshot_args)
set(mpcconf_args)
set(wdtstart_args)
set(periphconf_elfs)
Expand Down Expand Up @@ -364,6 +365,19 @@ if(CONFIG_GEN_UICR_POLICY_MPCCONF_STAGE_INIT OR CONFIG_GEN_UICR_POLICY_MPCCONF_S
list(APPEND policy_args --policy-mpcconf-stage ${CONFIG_GEN_UICR_POLICY_MPCCONF_STAGE_VALUE})
endif()

# Handle SNAPSHOT configuration (indices 0..6 match Kconfig.template.gen_uicr_snapshot_region)
if(CONFIG_GEN_UICR_SNAPSHOT_REGIONS)
foreach(snapshot_region_idx RANGE 0 6)
if(CONFIG_GEN_UICR_SNAPSHOT_REGION_${snapshot_region_idx})
list(APPEND snapshot_args
--snapshot-region
${CONFIG_GEN_UICR_SNAPSHOT_REGION_${snapshot_region_idx}_ADDRESS}
${CONFIG_GEN_UICR_SNAPSHOT_REGION_${snapshot_region_idx}_SIZE_BYTES}
)
endif()
endforeach()
endif()

set(periphconf_check_base_cmd
${CMAKE_COMMAND} -E env ZEPHYR_BASE=${ZEPHYR_BASE}
${PYTHON_EXECUTABLE} ${IRONSIDE_SUPPORT_DIR}/se/tool/ironside/__main__.py
Expand Down Expand Up @@ -448,6 +462,7 @@ add_custom_command(
${protectedmem_args}
${secondary_args}
${policy_args}
${snapshot_args}
${periphconf_validate_build_command}
${secondary_periphconf_validate_build_command}
DEPENDS ${gen_uicr_depends}
Expand Down
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ manifest:
groups:
- hal
- name: hal_nordic
revision: 7142bc9c3c94f06e3b520890dde93d363c0e67bf
revision: af3848538da37360913bc68eeef40f32430b7c52
path: modules/hal/nordic
groups:
- hal
Expand Down
Loading