We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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
Your best bet may be to simply not use any of the *printf()/*scanf() family of functions.
Hello Hans, this is what I am doing now.
Thanks you Andre
Operations with unsigned int seems to cause the "Unknown Stack Size" problem. Does anyone know how to fix this?
Thanks Andre