samples: code_relocation_nocopy: add stm32f769i_disco board
This board has memory-mapped QSPI flash. Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
This commit is contained in:
parent
0023986bb2
commit
e7a53cf03b
4 changed files with 27 additions and 8 deletions
|
@ -10,18 +10,14 @@ using a custom linker script.
|
|||
|
||||
Differently from the code relocation sample, this sample is relocating the
|
||||
content of the ext_code.c file to a different FLASH section and the code is XIP
|
||||
directly from there without the need to copy / relocate the code.
|
||||
directly from there without the need to copy / relocate the code. All other code
|
||||
(e.g. main(), Zephyr kernel) stays in the internal flash.
|
||||
|
||||
nRF5340 DK platform instructions
|
||||
********************************
|
||||
|
||||
The nRF5340 DK has a 64 Mb external flash memory supporting Quad SPI. It is
|
||||
possible to do XIP from the external flash memory.
|
||||
|
||||
The external flash memory is mapped to 0x10000000.
|
||||
|
||||
In this sample we relocate some of the code to the external flash memory with
|
||||
the remaining Zephyr kernel in the internal flash.
|
||||
mapped to 0x10000000.
|
||||
|
||||
To build and flash the application (including the external memory part):
|
||||
|
||||
|
@ -31,7 +27,20 @@ To build and flash the application (including the external memory part):
|
|||
:goals: build flash
|
||||
:compact:
|
||||
|
||||
Execution output:
|
||||
STM32F769I-Discovery platform instructions
|
||||
******************************************
|
||||
|
||||
The stm32f769i_disco has 64MB of external flash attached via QSPI. It is mapped
|
||||
to 0x90000000.
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/application_development/code_relocation_nocopy
|
||||
:board: stm32f769i_disco
|
||||
:goals: build flash
|
||||
:compact:
|
||||
|
||||
Execution output
|
||||
****************
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
CONFIG_FLASH=y
|
||||
CONFIG_STM32_MEMMAP=y
|
|
@ -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_qspi_nor))
|
||||
/* 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_ADDR DT_REG_ADDR(DT_INST(0, st_stm32_qspi_nor))
|
||||
#define EXTFLASH_SIZE DT_REG_ADDR_BY_IDX(DT_INST(0, st_stm32_qspi_nor), 1)
|
||||
|
||||
#else
|
||||
|
||||
/*
|
||||
|
|
|
@ -6,6 +6,7 @@ tests:
|
|||
platform_allow:
|
||||
- qemu_cortex_m3
|
||||
- nrf5340dk/nrf5340/cpuapp
|
||||
- stm32f769i_disco
|
||||
integration_platforms:
|
||||
- qemu_cortex_m3
|
||||
tags: linker
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue