‑‑extra_init
In this section:
Syntax
Parameters
| A user-defined initialization routine. |
Description
Use this option to make the linker add an entry for the specified routine at the end of the initialization table. The routine will be called during system startup, after other initialization routines have been called and before main is called. No entry is added if the routine is not defined.
Note
The routine must preserve the value passed to it in register R0. For this reason, it is safest to write it in assembler language.
Caution
To set this option, use Project>Options>Linker>Extra Options.