zephyr/cmake
Grzegorz Swiderski f2dc4a0ecf cmake: Adjust LMA for user-specified sections
Fixes #64149

Add support for a new Kconfig symbol: BUILD_OUTPUT_ADJUST_LMA_SECTIONS.
This is supplemental to the existing BUILD_OUTPUT_ADJUST_LMA setting,
which normally adjusts all output sections' LMA by the provided offset.
Defining the new symbol will narrow down the set of applicable sections
to a user-specified CMake list of name patterns.

Example usage:

DT_CHOSEN_Z_FLASH = zephyr,flash
DT_CHOSEN_Z_SRAM = zephyr,sram
config BUILD_OUTPUT_ADJUST_LMA
        default "$(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_FLASH)) - \
                 $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_SRAM))"

config BUILD_OUTPUT_ADJUST_LMA_SECTIONS
        default "*;!bss;!noinit"

Supported values for BUILD_OUTPUT_ADJUST_LMA_SECTIONS are aligned with
objcopy, since this feature has only been supported with GNU binutils
thus far.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-08-12 15:53:42 +02:00
..
app
bintools cmake: Adjust LMA for user-specified sections 2024-08-12 15:53:42 +02:00
compiler toolchain: arcmwdt: don't set STDC_LIB_EXT1 macro in case of minimal libc 2024-07-12 09:34:58 -04:00
emu cmake: emu: armfvp: Fix find program’s search paths 2024-06-26 09:00:43 -04:00
flash cmake: flash: remove references to cache 2024-07-30 18:31:19 +01:00
ide
linker
linker_script cmake: linker_script: Fix zbus sections 2024-07-09 12:02:51 +02:00
makefile_exports
modules cmake: modules: dts: make Device Tree error messages more visible 2024-08-05 16:27:17 +02:00
reports
sca
toolchain toolchain: arcmwdt: always enable TLS in case of CPP 2024-07-12 06:22:13 -04:00
usage
util
cfb.cmake
extra_flags.cmake
gcc-m-cpu.cmake arch: arm: Add initial support for Cortex-M85 Core 2024-06-26 13:36:14 -04:00
gcc-m-fpu.cmake arch: arm: Add initial support for Cortex-M85 Core 2024-06-26 13:36:14 -04:00
gen_version_h.cmake
hex.cmake
kobj.cmake
llext-edk.cmake llext-edk: fix: add compile definitions to the generated EDK 2024-08-12 12:43:09 +02:00
mcuboot.cmake
package_helper.cmake
pristine.cmake
target_toolchain_flags.cmake
verify-toolchain.cmake
vif.cmake