Download TASKING VX-toolset for RH850 User Guide

Transcript
Linker Script Language (LSL)
• The type field specifies a memory type:
• rom: read-only memory - it can only be written at load-time
• ram: random access volatile writable memory - writing at run-time is possible while writing at load-time
has no use since the data is not retained after a power-down
• nvram: non volatile ram - writing is possible both at load-time and run-time
• blockram: writing is possible both at load-time and run-time. Changes are applied in RAM, so after
a full device reset the data in a blockram reverts to the original state.
The optional reserved qualifier before the memory type, tells the linker not to locate any section in
the memory by default. You can locate sections in such memories using an absolute address or range
restriction (see subsection Locating a group in Section 13.8.2, Creating and Locating Groups of Sections).
• The mau field specifies the MAU size (Minimum Addressable Unit) of the memory. This field is required.
• The size field specifies the size in MAU of the memory. This field is required.
• The priority field specifies a locate priority for a memory. The speed field has the same meaning
but is considered deprecated. By default, a memory has its priority set to 1. The memories with the
highest priority are considered first when trying to locate a rule. Subsequently, the next highest priority
memories are added if the rule was not located successfully, and so on until the lowest priority that is
available is reached or the rule is located. The lowest priority value is zero. Sections with an ordered
and/or contiguous restriction are not affected by the locate priority. If such sections also have a page
restriction, the locate priority is still used to select a page.
• If an exec_priority is specified for a memory, the regular priority (either specified or its default
value) does not apply to locate rules with only executable sections. Instead, the supplied value applies
for such rules. Additionally, the exec_priority value is used for any executable unrestricted sections,
even if they appear in an unrestricted rule together with non-executable sections.
• The map field specifies how this memory maps onto an (internal) bus. The mapping can have a name.
Mappings are described in Section 13.4.4, Mappings.
• The optional write_unit field specifies the minimum write unit (MWU). This is the minimum number
of MAUs required in a write action. This is useful to initialize memories that can only be written in units
of two or more MAUs. If write_unit is not defined the minimum write unit is 0.
• The optional fill field contains a bit pattern that the linker writes to all memory addresses that remain
unoccupied during the locate process. The result of the expression, or list of expressions, is used as
values to write to memory, each in MAU.
memory mem_name
{
type = rom;
mau = 8;
write_unit = 4;
fill = 0xaa;
size = 64k;
priority = 2;
563