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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

8.24 Placing a structure over a peripheral register using __at<br />

8.24.1 See also<br />

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

To place an uninitialized variable over a peripheral register, a ZI __at section can be used.<br />

Assuming a register is available for use at 0x10000000, define a ZI __at section called<br />

.<strong>ARM</strong>.__at_0x10000000. For example:<br />

int foo __attribute__((section(“.<strong>ARM</strong>.__at_0x10000000”), zero_init));<br />

The following example shows <strong>the</strong> a scatter file with <strong>the</strong> manual placement of <strong>the</strong> ZI __at section:<br />

ER_PERIPHERAL 0x10000000 UNINIT<br />

{<br />

*(.<strong>ARM</strong>.__at_0x10000000)<br />

}<br />

Example 8-15 Manual placement of ZI __at sections<br />

<strong>Using</strong> automatic placement, assuming that <strong>the</strong>re is no o<strong>the</strong>r execution region near 0x10000000,<br />

<strong>the</strong> linker automatically creates a region with <strong>the</strong> UNINIT attribute at 0x10000000. The UNINIT<br />

attribute creates an execution region containing uninitialized data or memory-mapped I/O.<br />

Concepts<br />

• <strong>Using</strong> __at sections to place sections at a specific address on page 8-37.<br />

<strong>Linker</strong> Reference:<br />

• About execution region descriptions on page 4-8.<br />

Reference<br />

<strong>Linker</strong> Reference:<br />

• Execution region attributes on page 4-11.<br />

<strong>Compiler</strong> Reference:<br />

• __attribute__((section("name"))) variable attribute on page 5-72.<br />

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

ID080411 Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!