Atmel CAVR-4 Manual De Usuario
![Atmel](https://files.manualsbrain.com/attachments/0369829915bda09f9c2e00fb805a7753579683b5/common/fit/150/50/8d2bf08978ec3e5bc63f4343ac5e91ce8d0e40045619fa520d910d64af8f/brand_logo.png)
CAVR-4
244
IAR DLIB Library
AVR® IAR C/C++ Compiler
Reference Guide
LIBRARY OBJECT FILES
Most of the library definitions can be used without modification, that is, directly from
the library object files that are supplied with the product. For information about how to
choose a runtime library, see Basic settings for project configuration, page 5. The linker
will include only those routines that are required—directly or indirectly—by your
application.
the library object files that are supplied with the product. For information about how to
choose a runtime library, see Basic settings for project configuration, page 5. The linker
will include only those routines that are required—directly or indirectly—by your
application.
REENTRANCY
A function that can be simultaneously invoked in the main application and in any
number of interrupts is reentrant. A library function that uses statically allocated data is
therefore not reentrant. Most parts of the DLIB library are reentrant, but the following
functions and parts are not reentrant:
number of interrupts is reentrant. A library function that uses statically allocated data is
therefore not reentrant. Most parts of the DLIB library are reentrant, but the following
functions and parts are not reentrant:
In addition, some functions share the same storage for
errno
. These functions are not
reentrant, since an
errno
value resulting from one of these functions can be destroyed
by a subsequent use of the function before it has been read. Among these functions are:
exp, exp10, ldexp, log, log10, pow, sqrt, acos, asin, atan2,
cosh, sinh, strtod, strtol, strtoul
Remedies for this are:
●
Do not use non-reentrant functions in interrupt service routines
●
Guard calls to a non-reentrant function by a mutex, or a secure region, etc.
IAR DLIB Library
The IAR DLIB Library provides most of the important C and C++ library definitions
that apply to embedded systems. These are of the following types:
that apply to embedded systems. These are of the following types:
●
Adherence to a free-standing implementation of the ISO/ANSI standard for the
programming language C. For additional information, see the chapter
Implementation-defined behavior in this guide.
programming language C. For additional information, see the chapter
Implementation-defined behavior in this guide.
atexit
Needs static data
heap functions
Need static data for memory allocation tables
strerror
Needs static data
strtok
Designed by ISO/ANSI standard to need static data
I/O
Every function that uses files in some way. This includes
printf
, scanf, getchar, and putchar. The
functions sprintf and sscanf are not included.