It should really use the space allocated by the linker, in this case ST just lets it descend into the end of the heap
See _sbrk implementation in syscalls.c
ST sets in to the end of RAM, and it auto-decrements from there, basically the first 32-bit word gets stored at _estack-4
_bstack = (ORIGIN (RAM) + LENGTH (RAM) - _Min_Stack_Size)
_estack = (ORIGIN (RAM) + LENGTH (RAM))
In the Keil builds the initial stack is set to __initial_sp, and descends too Stack_Mem
Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..