The MEMORY Directive
7-30
length
Specifies the length of a memory range; enter as
length, len, or l.
The value, specified in words, is a 16-bit constant and may be deci-
mal, octal, or hexadecimal.
fill
Specifies a fill character for the memory range; enter as
fill or f. Fills
are optional. The value is a 2-byte integer constant and may be
decimal, octal, or hexadecimal. The fill value will be used to fill
areas of the memory range that are not allocated to a section.
Note:
Filling Memory Ranges
If you specify fill values for large memory ranges, your output file will be very
large because filling a memory range (even with 0s) causes raw data to be
generated for all unallocated blocks of memory in the range.
The following example specifies a memory range with the R and W attributes
and a fill constant of 0FFFFh:
MEMORY
{
RFILE (RW) : o = 02h, l = 0FEh, f = 0FFFFh
}
You normally use the MEMORY directive in conjunction with the SECTIONS
directive to control allocation of output sections. After you use the MEMORY
directive to specify the target system’s memory model, you can use the
SECTIONS directive to allocate output sections into specific named memory
ranges or into memory that has specific attributes. For example, you could
allocate the .text and .data sections into the area named ROM and allocate the
.bss section into the area name ONCHIP.
Figure 7–2 illustrates the memory map shown in Example 7–3.
Содержание TMS320C54x
Страница 38: ......
Страница 39: ......
Страница 40: ......
Страница 41: ......
Страница 42: ......
Страница 43: ......
Страница 44: ......
Страница 45: ......
Страница 46: ......
Страница 47: ......
Страница 48: ......
Страница 49: ......
Страница 50: ......
Страница 51: ......
Страница 52: ......
Страница 53: ......
Страница 54: ......
Страница 55: ......
Страница 56: ......
Страница 57: ......
Страница 58: ......
Страница 59: ......
Страница 60: ......
Страница 61: ......
Страница 62: ......
Страница 276: ......
Страница 277: ......
Страница 278: ......
Страница 279: ......
Страница 280: ......
Страница 281: ......
Страница 282: ......
Страница 283: ......
Страница 284: ......
Страница 285: ......
Страница 286: ......
Страница 287: ......
Страница 288: ......
Страница 289: ......
Страница 290: ......
Страница 291: ......
Страница 292: ......
Страница 293: ......
Страница 294: ......
Страница 295: ......
Страница 296: ......
Страница 297: ......
Страница 298: ......
Страница 299: ......
Страница 300: ......
Страница 301: ......
Страница 302: ......