1# Copyright 2022 NXP
2# Copyright 2025 Nordic Semiconductor ASA
3# SPDX-License-Identifier: Apache-2.0
4source "Kconfig.zephyr"
5# Workaround for not being able to have commas in macro arguments
6DT_CHOSEN_Z_CODE_PARTITION := zephyr,code-partition
7
8config BUILD_OUTPUT_ADJUST_LMA
9	default "$(dt_node_reg_addr_hex,$(dt_nodelabel_path,slot1_partition))-\
10		$(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_CODE_PARTITION))+\
11		$(dt_node_int_prop_hex,$(dt_node_parent,$(dt_node_parent,$(dt_nodelabel_path,slot1_partition))),erase-block-size)" if MCUBOOT_BOOTLOADER_MODE_SWAP_USING_OFFSET
12	default "$(dt_node_reg_addr_hex,$(dt_nodelabel_path,slot1_partition))-\
13		$(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_CODE_PARTITION))"
14