From 7c631f0fac7268b195914e7d0a762f16a46e4900 Mon Sep 17 00:00:00 2001 From: Jamie McCrae Date: Mon, 30 Oct 2023 17:16:31 +0000 Subject: [PATCH] kconfig: Add image size reduction option Adds a Kconfig option that can be used to reduce the available slot size of an application, this is useful for things like bootloaders whereby the bootloader or bootloader configuration reduces the available flash size that the image can occupy Signed-off-by: Jamie McCrae --- Kconfig.zephyr | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Kconfig.zephyr b/Kconfig.zephyr index e1694173048..8b48eca6fcd 100644 --- a/Kconfig.zephyr +++ b/Kconfig.zephyr @@ -141,6 +141,17 @@ config ROM_START_OFFSET alignment requirements on most ARM targets, although some targets may require smaller or larger values. +config ROM_END_OFFSET + hex "ROM end offset" + default 0 + help + If non-zero, this option reduces the maximum size that the Zephyr image is allowed to + occupy, this is to allow for additional image storage which can be created and used by + other systems such as bootloaders (for MCUboot, this would include the image swap + fields and TLV storage at the end of the image). + + If unsure, leave at the default value 0. + config LD_LINKER_SCRIPT_SUPPORTED bool default y