Atmel CAVR-4 Manual De Usuario
CAVR-4
Part 1. Using the compiler
The DLIB runtime environment
63
SETTING UP A LIBRARY PROJECT
IAR Embedded Workbench provides a library project template which can be used for
customizing the runtime environment configuration. This library template has full
library configuration, see Table 13, Library configurations, page 55.
customizing the runtime environment configuration. This library template has full
library configuration, see Table 13, Library configurations, page 55.
In IAR Embedded Workbench, modify the generic options in the created library project
to suit your application, see Basic settings for project configuration, page 5.
to suit your application, see Basic settings for project configuration, page 5.
Note: There is one important restriction on setting options. If you set an option on file
level (file level override), no options on higher levels that operate on files will affect that
file.
level (file level override), no options on higher levels that operate on files will affect that
file.
MODIFYING THE LIBRARY FUNCTIONALITY
You must modify the library configuration file and build your own library to modify
support for, for example, locale, file descriptors, and multibytes. This will include or
exclude certain parts of the runtime environment.
support for, for example, locale, file descriptors, and multibytes. This will include or
exclude certain parts of the runtime environment.
The library functionality is determined by a set of configuration symbols. The default
values of these symbols are defined in the file
values of these symbols are defined in the file
Dlib_defaults.h
. This read-only file
describes the configuration possibilities. In addition, your library has its own library
configuration file
configuration file
dlavrCustom.h
, which sets up that specific library with full library
configuration. For more information, see Table 16, Customizable items, page 58.
The library configuration file is used for tailoring a build of the runtime library, as well
as tailoring the system header files.
as tailoring the system header files.
Modifying the library configuration file
In your library project, open the file
dlavrCustom.h
and customize it by setting the
values of the configuration symbols according to the application requirements.
When you are finished, build your library project with the appropriate project options.
USING A CUSTOMIZED LIBRARY
After you have built your library, you must make sure to use it in your application
project.
project.
In IAR Embedded Workbench you must perform the following steps:
1
Choose Project>Options and click the Library Configuration tab in the General
Options category.
Options category.
2
Choose Custom DLIB from the Library drop-down menu.
3
In the Library file text box, locate your library file.
4
In the Configuration file text box, locate your library configuration file.