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 <francois.ramu@st.com>
This commit is contained in:
Francois Ramu 2025-04-15 12:10:32 +02:00 committed by Benjamin Cabé
commit 95d95dc82c

View file

@ -44,8 +44,8 @@
/* On stm32 XSPI, external flash is mapped in XIP region at address given by the reg property. */
#define EXTFLASH_NODE DT_INST(0, st_stm32_xspi_nor)
#define EXTFLASH_ADDR DT_REG_ADDR(DT_INST(0, st_stm32_xspi_nor))
#define EXTFLASH_SIZE DT_REG_SIZE(DT_INST(0, st_stm32_xspi_nor))
#define EXTFLASH_ADDR DT_REG_ADDR_BY_IDX(DT_PARENT(EXTFLASH_NODE), 1)
#define EXTFLASH_SIZE DT_PROP(EXTFLASH_NODE, size) / 8
#elif defined(CONFIG_FLASH_MSPI_NOR) && defined(CONFIG_SOC_NRF54H20_CPUAPP)