10.7.2. Scatter load description file

The scatter load description file shown in Example 10.9 defines:

On reset, an aliased copy of FLASH is re-mapped (by hardware) to address zero (as described in Memory map considerations). Following reset, 32bitRAM is mapped to address zero, by the first few instructions in boot.o.

The 32bitRAM region might be fast on-chip (internal) RAM, and is typically used for code that must be executed quickly. Here, the exception vectors of vectors.o get relocated (copied) from FLASH to 32bitRAM. It can also be advantageous to locate the stack here, if enough memory is available.

The 16bitRAM region might be slower off-chip (external) DRAM, and is typically used for less frequently accessed RW variables and ZI data. Here, the RW and ZI areas of C_main and C_func are relocated/initialized to the region 16bitRAM.

All other read-only code (* (+RO)), for example region initialization and library code, is executed from FLASH, by using a wildcard in the description file.

Example 10.9.  scat.txt

FLASH 0x04000000 0x04000000
{
	FLASH 0x04000000
    {
		boot.o (Boot,+First)
		* (+RO)
	}
	32bitRAM 0x00000000
	{
		vectors.o (Vect,+FIRST)
	}
	16bitRAM 0x02080000
	{
		C_main.o (+RW,+ZI)
		C_func.o (+RW,+ZI)
	}
}
Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0040D
Non-Confidential