2.4.5. Root regions

A root region is an execution region with a load address that is the same as its execution address. Each scatter-loading description file must have at least one root region.

One restriction placed on scatter-loading is that the code and data responsible for creating execution regions, for example, copying and zeroing code and data, cannot itself be copied to another location. As a result, the following sections must be included in a root region:

However, these can be described using InRoot$$Sections.

Because these sections are defined as read-only, they are grouped by the * (+RO) wildcard syntax. As a result, if * (+RO) is specified in a non-root region, these sections must be explicitly declared in a root region. This is shown in Example 2.4.

Example 2.4. Specifying a root region

ROM_LOAD 0x0000 0x4000
  ROM_EXEC 0x0000 0x4000      ; root region
    vectors.o (Vect, +FIRST)  ; Vector table
    * (InRoot$$Sections)      ; All library sections that must be in a
                              ; root region, for example, __main.o,
                              ; __scatter*.o, __dc*.o, and * Region$$Table
  RAM 0x10000 0x8000
    * (+RO, +RW, +ZI)         ; all other sections

Failing to include __main.o, __scatter.o, __dc*.o and Region$$Table in a root region results in the linker generating an error message such as:

Error: L6202E: Section Region$$Table cannot be assigned to a non-root region.

Copyright © 2002-2006 ARM Limited. All rights reserved.ARM DUI 0203G