ChibiOS/RT
2.5.1
Startup Support
Collaboration diagram for Startup Support:

ChibiOS/RT provides its own generic startup file for the ARM Cortex-Mx port. Of course it is not mandatory to use it but care should be taken about the startup phase details.

Startup Process

The startup process, as implemented, is the following:

  1. Interrupts are masked globally.
  2. The two stacks are initialized by assigning them the sizes defined in the linker script (usually named ch.icf).
  3. The CPU state is switched to Privileged and the PSP stack is used.
  4. An early initialization routine __early_init() is invoked, if the symbol is not defined then an empty default routine is executed (weak symbol).
  5. Control is passed to the C runtime entry point __cmain that performs the required initializations before invoking the main() function.