Skip to content
Closed
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
18 changes: 18 additions & 0 deletions soc/nordic/nrf54h/Kconfig.defconfig.nrf54h20_cpurad
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,22 @@ config POWER_DOMAIN
config CODE_DATA_RELOCATION
default y if PM || POWEROFF

# Support for firmware relocation pattern (load from MRAM, run from TCM)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be beneficial to check if we can define it under nrf/soc/nordic/nrf54h

# If 'fw-to-relocate' chosen node exists, use it to calculate LMA adjustment
# Otherwise, fall back to standard code-partition calculation
DT_CHOSEN_FW_TO_RELOCATE = fw-to-relocate
DT_CHOSEN_Z_CODE = zephyr,code-partition
DT_CHOSEN_Z_SRAM = zephyr,sram

config BUILD_OUTPUT_ADJUST_LMA
default "$(dt_chosen_partition_addr_hex,$(DT_CHOSEN_FW_TO_RELOCATE)) - \
$(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_CODE))" \
if "$(dt_chosen_enabled,$(DT_CHOSEN_FW_TO_RELOCATE))" = "y"
help
Automatically calculate LMA adjustment for firmware relocation.
If 'fw-to-relocate' chosen node exists, the firmware will be loaded
from the MRAM partition it points to, but will run from the TCM region
specified by 'zephyr,code-partition'.
Otherwise, uses standard calculation: 'code-partition' - 'sram'.

endif # SOC_NRF54H20_CPURAD