The _startup() function is called as the first function after the reset. The _startup() function initializes the stack pointer, calls the __initialize_hardware() function and continues with initialization of the enviroment (such as memory initialization). At the end of the _startup() function the main() function is called.