Skip to content

Commit 11d3b45

Browse files
FRASTMdanieldegrasse
authored andcommitted
samples: code_relocation_nocopy: update macro for flash size and address
In case of the st,stm32-ospi-nor compatible new property and node definitions will requires new macro to get the external NOR flash base address and size Signed-off-by: Francois Ramu <francois.ramu@st.com>
1 parent 14c1b4a commit 11d3b45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

samples/application_development/code_relocation_nocopy/linker_arm_nocopy.ld

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
/* On stm32 OSPI, external flash is mapped in XIP region at address given by the reg property. */
3131

3232
#define EXTFLASH_NODE DT_INST(0, st_stm32_ospi_nor)
33-
#define EXTFLASH_ADDR DT_REG_ADDR(DT_INST(0, st_stm32_ospi_nor))
34-
#define EXTFLASH_SIZE DT_REG_SIZE(DT_INST(0, st_stm32_ospi_nor))
33+
#define EXTFLASH_ADDR DT_REG_ADDR_BY_IDX(DT_PARENT(EXTFLASH_NODE), 1)
34+
#define EXTFLASH_SIZE (DT_PROP(EXTFLASH_NODE, size) / 8)
3535

3636
#elif defined(CONFIG_STM32_MEMMAP) && DT_NODE_EXISTS(DT_INST(0, st_stm32_qspi_nor))
3737
/* On stm32 QSPI, external flash is mapped in XIP region at address given by the reg property. */

0 commit comments

Comments
 (0)