Specifications
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