2.5.1. Initialization sequence

Figure 2.12 shows a possible initialization sequence for an embedded system based on an ARM architecture.

Figure 2.12. Initialization sequence

The reset handler executes immediately on system startup. The block of code labeled $Sub$$main() executes immediately before entering the main application.

The reset handler is a short module coded in assembler that is executed on system reset. As a minimum, your reset handler initializes stack pointers for the modes that your application is running in. For cores with local memory systems, such as caches, Tightly Coupled Memories (TCMs), Memory Management Units (MMUs), and Memory Protection Units (MPUs), some configuration must be done at this stage in the initialization process. After executing, the reset handler typically branches to __main to begin the C library initialization sequence.

There are some components of system initialization, for example, the enabling of interrupts, that are generally performed after the C library initialization code has finished executing. The block of code labeled $Sub$$main() performs these tasks immediately before the main application begins executing.

See The vector table for a more detailed description of the various components of the initialization sequence.

Copyright © 2002-2006 ARM Limited. All rights reserved.ARM DUI 0203G