Placing a structure
over a peripheral register using __at
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 the 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.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.