33.2. Baremetal bootloaders

As can be seen from Baremetal GDB step debug, all examples under baremetal/, with the exception of baremetal/arch/<arch>/no_bootloader, start from our tiny bootloaders:

Out simplistic bootloaders basically setup up just enough system state to allow calling:

  • C functions such as exit from the assembly examples

  • the main of C examples itself

The most important things that we setup in the bootloaders are:

The C functions that become available as a result are:

It is not possible to call those C functions from the examples that don’t use a bootloader.

For this reason, we tend to create examples with bootloaders, as it is easier to write them portably.