i960 Processor Compiler User's Guide
10-4
10
RAM-based Initialization
The lib/cycx.ld configuration file links the crt960.o startup file to run
a program under the MON960 monitor.
ROM-based Initialization
ROM-based startup routines must ensure that all the variable data is in
RAM. The routines must do the following:
• Physically move any system data structures that the program modifies;
move the structures to the RAM address space.
• Move the initialized variable data from ROM to the
.data section.
• Restart the processor, using the IAC (inter-agent communication) for
KA, KB, SA, and SB architectures, or using the sysctl instruction for
the
Cx, Hx and Jx architectures.
A startup routine performs the following operations to create a ROM-
based application:
• Create an initialization boot record as a separately translated module.
• Create architecture-specific data structures.
• Initialize any necessary board-specific memory subsystems in either
the
main or the startup routine of your program
Use the linker to locate the initialization boot record, system data
structures, and program code in the appropriate memory location for the
architecture and board configuration, as follows:
• Put
.text code sections in the ROM address range
• Put
.data and .bss data in the RAM address range
Use the linker to define variables used symbolically in the startup routine.
The linker automatically generates symbols named
__B
section
for the
beginning and
__E
section
for the end of each section of your program.