프로젝트 간에 심볼을 내보낼 때 isymexport사용

기술노트 95375

아키텍처:

ARM

컴포넌트:

linker

업데이트:

2018-02-28 오전 2:55

Introduction

You want to place const data in (for example) external flash, and later on use the data from a separate project. Using the method described in this Technical Note, you will be able to use the symbolic names of the const data (i.e. there is no need to use absolutely placed symbols and use their addresses to access them). You will also avoid re-downloading the const data to flash, and having to rebuild it in the project.

Solution

Use the IAR Absolute Symbol Exporter, "isymexport". This is a step-by-step instruction on it's use:

A1. Create a project for the const data library.

A2. Configure the target device (for example Cortex-M3).

A3. Configure the linker to use an address range separate from the application.

A4. Select General Options -> Library Configuration -> Library: None

A5. Set the default program entry to an existing symbol in Linker -> Library options.

A6. Add the export of library symbols in Build Actions -> Post-build command line:

$TOOLKIT_DIR$\bin\isymexport.exe "$TARGET_PATH$" "$PROJ_DIR$\const_lib.symbols" --edit "$PROJ_DIR$\const_data_lib.edit"

 

B1. Create a project for the application .

B2. Configure the target device (for example Cortex-M3).

B3. Configure the linker to use an address range separate from the address range of the library.

B4. Add the exported library symbols to Options -> Linker -> Library -> Additional libraries:

$PROJ_DIR$\const_lib.symbols

 

C1. If the flash where the const data is located is supported by an IAR Embedded Workbench for for ARM flash loader, you can download the const data library to the target device (needed at least once) by adding the output file to Options -> Debugger -> Download extra image -> Path:

$PROJ_DIR$\Debug\Exe\const_lib.out

Comments

  • You will find an example project on the link: Example project (ARM 8.11).
  • Also see the screenshots below showing the various project options that need to be set. 
  • In the library, the const data variables are marked with __root to force the linker to keep the data.
  • The symbols are saved in the "const_lib.symbols" file. Note that there is no strict name/extension to be used, ".symbols" is just an example.

All product names are trademarks or registered trademarks of their respective owners.

죄송하지만, 당사 사이트에서는 Internet Explorer를 지원하지 않습니다.보다 편안한 사이트를 위해 Chrome, Edge, Firefox 등과 같은 최신 브라우저를 사용해 주시길 부탁드립니다.