Skip to content

Commit 54304db

Browse files
committed
boot: stm32n6: Define specific executable region
On STM32N6, MCUBoot is loaded by the BootROM to axisram2 and, when running in RAMLOAD configuration, application image is loaded in axisram1. To support this, define MULTIPLE_EXECUTABLE_RAM_REGIONS and implement boot_get_image_exec_ram_info() which provides the right executable address and size based on axisram1 node definition. Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
1 parent f90eee8 commit 54304db

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

boot/bootutil/src/ram_load.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,18 @@ BOOT_LOG_MODULE_DECLARE(mcuboot);
4949
#endif
5050
#endif
5151

52+
#ifdef CONFIG_SOC_SERIES_STM32N6X
53+
int boot_get_image_exec_ram_info(uint32_t image_id,
54+
uint32_t *exec_ram_start,
55+
uint32_t *exec_ram_size)
56+
{
57+
*exec_ram_start = DT_PROP_BY_IDX(DT_NODELABEL(axisram1), reg, 0);
58+
*exec_ram_size = DT_PROP_BY_IDX(DT_NODELABEL(axisram1), reg, 1);
59+
60+
return 0;
61+
}
62+
#endif
63+
5264
/**
5365
* Verifies that the active slot of the current image can be loaded within the
5466
* predefined bounds that are allowed to be used by executable images.

boot/zephyr/include/mcuboot_config/mcuboot_config.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@
134134
#define IMAGE_EXECUTABLE_RAM_SIZE CONFIG_BOOT_IMAGE_EXECUTABLE_RAM_SIZE
135135
#endif
136136

137+
#ifdef CONFIG_SOC_SERIES_STM32N6X
138+
#define MULTIPLE_EXECUTABLE_RAM_REGIONS
139+
#endif
140+
137141
#ifdef CONFIG_LOG
138142
#define MCUBOOT_HAVE_LOGGING 1
139143
#endif

0 commit comments

Comments
 (0)