Tailoring the image memory map to your target hardware

In your final embedded system, without semihosting functionality, you are unlikely to use the default memory map. Your target hardware usually has several memory devices located at different address ranges. To make the best use of these devices, you must have separate views of memory at load and run-time.

Scatter-loading enables you to describe the load and run-time memory locations of code and data in a textual description file known as a scatter-loading description file. This file is passed to the linker on the command line using the --scatter option. For example:

armlink --scatter scatter.scat file1.o file2.o

Scatter-loading defines two types of memory regions:

A single code or data section can only be placed in a single execution region. It cannot be split.

During startup, the C library initialization code in __main carries out the necessary copying of code/data and zeroing of data to move from the image load view to the execute view.


The overall layout of the memory maps of devices based around the ARMv6-M and ARMv7-M architectures are fixed. This makes it easier to port software between different systems based on these architectures.

Show/hideSee also

Copyright © 2010-2011 ARM. All rights reserved.ARM DUI 0471C