User`s guide

Libraries and Runtime Code
Runtime Initialization
329Targeting MC56F83xx/DSP5685x Controllers
Definitions
Stack
The stack is a last-in-first-out (LIFO) data structure. Items are pushed on the stack and
popped off the stack. The most recently added item is on top of the stack. Previously
added items are under the top, the oldest item at the bottom. The "top" of the stack
may be in low memory or high memory, depending on stack design and use. M56800E
uses a 16-bit-wide stack.
Heap
Heap is an area of memory reserved for temporary dynamic memory allocation and
access. MSL uses this space to provide heap operations such as malloc. M56800E
does not have an operating system (OS), but MSL effectively synthesizes some OS
services such as heap operations.
BSS
BSS is the memory space reserved for uninitialized data. The compiler will put all
uninitialized data here. If the Zero initialized globals live in data instead of BSS
checkbox in the M56800E Processor Panel is checked, the globals that are initialized
to zero reside in the .data section instead of the .bss section. The stationery init
code zeroes this area at startup. See the M56852 init (startup) code in this chapter for
general information and the stationery init code files for specific target
implementation details.
NOTE
Instead of accessing the original Stationery files themselves (in the
Stationery folder), create a new project using Stationery which will
make copies of the specific target board files such as the LCF.
Runtime Initialization
The default init function is the bootstrap or glue code that sets up the DSP56800E
environment before your code executes. This function is in the init file for each board-
specific stationery project. The routines defined in the init file performs other tasks
such as clearing the hardware stack, creating an interrupt table, and retrieving the stack
start and exception handler addresses.
The final task performed by the init function is to call the main() function.