3.2. Changes to startup code

The startup code consists of the reset handler of your application, together with any initialization functions that set up the environment and peripherals before the main body of your application can run. This is specific to a particular core and target.

If your system is simple, it might be sufficient to specify the C library entry point (the __main() function) as your reset handler in the vector table, and perform additional initialization from the main() function in your own code. However, if there are peripherals that require critical initialization, you might need to write a short assembly code function to act as your initial reset handler before branching to __main(). Also be aware that code accessing some devices, for example the MPU, might need one or more of the memory barrier instructions after writing to these registers to ensure that the changes take effect immediately. If your project previously targeted a platform supporting an MPU or MMU, the associated code must be revised.

For all Cortex-M3 projects, you must create the new vector table as described in Exception handling and add the initial stack pointer and address of your reset handler at 0x0 and 0x4respectively.

Copyright © 2007. All rights reserved.ARM DAI0179B
Non-Confidential