Overlay Pages
7-48
7.11 Overlay Pages
Some target systems use a memory configuration in which all or part of the
memory space is overlaid by shadow memory. This allows the system to map
different banks of physical memory into and out of a single address range in
response to hardware selection signals. In other words, multiple banks of
physical memory overlay each other at one address range. You may want the
linker to load various output sections into each of these banks or into banks
that are not mapped at load time.
The linker supports this feature by providing
overlay pages. Each page
represents an address range that must be configured separately with the
MEMORY directive. You can then use the SECTIONS directive to specify the
sections to be mapped into various pages.
7.11.1 Using the MEMORY Directive to Define Overlay Pages
To the linker, each overlay page represents a completely separate memory
comprising the full 24-bit range of addressable locations. This allows you to
link two or more sections at the same (or overlapping) addresses if they are
on different pages.
Pages are numbered sequentially, beginning with 0. If you do not use the
PAGE option, the linker allocates initialized sections into PAGE 0 (program
memory) and uninitialized sections into PAGE 1 (data memory).
For example, assume that your system can select between two banks of
physical memory for data memory space: address range A00h to FFFFh for
PAGE 1 and 0A00h to 2BFF for PAGE 2. Although only one bank can be
selected at a time, you can initialize each bank with different data. This is how
you use the MEMORY directive to obtain this configuration:
Example 7–10. Memory Directive With Overlay Pages
ÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇ
ÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇ
ÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇ
ÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇ
ÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇ
ÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇÇ
MEMORY
{
PAGE 0 : ONCHIP : origin = 0800h, length = 0240h
: PROG : origin = 02C00h, length = 0D200h
PAGE 1 : OVR_MEM : origin = 0A00h, length = 02200h
: DATA : origin = 02C00h, length = 0D400h
PAGE 2 : OVR_MEM : origin = 0A00h, length = 02200h
}
Содержание 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: ......