Memory Allocation Shown In Example 7-7 And Example - Texas Instruments TMS320C54x User Manual

Digital signal processors
Table of Contents

Advertisement

Using UNION and GROUP Statements
Figure 7–5. Memory Allocation Shown in Example 7–7 and Example 7–8
7-46
Allocation for Example 7–7
RAM
.bss2
.bss1
.bss3
É É É É É É É
É É É É É É É
É É É É É É É
ROM
.text
É É É É É É É
É É É É É É É
É É É É É É É
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.
Allocation for Example 7–8
Sections can run
as a union. This is
runtime allocation
only.
É É É É É É É
É É É É É É É
É É É É É É É
Sections cannot
load as a union.
É É É É É É É
É É É É É É É
É É É É É É É
RAM
Copies at
.text 2 (run)
runtime
.text 1 (run)
ROM
.text 1 (load)
.text 2 (load)

Advertisement

Table of Contents
loading

Table of Contents