3.10. Section 10: Program Structure and Compilation Issues

An LEON Ada program may use any mixture of programming languages supported by the compiler, assembler or the linker. One procedure must become the main program, but this need not be written in Ada 95.

If the main program is written in Ada then it must be a parameter-less library procedure. If the main program is written in C then the standard arguments of function main will be null.

The main program is called by a run-time system module (art0.S) that initializes the stack and variable data area, and which contains code to handle traps and interrupts. Code in art0.S can also copy program sections from the boot PROM into RAM.

For the LEON Microprocessor, the entire program will consist of four items:

The ANSI C libraries libc and libm may also be used to provide basic services needed while a program is under development.