Legacy support for __user_initial_stackheap()
Defined in rt_misc.h,
__user_initial_stackheap() is supported for backwards compatibility with earlier versions of the Arm® C and C++ libraries. However Arm recommends not using this option if possible.
NoteArm recommends that you use
The differences between
__user_initial_stackheap()receives the stack pointer (containing the same value it had on entry to
r1, and is expected to return the new stack base in
__user_setup_stackheap()receives the stack pointer in
sp, and returns the stack base in
__user_initial_stackheap()is provided with a small temporary stack to run on. This temporary stack enables
__user_initial_stackheap()to be implemented in C, providing that it uses no more than 88 bytes of stack space.
__user_setup_stackheap()has no temporary stack and cannot usually be implemented in C.
__user_setup_stackheap() instead of
__user_initial_stackheap() reduces code size, because
__user_setup_stackheap() has no requirement for a
When you must create the heap and stack in C code rather than in assembly
code, you cannot use the
Therefore, you must use the
If your implementation is sufficiently complex that it warrants the use of a temporary stack when setting up the initial heap and stack, use either:
__user_setup_stackheap()and manually set up the temporary stack yourself.
__user_initial_stackheap(), which sets up the temporary stack for you.