We describe here the steps performed by eCos upon start-up, mentioning how a programmer can introduce custom start-up routines.
The HAL (Hardware Abstraction Layer, see Chapter 7) is the eCos package which contains all start-up code. Its start-up procedure is outlined in detail in the section called HAL startup in Chapter 7, but the main steps can be summarized here:
The HAL initializes the hardware, coordinates with the ROM monitor, and performs diagnostics.
The HAL invokes all static and global C++ constructors.
The HAL jumps to cyg_start(), which has the following prototype:
void cyg_start
(void);