8.2. Entry PointΒΆ

The entry point is the address at which the execution of the program begins. This is the address of the startup routine. The startup routine is responsible for initializing and calling the rest of the program. For a C/C++ program, the startup routine is usually named _c_int00 (see The _c_int00 Function). After the program is loaded, the value of the entry point is placed in the PC register and the CPU is allowed to run.

The object file has an entry point field. For a C/C++ program, the linker will fill in _c_int00 by default. You can select a custom entry point; see Define an Entry Point (--entry_point Option). The device itself cannot read the entry point field from the object file, so it has to be encoded in the program somewhere.

  • If you are using a bootloader, the boot table includes an entry point field. When it finishes running, the bootloader branches to the entry point.

  • If you are using an interrupt vector, the entry point is installed as the RESET interrupt handler. When RESET is applied, the startup routine will be invoked.

  • If you are using a hosted debugger, such as CCS, the debugger may explicitly set the program counter (PC) to the value of the entry point.