Atmel CAVR-4 Manual De Usuario

Descargar
Página de 323
CAVR-4
64
System startup and termination
AVR® IAR C/C++ Compiler
Reference Guide
System startup and termination
This section describes the runtime environment actions performs during startup and 
termination of applications. The following figure gives a graphical overview of the 
startup and exit sequences:
Figure 1: Startup and exit sequences
The code for handling startup and termination is located in the source files 
cstartup.s90
 and 
_exit.s90
, and 
low_level_init.c
 located in the 
avr\src\lib
 directory.
Reset
_ _low_level_init
Hardware setup
Static initialization
Dynamic C++ initialization
exit
abort
_Exit
_ _exit
Application
main
Program entry label 
cstartup
Return from 
main
 and call 
exit
System terminated
_exit
Dynamic C++ destruction
 and 
atexit
 execution
_exit