7.2.11 Mapping a structure over a peripheral register with an __at section

You can place a structure over a peripheral register with scatter-loading.

To place an uninitialized variable over a peripheral register, you can use a ZI __at section. Assuming a register is available for use at 0x10000000 define a ZI __at section called .ARM.__at_0x10000000. For example:

int foo __attribute__((section(".ARM.__at_0x10000000"), zero_init));

The following example shows a scatter file with the manual placement of the ZI __at section:


Using automatic placement, and assuming that there is no other execution region near 0x10000000, the linker automatically creates a region with the UNINIT attribute at 0x10000000. The UNINIT attribute creates an execution region containing uninitialized data or memory-mapped I/O.

Non-ConfidentialPDF file icon PDF versionARM DUI0474M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.