Customizing and building your own runtime library
If the prebuilt library configurations do not meet your requirements, you can customize your own library configuration, but that requires that you rebuild relevant parts of the library.
Note
Customizing and building your own runtime library requires access to the library source code, which is not available for all types of IAR Embedded Workbench licenses.
Building a customized library is a complex process. Therefore, consider carefully whether it is really necessary. You must build your own runtime library when:
You want to define your own library configuration with support for locale, file descriptors, multibyte characters, etc. This will include or exclude certain parts of the DLIB runtime environment.
In those cases, you must:
Make sure that you have installed the library source code (
src\lib). If not already installed, you can install it using the IAR License Manager, see the Licensing Guide.Set up a library project
Make the required library customizations
Build your customized runtime library
Finally, make sure your application project will use the customized runtime library.
In the IDE, choose Project>Create New Project and use any of the library project templates that are available for the prebuilt libraries and that matches the project settings you need as closely as possible. See Prebuilt runtime libraries.
Note
When you create a new library project from a template, the majority of the files included in the new project are the original installation files. If you are going to modify these files, make copies of them first and replace the original files in the project with these copies.
Modify the generic options in the created library project to suit your application, see Basic project configuration.
The library functionality is determined by a set of configuration symbols. The default values of these symbols are defined in the file
DLib_Defaults.hwhich you can find inrh850\inc\c. This read-only file describes the configuration possibilities. Note that you should not modify this file.In addition, you can create your own library configuration file by making a copy of the file
DLib_Config_configuration.h—which you can find in the directory—and customize it by setting the values of the configuration symbols according to the application requirements.For information about configuration symbols that you might want to customize, see:
When you are finished, build your library project with the appropriate project options.
After you build your library, you must make sure to use it in your application project.
Danger
To build IAR Embedded Workbench projects from the command line, use the IAR Command Line Build Utility (
iarbuild.exe). However, no make or batch files for building the library from the command line are provided.For information about the build process and the IAR Command Line Build Utility, see Building projects.
In the IDE, choose Project>Options>General Options and click the Library Configuration tab.
From the Library drop-down menu, choose Custom.
In the Configuration file text box, locate your library configuration file.
Click the Library tab, also in the Linker category. Use the Additional libraries text box to locate your library file.