Solved
STM32, Stack-Utilization
Hello,
for determining the Stack-Utilization I fill it with 0xDADBEEF. If you have recommendations and other ideas, I’d like to know and looking forward to learn from others, how they approach the issues “Stacksize” and “Stackutilization”.
Code for the Startup-File:
Reset_Handler:
/* BEGIN : Seppels StackInit*/
ldr r0, = _End_Min_Stack_Size
ldr r1, = _estack
ldr r2, =0xDEADBEEF
Fill:
str r2, [R0], #4
cmp r0, r1
bne Fill
/* END : Seppels Stack Init */
Modification of the Linker-Script:
/* Highest address of the user mode stack */
_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */
_Min_Heap_Size = 0x2000 ; /* required amount of heap */
_Min_Stack_Size = 0x2000 ; /* required amount of stack */
_End_Min_Stack_Size = _estack - _Min_Stack_Size ; /* Calculate the lower Address for init with the famoes "EB" */
Top of the Stack:

Thanks a lot.
Best Regards, Seppeltronics
