Hi,
I'm writing code for the MSP430F168 using CCEv3.
I'm trying to detremine what my worst case call stack is, are there linker options that will help with this? Or failling that does any one have any techniques for working this out?
Thanks,
Ben
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I'm writing code for the MSP430F168 using CCEv3.
I'm trying to detremine what my worst case call stack is, are there linker options that will help with this? Or failling that does any one have any techniques for working this out?
Thanks,
Ben
After loading the program, fill the memory allocated for the callstack with a known pattern and then run the MSP. Once you halt, use the memory window to see where the pattern begins, and thus how much of the stack was used by the running program. I believe the memory window in CCE 3 had a "fill memory" button on it somewhere.
Darian
Thanks Darian,
That will help me tell what my worst case is in terms of the amount of memory required, is there a way to identify the worst case call stack in terms of the functions that are called to make up that memory requirement i.e. funcA() calls funcB() call funcC()
Ben,
Not that I'm aware of, although someone from the compiler group may know of something I don't. However, my gut feeling is that it wouldn't be possible to accurately calculate unless the code was trivial.
Darian
The call_graph utility in the cg_xml package can compute the worst case stack depth. See http://tiexpressdsp.com/index.php/Code_Generation_Tools_XML_Processing_Scripts .
-George