define region directive
In this section:
Syntax
define [ ram | rom ] regionname=region-expr;
where region-expr is a region expression, see also Regions.
Parameters
| The region contains RAM memory. |
| The region contains ROM memory. |
| The name of the region. |
Description
The define region directive defines a region in which specific sections of code and sections of data can be placed. A region consists of one or several memory ranges, where each memory range consists of a continuous sequence of bytes in a specific memory. Several ranges can be combined by using region expressions—these ranges do not need to be consecutive or even in the same memory.
If you declare regions as being ROM or RAM, the linker can check that only suitable sections are placed in the regions if you are building a traditional ROM-based system (see build for directive).
Example
/* Define the 0x10000-byte code region ROM located at address 0x10000 */ define rom region ROM = [from 0x10000 size 0x10000];