| |||
| Home > Embedded Software Development > Tailoring the image memory map to your target hardware > Scatter‑loading description file example | |||
Figure 2.8 shows a simple example of scatter-loading.
This example has one load region containing all code and data,
starting at address 0x0000. From this load region two execution
regions are created. One contains all RO code and data that executes
at the same address where it is loaded. The other is at address 0x10000,
and contains all RW and ZI data.
Example 2.2 shows the description file that describes the memory map given in Figure 2.8.
Example 2.2. Simple scatter-loading description file
ROM_LOAD 0x0000 0x4000
{
ROM_EXEC 0x0000 0x4000 ; Root region
{
* (+RO) ; All code and constant data
}
RAM 0x10000 0x8000
{
* (+RW, +ZI) ; All non-constant data
}
}