Atmel CAVR-4 Manual De Usuario

Descargar
Página de 323
CAVR-4
54
Introduction to the runtime environment
AVR® IAR C/C++ Compiler
Reference Guide
The runtime library is delivered both as prebuilt libraries and as source files, and you 
can find them in the product subdirectories 
avr\lib
 and 
avr\src
, respectively.
The runtime environment also consists of a part with specific support for the target 
system, which includes:
Support for hardware features:
Direct access to low-level processor operations by means of intrinsic functions, 
such as functions for register handling
Peripheral unit registers and interrupt definitions in include files
Special compiler support for accessing strings in flash memory, see AVR–specific 
library functions
, page 249
Runtime environment support, that is, startup and exit code and low-level interface 
to some library functions.
Some parts, like the startup and exit code and the size of the heaps must be tailored for 
the specific hardware and application requirements.
For further information about the library, see the chapter Library functions.
LIBRARY SELECTION
To configure the most code-efficient runtime environment, you must determine your 
application and hardware requirements. The more functionality you need, the larger 
your code will get.
IAR Embedded Workbench comes with a set of prebuilt runtime libraries. To get the 
required runtime environment, you can customize it by:
Setting library options, for example, for choosing 
scanf
 input and 
printf
 output 
formatters, and for specifying the size of the stack and the heap
Overriding certain library functions, for example 
cstartup.s90
, with your own 
customized versions
Choosing the level of support for certain standard library functionality, for example, 
locale, file descriptors, and multibytes, by choosing a library configuration: normal 
or full.
In addition, you can also make your own library configuration, but that requires that you 
rebuild the library. This allows you to get full control of the runtime environment.
Note: Your application project must be able to locate the library, include files, and the 
library configuration file.