- IAR Embedded Workbench for RL78 5.20
- IAR C/C++ Development
- The linker configuration file
- Overview of the linker configuration file
Overview of the linker configuration file
Before you read the following pages, you must be familiar with the concept of sections, see Modules and sections.
To link and locate an application in memory according to your requirements, ILINK needs information about how to handle sections and how to place them into the available memory regions. In other words, ILINK needs a configuration, passed to it by means of the linker configuration file.
This file consists of a sequence of directives and typically, provides facilities for:
Declaring the build type
informing the linker of whether the build is for a traditional ROM system or for a RAM system, helping the linker check that only suitable sections are placed in the different memory regions.
Defining available addressable memories
giving the linker information about the maximum size of possible addresses and defining the available physical memory, as well as dealing with memories that can be addressed in different ways.
Defining the regions of the available memories that are populated with ROM or RAM
giving the start and end address for each region.
Section groups
dealing with how to group sections into blocks and overlays depending on the section requirements.
Defining how to handle initialization of the application
giving information about which sections that are to be initialized, and how that initialization should be made.
Memory allocation
defining where—in what memory region—each set of sections should be placed.
Using symbols, expressions, and numbers
expressing addresses and sizes, etc, in the other configuration directives. The symbols can also be used in the application itself.
Structural configuration
meaning that you can include or exclude directives depending on a condition, and to split the configuration file into several different files.
Special characters in names
When specifying the name of a symbol or section that uses non-identifier characters, you can enclose the name in back quotes. Example:
‘My Name‘.
Comments can be written either as C comments (/*...*/) or as C++ comments (//...).