The C library requires you to specify where the stack pointer begins. If you intend to use ARM library functions that use the heap, for example, malloc(), calloc(), or if you define argc and argv command-line arguments for main(), the C library also requires you to specify which region of memory the heap is initially expected to use.
You must always specify where the stack pointer begins. The initial stack pointer must be aligned to a multiple of eight bytes.
You might have to configure the heap if, for example:
If you are using the C library's initialization code, use any of the following methods to configure the stack and heap:
refer from keil websit
