Browse Source

samples: code_relocation_nocopy: update macro for flash size and address

In case of the st,stm32-qspi-nor compatible
new property and node definitions will requires new macro
to get the external NOR flash base address and size
Add the config for running the sample on stm32l475 disco kit

Signed-off-by: Francois Ramu <francois.ramu@st.com>
pull/92069/head
Francois Ramu 2 months ago committed by Benjamin Cabé
parent
commit
45ce78adf0
  1. 2
      samples/application_development/code_relocation_nocopy/boards/disco_l475_iot1.conf
  2. 6
      samples/application_development/code_relocation_nocopy/linker_arm_nocopy.ld

2
samples/application_development/code_relocation_nocopy/boards/disco_l475_iot1.conf

@ -0,0 +1,2 @@
CONFIG_FLASH=y
CONFIG_STM32_MEMMAP=y

6
samples/application_development/code_relocation_nocopy/linker_arm_nocopy.ld

@ -37,15 +37,15 @@
/* On stm32 QSPI, external flash is mapped in XIP region at address given by the reg property. */ /* On stm32 QSPI, external flash is mapped in XIP region at address given by the reg property. */
#define EXTFLASH_NODE DT_INST(0, st_stm32_qspi_nor) #define EXTFLASH_NODE DT_INST(0, st_stm32_qspi_nor)
#define EXTFLASH_ADDR DT_REG_ADDR(DT_INST(0, st_stm32_qspi_nor)) #define EXTFLASH_ADDR DT_REG_ADDR_BY_IDX(DT_PARENT(EXTFLASH_NODE), 1)
#define EXTFLASH_SIZE DT_REG_SIZE(DT_INST(0, st_stm32_qspi_nor)) #define EXTFLASH_SIZE (DT_PROP(EXTFLASH_NODE, size) / 8)
#elif defined(CONFIG_STM32_MEMMAP) && DT_NODE_EXISTS(DT_INST(0, st_stm32_xspi_nor)) #elif defined(CONFIG_STM32_MEMMAP) && DT_NODE_EXISTS(DT_INST(0, st_stm32_xspi_nor))
/* On stm32 XSPI, external flash is mapped in XIP region at address given by the reg property. */ /* 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_NODE DT_INST(0, st_stm32_xspi_nor)
#define EXTFLASH_ADDR DT_REG_ADDR_BY_IDX(DT_PARENT(EXTFLASH_NODE), 1) #define EXTFLASH_ADDR DT_REG_ADDR_BY_IDX(DT_PARENT(EXTFLASH_NODE), 1)
#define EXTFLASH_SIZE DT_PROP(EXTFLASH_NODE, size) / 8 #define EXTFLASH_SIZE (DT_PROP(EXTFLASH_NODE, size) / 8)
#elif defined(CONFIG_FLASH_MSPI_NOR) && defined(CONFIG_SOC_NRF54H20_CPUAPP) #elif defined(CONFIG_FLASH_MSPI_NOR) && defined(CONFIG_SOC_NRF54H20_CPUAPP)

Loading…
Cancel
Save