rtel wrote on Saturday, October 08, 2005:
The stacks are filled with 0xa5, so you can stop on the debugger, inspect the stack, and see where the high water mark is.
When you have the trace facility enabled there is a function prvListTaskWithinSingleList() within tasks.c that in turn calls usTaskCheckFreeStackSpace(). However it is difficult to use these functions if you have very limited RAM. Also these functions leave interrupts disabled for an extended period so they are ok for debugging, but not recommended for normal use.
Before making the variables static it was taking a particular length of time for your application to crash - suggesting a possible cause being the stack getting used up.
Now by making the variables static you are removing most of the stack usage - and the program runs longer. This would suggest that whatever is using up the stack is still causing a problem and nothing has really changed, its just that making the variables static you are delaying the symptom. This would suggest that there is an unrelated cause - maybe interrupts not completing correctly?