File tree 4 files changed +27
-8
lines changed
samples/application_development/code_relocation_nocopy
4 files changed +27
-8
lines changed Original file line number Diff line number Diff line change @@ -10,18 +10,14 @@ using a custom linker script.
10
10
11
11
Differently from the code relocation sample, this sample is relocating the
12
12
content of the ext_code.c file to a different FLASH section and the code is XIP
13
- directly from there without the need to copy / relocate the code.
13
+ directly from there without the need to copy / relocate the code. All other code
14
+ (e.g. main(), Zephyr kernel) stays in the internal flash.
14
15
15
16
nRF5340 DK platform instructions
16
17
********************************
17
18
18
19
The nRF5340 DK has a 64 Mb external flash memory supporting Quad SPI. It is
19
- possible to do XIP from the external flash memory.
20
-
21
- The external flash memory is mapped to 0x10000000.
22
-
23
- In this sample we relocate some of the code to the external flash memory with
24
- the remaining Zephyr kernel in the internal flash.
20
+ mapped to 0x10000000.
25
21
26
22
To build and flash the application (including the external memory part):
27
23
@@ -31,7 +27,20 @@ To build and flash the application (including the external memory part):
31
27
:goals: build flash
32
28
:compact:
33
29
34
- Execution output:
30
+ STM32F769I-Discovery platform instructions
31
+ ******************************************
32
+
33
+ The stm32f769i_disco has 64MB of external flash attached via QSPI. It is mapped
34
+ to 0x90000000.
35
+
36
+ .. zephyr-app-commands ::
37
+ :zephyr-app: samples/application_development/code_relocation_nocopy
38
+ :board: stm32f769i_disco
39
+ :goals: build flash
40
+ :compact:
41
+
42
+ Execution output
43
+ ****************
35
44
36
45
.. code-block :: console
37
46
Original file line number Diff line number Diff line change
1
+ CONFIG_FLASH=y
2
+ CONFIG_STM32_MEMMAP=y
Original file line number Diff line number Diff line change 26
26
#define EXTFLASH_SIZE DT_PROP_OR(EXTFLASH_NODE, size_in_bytes, \
27
27
DT_PROP(EXTFLASH_NODE, size) / 8)
28
28
29
+ #elif defined(CONFIG_STM32_MEMMAP) && DT_NODE_EXISTS(DT_INST(0, st_stm32_qspi_nor))
30
+ /* On stm32 QSPI, external flash is mapped in XIP region at address given by the reg property. */
31
+
32
+ #define EXTFLASH_NODE DT_INST(0, st_stm32_qspi_nor)
33
+ #define EXTFLASH_ADDR DT_REG_ADDR(DT_INST(0, st_stm32_qspi_nor))
34
+ #define EXTFLASH_SIZE DT_REG_ADDR_BY_IDX(DT_INST(0, st_stm32_qspi_nor), 1)
35
+
29
36
#else
30
37
31
38
/*
Original file line number Diff line number Diff line change 6
6
platform_allow :
7
7
- qemu_cortex_m3
8
8
- nrf5340dk/nrf5340/cpuapp
9
+ - stm32f769i_disco
9
10
integration_platforms :
10
11
- qemu_cortex_m3
11
12
tags : linker
You can’t perform that action at this time.
0 commit comments