Defined in rt_misc.h, __user_initial_stackheap() is
supported for backwards compatibility with earlier versions of the
ARM C and C++ libraries.
Note
ARM recommends that you use __user_setup_stackheap() in
preference to __user_initial_stackheap().
The differences between __user_initial_stackheap() and __user_setup_stackheap() are:
__user_initial_stackheap() receives
the stack pointer (containing the same value it had on entry to __main())
in r1, and is expected to return the new stack
base in r1.
__user_setup_stackheap() receives the
stack pointer in sp, and returns the stack base
in sp.
__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.
Using __user_setup_stackheap() instead
of __user_initial_steakheap() reduces code
size, because __user_setup_stackheap() has
no requirement for a temporary stack.
In the following circumstances you cannot use the provided __user_setup_stackheap() function, but
you can use the __user_initial_stackheap() function:
your implementation is sufficiently complex that
it warrants the use of a temporary stack when setting up the initial
heap and stack
you have a requirement to implement the heap and
stack creation code in C rather than in assembly language.
See also
Reference
ARM C and C++ Libraries and Floating-Point
Support Reference:
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.