5.3.5. Assigning sections to a root region
In RVCT v2.1 and earlier, the only library sections that must be placed in a root region, are __main and the region tables. However, with the implementation of RW data compression there are more sections that must be placed in a root region. The linker can place all these sections automatically with InRoot$$Sections.
Use a scatter-loading description file to specify a root section in the same way as a named section. Example 5.19 uses the section selector InRoot$$Sections to place all sections that must be in a root region in a region called ER_ROOT.
Example 5.19. Specifying a root region
LR_FLASH 0x0
{
ER_ROOT 0x0 ; root region at 0x0
{
vectors.o (Vectors, +FIRST) ; vector table
* (InRoot$$Sections) ; all library sections that must be
; in a root region
}
. .. ; rest of scatter description...
}