Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/08/02 20:01
Read: times


 
#28845 - RE: Stack-Deep
Keil uVision (and plenty of other tools) can produce a call tree of your code - providing you're not using cunning tricks with function pointers.
From that, you can find the maximum call depth and hence the maximum stack depth.
You would have to allow for interrupts manually, as no static analysis can do that for you!

Another trick is to fill your stack space with a known pattern (eg, 0xAA) and let your code run in your target for a reasonable time. Then examine the stack space and see how much is still left with the pattern intact - that shows you how far the stack grew.
Again, this only shows you what did happen during the test run; it's not necessarily the "worst" that coudl happen...

List of 9 messages in thread
TopicAuthorDate
Stack-Deep            01/01/70 00:00      
RE: Stack-Deep            01/01/70 00:00      
RE: Stack-Deep            01/01/70 00:00      
RE: Stack-Deep            01/01/70 00:00      
RE: Stack-Deep            01/01/70 00:00      
RE: Stack-Deep            01/01/70 00:00      
RE: Stack-Deep            01/01/70 00:00      
RE: Stack-Deep Andy            01/01/70 00:00      
RE: Stack-Deep Andy            01/01/70 00:00      

Back to Subject List