2.10.4. __user_setup_stackheap()

__user_setup_stackheap() sets up and returns the locations of the initial stack and heap.

Unlike __user_initial_stackheap(), __user_setup_stackheap() works with systems where the application starts with a value of sp (r13) that is already correct, for example, Cortex-M3. To make use of sp, implement __user_setup_stackheap() to set up r0, r2, and r3 (for a two-region model) and return. For a one-region model, set only r0.

When __user_setup_stackheap() is called, sp has the same value it had on entry to the application. If this value is not valid then __user_setup_stackheap() must change the value of sp before using any stack.

Using __user_setup_stackheap() rather than __user_initial_stackheap() improves code size because there is no requirement for a temporary stack.

__user_setup_stackheap() returns the:

Note

__user_setup_stackheap() must be reimplemented in assembler.

Copyright © 2007-2009 ARM Limited. All rights reserved.ARM DUI 0349B
Non-Confidential, Unrestricted Access ID090123