Hello, I am using s32k3 with s32 DS, please tell me how to know maximum stack usage in the program, i searched ld manual where i got a flag "--stack-analysis", but where should i put this flag in S32 ds? Is there any other option to see maximum stack usage of a program?
Hi,
I'm not sure what's your compiler - for gcc you can use -fstack-usage option to get used stack for each function. During compilation is for each object file (*.o) generated *.su file with stack usage:
You can add -fstack-usage in project properties:
You can find more details here - https://mcuoneclipse.com/2015/08/21/gnu-static-stack-usage-analysis/