Part 1
요약·해설
nRF5340 DK·STM32F769I Discovery·B-U585I-IOT02A의 external flash mapping 주소, build·flash 명령과 실행 주소 출력을 보존합니다.
QSPI · 0x10000000
QSPI · 0x90000000
OSPI · 0x70000000
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
5D8752799E6F7798F4FD0C277A7D7C9D912AA566510A5B38591F9AB5958661A7
.. _code_relocation_nocopy:
Code relocation nocopy
######################
Overview
********
A simple example that demonstrates how relocation of code, data or bss sections
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. 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
mapped to 0x10000000.
To build and flash the application (including the external memory part):
.. zephyr-app-commands::
:zephyr-app: samples/application_development/code_relocation_nocopy
:board: nrf5340dk/nrf5340/cpuapp
:goals: build flash
:compact:
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:
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
****************
.. code-block:: console
*** Booting Zephyr OS build v3.0.0-rc3-25-g0df32cec1ff2 ***
Address of main function 0x4f9
Address of function_in_ext_flash 0x10000001
Address of var_ext_sram_data 0x200000a0 (10)
Address of function_in_sram 0x20000001
Address of var_sram_data 0x200000a4 (10)
Hello World! nrf5340dk/nrf5340/cpuapp
Part 3
한국어 전문 번역
개요
Custom linker script를 사용해 code, data 또는 BSS section을 다른 위치에 배치하는 방법을 보여주는 간단한 example입니다.
일반 code relocation sample과 달리 이 sample은 ext_code.c의 내용을 다른 FLASH section으로 옮긴 뒤, code를 복사하거나 다시 배치하지 않고 그 위치에서 직접 XIP(Execute In Place)로 실행합니다. main()과 Zephyr kernel 등 나머지 code는 internal flash에 그대로 둡니다.
nRF5340 DK platform 명령
nRF5340 DK에는 Quad SPI를 지원하는 64 Mb external flash memory가 있으며 주소 0x10000000에 mapping됩니다.
External memory 부분을 포함해 application을 build하고 flash하려면 다음 명령을 실행합니다.
west build -b nrf5340dk/nrf5340/cpuapp samples/application_development/code_relocation_nocopy
west flash
STM32F769I-Discovery platform 명령
stm32f769i_disco에는 QSPI로 연결된 64 MB external flash가 있으며 주소 0x90000000에 mapping됩니다.
west build -b stm32f769i_disco samples/application_development/code_relocation_nocopy
west flash
STM32 b_u585i_iot02a Discovery kit 명령
b_u585i_iot02a에는 OSPI로 연결된 64 MB external flash가 있으며 주소 0x70000000에 mapping됩니다.
west build -b b_u585i_iot02a samples/application_development/code_relocation_nocopy
west flash
실행 출력
*** Booting Zephyr OS build v3.0.0-rc3-25-g0df32cec1ff2 ***
Address of main function 0x4f9
Address of function_in_ext_flash 0x10000001
Address of var_ext_sram_data 0x200000a0 (10)
Address of function_in_sram 0x20000001
Address of var_sram_data 0x200000a4 (10)
Hello World! nrf5340dk/nrf5340/cpuapp
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.