Example 2: Avoiding Holes With Multiple Sections
C-8
C.3 Example 2: Avoiding Holes With Multiple Sections
When the memory width is less than the data width, holes may appear at
the beginning of a section or between sections. This is due to multiplication
of the load address by a correction factor. See Section 10.10,
Controlling
the ROM Device Address, on page 10-34 for more information.
You must eliminate the holes between converted sections. The sections
can be made contiguous in one of two ways:
-
Specify a
paddr value for each section listed in a SECTIONS directive.
This forces the hex conversion utility to use that specific address for the
output file address field. You must ensure that the section addresses do
not overlap. Example C–5 (a) shows a linker command file for this method.
The linker should be executed with this command file; then, the hex
conversion utility should be executed with the set of commands shown in
Example C–5 (b).
-
Link the sections together into one output section for conversion.
Example C–6 (a) shows a linker command file for this method. The linker
should be executed with this command file; then, the hex conversion utility
should be executed with the set of commands shown in Example C–6 (b).
Example C–5. Method One for Avoiding Holes
(a) Linker command file
/* SPECIFY THE SYSTEM MEMORY MAP */
MEMORY
{
PAGE 0: DARAM: org = 0x0080 , length = 0x1370
EXT: org = 0x1400 , length = 0xEB80
}
/* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY */
SECTIONS
{
sec1 : load = EXT PAGE 0
sec2 : load = EXT PAGE 0
}
Содержание 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: ......