Hello all,
I need to free more RAM memory in my application so the first thing will be reducing (optimizing) the task stack sizes.
I have created a check task that verify each stack area magic number and indicate the stack usage worst case. I run some test scenario and then adjust the stack sizes based on this worst case values.
I also tried to use the keil syntactic analyser (the htm file generated after compilation). This file gives me information concerning the stack usage of each task such as:
[Stack] Max Depth = 624 + Unknown Stack Size
I have noticed that the real memory usage for each task is higher than the value indicated by the HTM file. If I set the stack memory as indicated by the HTM I get the stack overflow exception. So I adjusted the stack memory in a trial and error manner. But this is risky and demands much tests.
Does anyone can give me some advice on a better method to get the safer/optimized stack size value and how can I predict the "Unknown Stack Size" found in the HTM file?
Thanks Andre Moutinho