|ERC32 Ada Technical Summary: For mission-critical applications using the ERC32 spacecraft computer|
|Prev||Chapter 3. Language-Related Issues||Next|
An ERC32 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 ERC32 Microprocessor, the entire program will consist of four items:
The startup module, art0.S, which contains the entry point
The function main, which calls any Ada elaboration routines then calls the Ada main procedure
The Ada program comprising the Ada main procedure and any library packages in the link closure of the main program
Library routines as required to support the generated code (multiply and divide for example)
The ANSI C libraries libc and libm may also be used to provide basic services needed while a program is under development.