SLAU131V October 2004 – February 2020
The MEMORY directive identifies ranges of memory that are physically present in the target system and can be used by a program. Each range has several characteristics:
When you use the MEMORY directive, be sure to identify all memory ranges that are available for the program to access at run time. Memory defined by the MEMORY directive is configured; any memory that you do not explicitly account for with MEMORY is unconfigured. The linker does not place any part of a program into unconfigured memory. You can represent nonexistent memory spaces by simply not including an address range in a MEMORY directive statement.
The MEMORY directive is specified in a command file by the word MEMORY (uppercase), followed by a list of memory range specifications enclosed in braces. The MEMORY directive in Example 3 defines a system that has 0xEEE0 bytes of flash memory at address 0x1100 and 0x0800 bytes of RAM at address 0x0200. It also demonstrates the use of memory range expressions as well as start/end/size address operators (see Example 4).