5.3.2. Creating root execution regions

If you specify an initial entry point for an image, or if the linker creates an initial entry point because you have used only one ENTRY directive, you must ensure that the entry point is located in a root region. A root region is a region having the same load and execution address. If the initial entry point is not in a root region, the link fails and the linker gives an error message such as:

Entry point (0x00000000) lies within non-root region ER_ROM

To specify that a region is a root region in a scatter-loading description file you can either:

You can use the FIXED attribute to place any execution region at a specific address in ROM. See Placing regions at fixed addresses for more information.

Example 5.2. Specifying the same load and execution address

LR_1 0x040000          ; load region starts at 0x40000   
{                      ; start of execution region descriptions	      
    ER_RO 0x040000     ; load address = execution address
    {
        * (+RO)        ; all RO sections (must include section with 
                       ; initial entry point)
    }
                       ; rest of scatter description...
}

Example 5.3. Using the FIXED attribute

LR_1 0x040000              ; load region starts at 0x40000   
{                          ; start of execution region descriptions	      
    ER_RO 0x040000         ; load address = execution address
    {
        * (+RO)            ; RO sections other than those in init.o
    }
    ER_INIT 0x080000 FIXED ; load address and execution address of this
                           ; execution region are fixed at 0x80000
    {
        init.o(+RO)        ; all RO sections from init.o
    }
                           ; rest of scatter description...
}

Figure 5.9. Memory Map for fixed execution regions

Copyright © 2005 ARM Limited. All rights reserved.ARM DUI 0285B
Non-Confidential