
Using UNION and GROUP Statements
7-46
Figure 7–5. Memory Allocation Shown in Example 7–7 and Example 7–8
ÉÉÉÉÉÉÉ
ÉÉÉÉÉÉÉ
ÉÉÉÉÉÉÉ
ÉÉÉÉÉÉÉ
ÉÉÉÉÉÉÉ
ÉÉÉÉÉÉÉ
ROM
RAM
.text 2 (run)
.text 1 (load)
.text 1 (run)
.text 2 (load)
Copies at
runtime
ÉÉÉÉÉÉÉ
ÉÉÉÉÉÉÉ
ÉÉÉÉÉÉÉ
ÉÉÉÉÉÉÉ
ÉÉÉÉÉÉÉ
ÉÉÉÉÉÉÉ
ROM
RAM
.text
.bss2
.bss1
.bss3
Allocation for Example 7–7
Allocation for Example 7–8
Sections cannot
load as a union.
Sections can run
as a union. This is
runtime allocation
only.
Since the .text sections contain data, they cannot
load as a union, although
they can be
run as a union. Therefore, each requires its own load address. If
you fail to provide a load allocation for an initialized section within a union, the
linker issues a warning and allocates load space anywhere it fits in configured
memory.
Uninitialized sections are not loaded and do not require load addresses.
The UNION statement applies only to allocation of run addresses, so it is
redundant to specify a load address for the union itself. For purposes of
allocation, the union is treated as an uninitialized section: any one allocation
specified is considered a run address, and, if both are specified, the linker
issues a warning and ignores the load address.
Note:
UNION and Overlay Page Are Not the Same
The UNION capability and the
overlay page capability (see Section 7.11,
Overlay Pages, on page 7-48) may sound similar because they both deal
with overlays. They are, in fact, quite different. UNION allows multiple
sections to be overlaid
within the same memory space. Overlay pages, on
the other hand, define
multiple memory spaces. It is possible to use the page
facility to approximate the function of UNION, but this is cumbersome.
Содержание 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: ......