How to Save On-Chip Memory by Placing RTS Off-Chip
4-7
Linking Issues
to RTS functions to be near, regardless of the setting of the –ml
n switch. This
option is for special situations, and typically isn’t needed. The option –mr1 will
cause calls to RTS functions to be far, regardless of the setting of the –ml
n
switch.
Note these options only address how RTS functions are called. Calling func-
tions with the far method does not mean those functions must be in off-chip
memory. It simply means those functions can be placed at any distance from
where they are called.
4.2.2
Must #include Header Files
When you call a RTS function, you must include the header file which corre-
sponds to that function. For instance, when you call memcmp, you must #in-
clude <string.h>. If you do not include the header, the memcmp call looks like
a normal user call to the compiler, and the effect of using –mr1 does not occur.
4.2.3
RTS Data
Most RTS functions do not have any data of their own. Data is typically passed
as arguments or through pointers. However, a few functions do have their own
data. All of the ”is<xxx>” character recognition functions defined in ctype.h re-
fer to a global table. Also, many of the floating point math functions have their
own constant look-up tables. All RTS data is defined to be far data, for exam-
ple, accessed without regard to where it is in memory. Again, this does not nec-
essarily mean this data is in off-chip memory.
Details on how to change access of RTS data are given in section 4.2.7