Skip to content

Commit 0d2c8d4

Browse files
committed
samples: code_relocation_nocopy: update macro for flash size and address
In case of the st,stm32-xspi-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 <[email protected]>
1 parent 59a3bcf commit 0d2c8d4

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
@@ -44,8 +44,8 @@
4444
/* On stm32 XSPI, external flash is mapped in XIP region at address given by the reg property. */
4545

4646
#define EXTFLASH_NODE DT_INST(0, st_stm32_xspi_nor)
47-
#define EXTFLASH_ADDR DT_REG_ADDR(DT_INST(0, st_stm32_xspi_nor))
48-
#define EXTFLASH_SIZE DT_REG_SIZE(DT_INST(0, st_stm32_xspi_nor))
47+
#define EXTFLASH_ADDR DT_REG_ADDR_BY_IDX(DT_PARENT(EXTFLASH_NODE), 1)
48+
#define EXTFLASH_SIZE DT_PROP(EXTFLASH_NODE, size) / 8
4949

5050
#elif defined(CONFIG_FLASH_MSPI_NOR) && defined(CONFIG_SOC_NRF54H20_CPUAPP)
5151

0 commit comments

Comments
 (0)