| |||
| Home > Writing Code for ROM > Example 4: Simple scatter loading example | |||
Scatter loading provides a more flexible mechanism for mapping
code and data onto your memory map than the armlink -ro-base and -rw-base options.
These options are described in detail in Chapter 6 Linker of
the ARM Software Development Toolkit Reference Guide.
The following example shows a scatter loading application
that runs under the ARMulator, and also uses sprintf() from
the Embedded C library. The example displays the linker-generated
scatter symbols on the screen. It is not normally necessary to access
these linker symbols in application code (they are only really needed
in initialization code). The linker symbols are accessed here for
illustration only.
The code for this example is in Examples\rom\ARMul_Scatter in
your SDT installation directory (normally c:\ARM250\Examples\rom\ARMul_Scatter).