Skip to content

Commit f846e9e

Browse files
committed
boot: zephyr: Allow disabling default multiple RAM region file
Allows disabling the default MCUboot Zephyr file specifying the multiple RAM regions, in order to allow users to supply their own versions Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
1 parent 0ccce2f commit f846e9e

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

boot/zephyr/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ if((CONFIG_BOOT_SWAP_USING_SCRATCH OR CONFIG_BOOT_SWAP_USING_MOVE OR CONFIG_BOOT
552552
zephyr_library_sources(flash_check.c)
553553
endif()
554554

555-
if(CONFIG_BOOT_RAM_LOAD)
555+
if(CONFIG_MULTIPLE_EXECUTABLE_RAM_REGIONS_DEFAULT_FILE)
556556
zephyr_library_sources(ram_load.c)
557557
endif()
558558

boot/zephyr/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,16 @@ config MULTIPLE_EXECUTABLE_RAM_REGIONS
637637
When selected, boot_get_image_exec_ram_info() should be updated to provide
638638
the information about the areas.
639639

640+
config MULTIPLE_EXECUTABLE_RAM_REGIONS_DEFAULT_FILE
641+
bool "Default MCUboot multiple executable RAM region source file"
642+
default y
643+
depends on MULTIPLE_EXECUTABLE_RAM_REGIONS
644+
help
645+
When enabled, will include the default MCUboot file that has the
646+
boot_get_image_exec_ram_info() implementation in it, for users with out-of-tree or
647+
custom configuration then this option can be disabled and a custom file can be added
648+
by a CMake module which defines the configuration for the intended board.
649+
640650
config FLASH_RUNTIME_SOURCES
641651
bool "Images are read from flash partitions defined at runtime"
642652
depends on SINGLE_APPLICATION_SLOT

boot/zephyr/ram_load.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,14 @@
1919

2020
#include <zephyr/devicetree.h>
2121

22-
#ifdef MULTIPLE_EXECUTABLE_RAM_REGIONS
2322
int boot_get_image_exec_ram_info(uint32_t image_id,
2423
uint32_t *exec_ram_start,
2524
uint32_t *exec_ram_size)
2625
{
27-
2826
#ifdef CONFIG_SOC_SERIES_STM32N6X
2927
*exec_ram_start = DT_PROP_BY_IDX(DT_NODELABEL(axisram1), reg, 0);
3028
*exec_ram_size = DT_PROP_BY_IDX(DT_NODELABEL(axisram1), reg, 1);
3129
#endif
3230

3331
return 0;
3432
}
35-
#endif /* MULTIPLE_EXECUTABLE_RAM_REGIONS */

0 commit comments

Comments
 (0)