Chapter 4. System startup

Table of Contents
System startup — the HAL
System startup — cyg_start()
System startup — cyg_prestart()
System startup — cyg_package_start()
System startup — cyg_user_start()

We describe here the steps performed by eCos upon startup, mentioning how a programmer can introduce custom startup routines.

System startup — the HAL

The HAL (Hardware Abstraction Layer, see Appendix A) is the eCos package which contains all startup code. Its startup procedure is outlined in detail in the section called HAL startup in Appendix A, but the main steps can be summarized here:

  1. The HAL initializes the hardware, coordinates with the ROM monitor and peforms diagnostics.

  2. The HAL invokes all static and global C++ constructors.

  3. The HAL jumps to cyg_start(), which has the following prototype:

    void cyg_start(void);