2019-08-03 10:37 PM
2019-08-04 05:56 AM
Automatic/Local variables reside on the stack, make sure it is adequate for function and everything it calls directly and indirectly. Check size, defined in startup_stm32xxxx.s
2019-08-04 06:14 AM
thanks ! i will large it by which rule
2019-08-04 11:18 AM
Not sure I fully comprehend the response. The routines will use space dependent on your code, understand the memory foot-print of what you're expecting to be allocated. There is a direct cause and effect, if you have 4KB of structures/arrays it has to come from somewhere. One could measure maximal depth by filling the available stack area with a recognizable pattern, and then inspecting with a memory view in debugger. Or have code to measure how much of the pattern remains.
This is not a specifically STM32 or Keil issue, but a general C and micro-controller one.
GNU/GCC hides this somewhat as it puts the stack at the top of available RAM in the STMicro scripts, whereas Keil gives it a defined size, and resides above the heap, locale and statics.