Services and Modeling for Embedded Software Development
Embecosm divider strip
Prev  Next

5.2.  The C Runtime Initialization, crt0.o

5.2.1. Exception vector setup
5.2.2. The _start Function and Stack Initialization
5.2.3. Cache Initialization
5.2.4. Clearing BSS
5.2.5. Constructor and Destructor Handling
5.2.6. C Initialization Functions
5.2.7. Invoking the main program

The C Runtime system must carry out the following tasks.

The code is invariably assembler, although it may call out to C functions, and is best illustrated by example from the OpenRISC 1000 . This is a BSP designed for use with a fast architectural simulator. It comes in two variants, one providing just standard output to the console, the other implementing a simulated UART with both standard input and standard output. The crt0.0 is common to both BSPs and found in crt0.S.

Embecosm divider strip