2.4.8. Example code for Build 3

Build 3 of the example implements scatter-loading and contains a re-implemented __user_initial_stackheap(). See the example build files in the main examples directory, in ...\emb_sw_dev\build3.

The following modifications have been made to Build 2 of the example project:

Scatter-loading

A simple scatter-loading description file is passed to the linker.

Retargeted __user_initial_stackheap()

You have the option of selecting either a one-region or a two-region implementation. The default build uses one region. You can select the two-region implementation by defining TWO_REGION_MODEL when assembling.

Avoiding C library Semihosting

The symbol __use_no_semihosting is imported into Build 3, because there are no longer any C library semihosting functions present in the image.

Note

To avoid using semihosting for clock(), this is retargeted to read the Real Time Clock (RTC) on the Integrator AP. This has a resolution of one second, so the results from Dhrystone are not precise. This mechanism is improved in Build 4 (see Example code for Build 4).

To run this build on an Integrator AP, you must perform ROM/RAM remapping. To do this, set switches 1 and 4 to ON to run the Boot Monitor.

See Running the Dhrystone builds on an Integrator.

Note

You must disable all Vector Catch and semihosting if you are using an ARM7 core-based target. Otherwise the debugger interprets the execution of instructions between address 0x0 and 0x1C as exceptions, and reports this in a dialog box. See your debugger documentation for details of how to disable Vector Catch and semihosting.

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