프로젝트 간에 심볼을 내보낼 때 isymexport사용
2018-02-28 오전 2:55
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.
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:
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:
- 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.