Skip to content

Commit

Permalink
samples: code relocation in external memory of stm32 disco kit
Browse files Browse the repository at this point in the history
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: Francois Ramu <[email protected]>
  • Loading branch information
FRASTM committed May 30, 2024
1 parent 3427cc8 commit b6eb548
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 0 deletions.
12 changes: 12 additions & 0 deletions samples/application_development/code_relocation_nocopy/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
****************

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CONFIG_FLASH=y
CONFIG_STM32_MEMMAP=y
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CONFIG_FLASH=y
CONFIG_STM32_MEMMAP=y
Original file line number Diff line number Diff line change
Expand Up @@ -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. */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b6eb548

Please sign in to comment.