SPNU118Z September 1995 – March 2023 66AK2E05 , 66AK2H06 , 66AK2H12 , 66AK2H14 , AM1705 , AM1707 , AM1802 , AM1806 , AM1808 , AM1810 , AM5K2E04 , OMAP-L132 , OMAP-L137 , OMAP-L138 , SM470R1B1M-HT , TMS470R1A288 , TMS470R1A384 , TMS470R1A64 , TMS470R1B1M , TMS470R1B512 , TMS470R1B768
Memory range origin and length can use expressions of integer constants with the following operators:
Binary operators: | * / % + - << >> == = < <= > >= & | && || | |
Unary operators: | - ~ ! |
Expressions are evaluated using standard C operator precedence rules.
No checking is done for overflow or underflow, however, expressions are evaluated using a larger integer type.
Preprocess directive #define constants can be used in place of integer constants. Global symbols cannot be used in Memory Directive expressions.
Three address operators reference memory range properties from prior memory range entries:
START(MR) | Returns start address for previously defined memory range MR. | |
SIZE(MR) | Returns size of previously defined memory range MR. | |
END(MR) | Returns end address for previously defined memory range MR. |
/********************************************************/
/* Sample command file with MEMORY directive */
/********************************************************/
file1.c.obj file2.c.obj /* Input files */
--output_file=prog.out /* Options */
#define ORIGIN 0x00000000
#define BUFFER 0x00000200
#define CACHE 0x0001000
MEMORY
{
FAST_MEM (RX): origin = ORIGIN + CACHE length = 0x00001000 + BUFFER
SLOW_MEM (RW): origin = end(FAST_MEM) length = 0x00001800 - size(FAST_MEM)
EXT_MEM (RX): origin = 0x10000000 length = size(FAST_MEM) - CACHE