14.01.2015 Views

RealView Compilation Tools Developer Guide - ARM Information ...

RealView Compilation Tools Developer Guide - ARM Information ...

RealView Compilation Tools Developer Guide - ARM Information ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Embedded Software Development<br />

HL<br />

0x28080000<br />

HB<br />

SB<br />

HEAP<br />

STACK<br />

0x28000000<br />

0x40000<br />

Figure 2-10 Two-region model<br />

Example 2-6 Two-region model routine<br />

IMPORT __use_two_region_memory<br />

EXPORT __user_initial_stackheap<br />

__user_initial_stackheap<br />

LDR r0, =0x28000000 ;HB<br />

LDR r1, =0x40000 ;SB<br />

LDR r2, =0x28080000 ;HL<br />

; r3 not used<br />

MOV pc, lr<br />

2.4.8 Example code for Build 3<br />

Build 3 of the example implements scatter-loading and contains a re-implemented<br />

__user_initial_stackheap(). See the example build files in the main examples<br />

directory, in ...\emb_sw_dev\build3.<br />

The following modifications have been made to Build 2 of the example project:<br />

Scatter-loading<br />

A simple scatter-loading description file is passed to the linker.<br />

Retargeted __user_initial_stackheap()<br />

You have the option of selecting either a one-region or a two-region<br />

implementation. The default build uses one region. You can select the<br />

two-region implementation by defining TWO_REGION_MODEL when<br />

assembling.<br />

2-22 Copyright © 2002-2007 <strong>ARM</strong> Limited. All rights reserved. <strong>ARM</strong> DUI 0203H<br />

Non-Confidential

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!