Texas Instruments TMS320C54x User Manual page 242

Digital signal processors
Hide thumbs Also See for TMS320C54x:
Table of Contents

Advertisement

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.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C54x and is the answer not in the manual?

Table of Contents