The startup code must call the application's entry point, located in the ROM library. You must explicitly call this function by name. Ideally, call the application's entry point just before calling the application's main routine (refer the following listing).
void _Startup(void) { ... set up stack pointer ... ... zero out ... ... copy down ... CopyCode(); ... call main ... }