- IAR Embedded Workbench for RISC-V 3.40
- IAR C/C++ Development
- The linker configuration file
- Defining memories and regions
Defining memories and regions
ILINK needs information about the available memory spaces, or more specifically it needs information about:
The maximum size of possible addressable memories
The
define memorydirective defines a memory space with a given size, which is the maximum possible amount of addressable memory, not necessarily physically available. See define memory directive.Available physical memory
The
define regiondirective defines a region in the available memories in which specific sections of application code and sections of application data can be placed. You can also use this directive to declare whether a region contains RAM or ROM memory. This is primarily useful when building for a traditional ROM system. See define region directive.A region consists of one or several memory ranges. A range is a continuous sequence of bytes in a memory and several ranges can be expressed by using region expressions. See Region expression.
The following pages give detailed information about each linker directive specific to defining memories and regions.