Commit 41019480 authored by Francois Ramu's avatar Francois Ramu Committed by David Leach
Browse files

samples: code relocation in external memory of stm32 disco kit



Define the configuration to run the code_relocation
application on the external memory octo flash
of the stm32u585 or stm32h7b3i disco kit in XIP

Signed-off-by: default avatarFrancois Ramu <francois.ramu@st.com>
parent ae06f927
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -39,6 +39,18 @@ to 0x90000000.
   :goals: build flash
   :compact:

STM32 b_u585i_iot02a Discovery kit instructions
***********************************************

The b_u585i_iot02a has 64MB of external flash attached via OSPI. It is mapped
to 0x70000000.

.. zephyr-app-commands::
   :zephyr-app: samples/application_development/code_relocation_nocopy
   :board: b_u585i_iot02a
   :goals: build flash
   :compact:

Execution output
****************

+2 −0
Original line number Diff line number Diff line
CONFIG_FLASH=y
CONFIG_STM32_MEMMAP=y
+2 −0
Original line number Diff line number Diff line
CONFIG_FLASH=y
CONFIG_STM32_MEMMAP=y
+7 −0
Original line number Diff line number Diff line
@@ -26,6 +26,13 @@
#define EXTFLASH_SIZE	DT_PROP_OR(EXTFLASH_NODE, size_in_bytes, \
				   DT_PROP(EXTFLASH_NODE, size) / 8)

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

#define EXTFLASH_NODE	DT_INST(0, st_stm32_ospi_nor)
#define EXTFLASH_ADDR	DT_REG_ADDR(DT_INST(0, st_stm32_ospi_nor))
#define EXTFLASH_SIZE	DT_REG_ADDR_BY_IDX(DT_INST(0, st_stm32_ospi_nor), 1)

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

+2 −0
Original line number Diff line number Diff line
@@ -7,6 +7,8 @@ tests:
      - qemu_cortex_m3
      - nrf5340dk/nrf5340/cpuapp
      - stm32f769i_disco
      - stm32h7b3i_dk
      - b_u585i_iot02a
    integration_platforms:
      - qemu_cortex_m3
    tags: linker