
6-6
Motorola DSP56000 Family Optimizing C Compiler User’s Manual
For More Information On This Product,
Go to: www.freescale.com
Motorola
Interrupt Vectors
Example 6-4. Fast Heap
The heap is required to reside in an 8k SRAM starting at L:$4000. The following program
reserves the heap space using org and ds statements and sets the initial heap pointer to the
SRAM heap area.
Add this section to the
crt0
file:
section fast_ram
org
L:$4000
ds
$2000
endsec
Change the following line of C bootstrap code in the
crt0
file:
TOP_OF_MEMORY
equ
$ffbe
to:
TOP_OF_MEMORY
equ
$5fff
Sometimes hardware configurations map more than one memory space into a single
physical memory. Other implementations partially populate various address spaces
leaving holes. Some may have different regions with fast memory and slow memory. All
of these special cases can usually be handled by modifying the
crt0
file.
When multiple memory spaces are mapped into a single physical memory, the memory
must be partitioned among the memory spaces. A way to restrict the linker from
overlapping these memory spaces is needed. For example, suppose that both the Y and P
spaces are mapped into the same 64k physical RAM and need to be partitioned with the
low 48k for program memory and the high 16k for data memory.
The linker can be restricted from allocating across holes in physical memory by using the
org
and
ds
directives to confiscate those addresses. Note that the linker may not
automatically take advantage of memory which is present between holes. It may be
required to manually place assembly language data structures to utilize this memory.
6.6 Interrupt Vectors
The interrupt vector locations for the DSP56000 family (a.k.a. “interrupt source” in
Section 8 of the
DSP56000/DSP56001 User’s Manual
) contain one or two instructions
each to be executed when the interrupt assigned to that location occurs. There are 32
interrupt vectors available, all of which should be initialized with some value to avoid
undefined behavior resulting from an unexpected interrupt.
F
Freescale Semiconductor, Inc.
n
.