Hi,
I am porting some GCC code that deals with the stack.
I have found that Stack_Mem and Stack_Size are predefined in startup_lcp17xx.s.
Their values can be taken in the C code and it seems that Stack_Mem is allocated at the RAM bottom (0x10000148), but it was supposed to be at the RAM top.
My code depends on the top position.
Can someone point me to a fix?
There are different methods for locating stack and heap:
https://www.keil.com/support/man/docs/armlib/armlib_chr1358938929242.htm
If using the default assembler startup file and a default linker scatter file, stack and heap areas are located somewhere, like any other RW data.
If you what to give stack and heap a specific location, the simplest way is you use the "Configuring the stack and heap with a scatter file" method by editing your linker scatter file accordingly and remove the stack and heap setup from the startup file.
I hope this helps.