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 build: namespace `autoconf.h` with `zephyr/` 2024-05-28 22:03:55 +02:00
linker llext: xtensa: add support for the xt-clang toolchain 2024-05-29 10:49:40 -07:00
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 cmake: sca: Enable CodeChecker error exit status 2024-06-15 05:14:48 -04:00
toolchain toolchain: arcmwdt: always enable TLS in case of CPP 2024-07-12 06:22:13 -04:00
usage cmake: New target which generates a sort of development kit for llext 2024-05-17 16:21:48 +01:00
util
cfb.cmake
extra_flags.cmake cmake: extra_flags: Use zephyr_get 2023-10-24 11:35:27 +02:00
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 cmake: generalize VERSION infrastructure for better reuse 2023-05-17 13:56:58 +02:00
hex.cmake cmake: hex: deprecate use of to_hex() and from_hex() utility functions 2024-01-22 09:48:33 +00:00
kobj.cmake build: namespace the generated headers with `zephyr/` 2024-05-28 22:03:55 +02:00
llext-edk.cmake llext-edk: fix: add compile definitions to the generated EDK 2024-08-12 12:43:09 +02:00
mcuboot.cmake cmake: mcuboot: set align to 1 for overwrite only mode 2024-01-12 09:59:51 +01:00
package_helper.cmake cmake: stub zephyr_set(... SCOPE ...) function in package helper 2023-10-05 09:43:28 +01:00
pristine.cmake
target_toolchain_flags.cmake
verify-toolchain.cmake
vif.cmake USB-C: genVIF: Cleanup and add support to pick static data from input 2023-05-26 13:54:43 -04:00