3.3.6. Code example

For details of writing position-independent code, see the PIC-PID example provided with RealView Development Suite in the main examples directory, that is in install_directory\RVDS\Examples\picpid.

This example consists of a kernel at a fixed address in ROM, together with a collection of application modules that extend kernel functionality. A module implements a set of named services that can be multiply instantiated, and that can call one another through the kernel. When a service is called, the kernel creates an instance of its static data and then passes control to the service. However, the service might then call back to the kernel. Therefore, modules must have position-independent data (RWPI, PID).

The example includes source code, a make file, batch files, and a detailed description of how to compile and link the different modules (see readme.txt).

Copyright © 2002-2006 ARM Limited. All rights reserved.ARM DUI 0203G