SPRUIG8J January 2018 – March 2024
C/C++ programs require initialization of the run-time environment before execution of the program itself may begin. This initialization is performed by a bootstrap routine. This routine is responsible for creating the stack, initializing global variables, and calling the main() function. The bootstrap routine should be the entry point for the program, and it typically should be the RESET interrupt handler. The bootstrap routine is responsible for the following tasks:
When you compile a C/C++ program and use --rom_model or --ram_model, the linker automatically looks for a bootstrap routine named _c_int00. The run-time support library provides a sample _c_int00 in boot.c.obj, which performs the required tasks. If you use the run-time support's bootstrap routine, you should set _c_int00 as the entry point.
The _c_int00 Symbol: If you use the --ram_model or --rom_model link option, _c_int00 is automatically defined as the entry point for the program. If your command line does not list any C/C++ files to compile and does not specify either the --ram_model or --rom_model link option, the linker does not know whether or not to use the C/C++ conventions, and you will receive a linker warning that says "warning: no suitable entry-point found; setting to 0". See Section 11.3.4 for details about using the --rom_model and --ram_model options.