The MEMORY Directive
7-29
Linker Description
The general syntax for the MEMORY directive is:
MEMORY
{
PAGE 0 :
name 1 [(attr)] : origin = constant , length = constant;
PAGE
n : name n [(attr)] : origin = constant , length = constant;
}
PAGE
identifies a memory space. You can specify up to 255 pages,
depending on your configuration; usually, PAGE 0 specifies
program memory, and PAGE 1 specifies data memory. If you do not
specify a PAGE, the linker acts as if you specified PAGE 0. Each
PAGE represents a completely independent address space. Con-
figured memory on PAGE 0 can overlap configured memory on
PAGE 1.
name
Names a memory range. A memory name may be one to eight
characters; valid characters include A–Z, a–z, $, ., and _. The
names have no special significance to the linker; they simply iden-
tify memory ranges. Memory range names are internal to the linker
and are not retained in the output file or in the symbol table.
Memory ranges on separate pages can have the same name; with-
in a page, however, all memory ranges must have unique names
and must not overlap.
attr
Specifies one to four attributes associated with the named range.
Attributes are optional; when used, they must be enclosed in
parentheses. Attributes restrict the allocation of output sections
into certain memory ranges. If you do not use any attributes, you
can allocate any output section into any range with no restrictions.
Any memory for which no attributes are specified (including all
memory in the default model) has all four attributes. Valid attributes
include:
R
specifies that the memory can be read
W
specifies that the memory can be written to
X
specifies that the memory can contain executable code
I
specifies that the memory can be initialized
origin
Specifies the starting address of a memory range; enter as
origin,
org, or o. The value, specified in words, is a 16-bit constant and
may be decimal, octal, or hexadecimal.
Summary of Contents for TMS320C54x
Page 38: ......
Page 39: ......
Page 40: ......
Page 41: ......
Page 42: ......
Page 43: ......
Page 44: ......
Page 45: ......
Page 46: ......
Page 47: ......
Page 48: ......
Page 49: ......
Page 50: ......
Page 51: ......
Page 52: ......
Page 53: ......
Page 54: ......
Page 55: ......
Page 56: ......
Page 57: ......
Page 58: ......
Page 59: ......
Page 60: ......
Page 61: ......
Page 62: ......
Page 276: ......
Page 277: ......
Page 278: ......
Page 279: ......
Page 280: ......
Page 281: ......
Page 282: ......
Page 283: ......
Page 284: ......
Page 285: ......
Page 286: ......
Page 287: ......
Page 288: ......
Page 289: ......
Page 290: ......
Page 291: ......
Page 292: ......
Page 293: ......
Page 294: ......
Page 295: ......
Page 296: ......
Page 297: ......
Page 298: ......
Page 299: ......
Page 300: ......
Page 301: ......
Page 302: ......