IAR Information Center for Renesas RH850

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:

  1. 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.
  2. 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:

  1. Build the static_part project to create the statically linked application and the symbol table
  2. Build the ropi_image project to create the ropi module
  3. Switch back to the static_part project
  4. Start the debugger
  5. 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.