06.02.2013 Views

ARM Compiler toolchain Using the Linker - ARM Information Center

ARM Compiler toolchain Using the Linker - ARM Information Center

ARM Compiler toolchain Using the Linker - ARM Information Center

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

8.9 Creating root execution regions<br />

To specify a region as a root region in a scatter file you can:<br />

<strong>Using</strong> scatter files<br />

• Specify ABSOLUTE as <strong>the</strong> attribute for <strong>the</strong> execution region, ei<strong>the</strong>r explicitly or by<br />

permitting it to default, and use <strong>the</strong> same address for <strong>the</strong> first execution region and <strong>the</strong><br />

enclosing load region. To make <strong>the</strong> execution region address <strong>the</strong> same as <strong>the</strong> load region<br />

address, ei<strong>the</strong>r:<br />

— Specify <strong>the</strong> same numeric value for both <strong>the</strong> base address for <strong>the</strong> execution region<br />

and <strong>the</strong> base address for <strong>the</strong> load region.<br />

— Specify a +0 offset for <strong>the</strong> first execution region in <strong>the</strong> load region.<br />

If an offset of zero (+0) is specified for all subsequent execution regions in <strong>the</strong> load<br />

region, <strong>the</strong>n all execution regions not following an execution region containing ZI<br />

are also root regions.<br />

The following example shows an implicitly defined root region:<br />

Example 8-4 Implicit root region with <strong>the</strong> same load and execution address<br />

LR_1 0x040000 ; load region starts at 0x40000<br />

{ ; start of execution region descriptions<br />

ER_RO 0x040000 ; load address = execution address<br />

{<br />

* (+RO) ; all RO sections (must include section with<br />

; initial entry point)<br />

}<br />

... ; rest of scatter-loading description<br />

}<br />

• Use <strong>the</strong> FIXED execution region attribute to ensure that <strong>the</strong> load address and execution<br />

address of a specific region are <strong>the</strong> same.<br />

You can use <strong>the</strong> FIXED attribute to place any execution region at a specific address in ROM.<br />

For example, <strong>the</strong> following memory map shows fixed execution regions:<br />

Single<br />

load<br />

region<br />

init.o<br />

Empty<br />

*(RO)<br />

Load view<br />

Filled with zeroes or <strong>the</strong> value defined using<br />

<strong>the</strong> --pad option<br />

0x80000<br />

0x4000<br />

Execution view<br />

Figure 8-3 Memory map for fixed execution regions<br />

The following example shows <strong>the</strong> corresponding scatter-loading description:<br />

<strong>ARM</strong> DUI 0474C Copyright © 2010-2011 <strong>ARM</strong>. All rights reserved. 8-14<br />

ID080411 Non-Confidential<br />

init.o<br />

*(RO)<br />

(FIXED)<br />

(movable)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!