Keil Logo Arm Logo

Technical Support

On-Line Manuals

Linker User Guide

Conventions and feedback Overview of the linker Linking models supported by armlink Image structure and generation Using linker optimizations Getting information about images Accessing and managing symbols with armlink Using scatter files About scatter-loading When to use scatter-loading Scatter-loading command-line option Images with a simple memory map Images with a complex memory map Linker-defined symbols that are not defined when s Specifying stack and heap using the scatter file What is a root region? Creating root execution regions Using the FIXED attribute to create root regions Placing functions and data at specific addresses Placing a named section explicitly using scatter-l Placing unassigned sections with the .ANY module s Examples of using placement algorithms for .ANY se Example of next_fit algorithm showing behavior of Examples of using sorting algorithms for .ANY sect Selecting veneer input sections in scatter-loading Using __attribute__((section("name"))) t Using __at sections to place sections at a specifi Restrictions on placing __at sections Automatic placement of __at sections Manual placement of __at sections Placing a key in flash memory using __at Placing a structure over a peripheral register usi Placement of sections with overlays About placing ARM C and C++ library code Example of placing code in a root region Example of placing ARM C library code Example of placing ARM C++ library code Example of placing ARM library helper functions Reserving an empty region About creating regions on page boundaries Overalignment of execution regions and input secti Using preprocessing commands in a scatter file Expression evaluation in scatter files Using expression evaluation in a scatter file to a Equivalent scatter-loading descriptions for simple Type 1 image, one load region and contiguous execu Type 2 image, one load region and non-contiguous e Type 3 image, two load regions and non-contiguous Scatter file to ELF mapping

Using the FIXED attribute to create root regions

Using the FIXED attribute to create root regions

You can use the FIXED attribute in an execution region scatter file to create root regions that load and execute at fixed addresses.

FIXED is used to create multiple root regions within a single load region and therefore typically a single ROM device. For example, you can use this to place a function or a block of data, such as a constant table or a checksum, at a fixed address in ROM so that it can be accessed easily through pointers.

If you specify, for example, that some initialization code is to be placed at start of ROM and a checksum at the end of ROM, some of the memory contents might be unused. Use the * or .ANY module selector to flood fill the region between the end of the initialization block and the start of the data block.

To make your code easier to maintain and debug, it is suggested that you use the minimum amount of placement specifications in scatter files and leave the detailed placement of functions and data to the linker.

You cannot specify component objects that have been partially linked. For example, if you partially link the objects obj1.o, obj2.o, and obj3.o together to produce obj_all.o, the component object names are discarded in the resulting object. Therefore, you cannot refer to one of the objects by name, for example, obj1.o. You can refer only to the combined object obj_all.o.


There are some situations where using FIXED and a single load region are not appropriate. Other techniques for specifying fixed locations are:

  • If your loader can handle multiple load regions, place the RO code or data in its own load region.

  • If you do not require the function or data to be at a fixed location in ROM, use ABSOLUTE instead of FIXED. The loader then copies the data from the load region to the specified address in RAM. ABSOLUTE is the default attribute.

  • To place a data structure at the location of memory-mapped I/O, use two load regions and specify UNINIT. UNINIT ensures that the memory locations are not initialized to zero.

Copyright © 2007-2008, 2011-2012 ARM. All rights reserved.ARM DUI 0377D

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.