To use position-independent code or position-independent data in your program, you must customize the runtime library. Follow these steps:
- Load project file EWL_RuntimeCF.mcp, from the folder \ColdFire_Support\ewl\EWL_Runtime.
- Modify runtime functions.
- Open file CF_startup.c.
- As appropriate for your application, change or remove runtime function __block_copy_section. (This function relocates the PIC/PID sections in the absence of an operating system.)
- As appropriate for your application, change or remove runtime function __fix_addr_references. (This function creates the relocation tables.)
- Change the prefix file.
- Open the C/C++ preference panel for your target.
- Make sure this panel specifies prefix file PICPIDRuntimePrefix.h.
- Recompile the runtime library for your target.
Once you complete this procedure, you are ready to use the modified runtime library in your PIC/PID project. Source-file comments and runtime-library release notes may provide additional information.