Example description
This example shows how to create a Read-Only Position Independent (ropi) application that is called from a statically linked application.
The workspace consists of two projects:
- static_part
Statically linked application that jumps to the ropi application. As a post-build action, the tool isymexport is executed to create a symbol table with functions that shall be possible to call from the ropi application. The ropi application image is downloaded to the C-SPY debugger together with this application. - ropi_image
ropi application linked so that all code and constant data is placed in a common block. The symbol table created with isymexport above is included when linking.
Perform these steps:
- Build the static_part project to create the statically linked application and the symbol table
- Build the ropi_image project to create the ropi module
- Switch back to the static_part project
- Start the debugger
- Click Go and watch the result in the Terminal I/O window.
See section Position-independent code and read-only data (ROPI) in the IAR C/C++ Development Guide for more information.