This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Max stack usage, can uVision register it?

Hi All,

Anyone knows if uVision can register the maximum stack usage in debug mode?.. Is very useful to run the code in the target and then check the maximum usage of the stack in any moment in order to be safe about the size. Perhaps anyone knows a better way to calculate it.

Thanks

Parents
  • What chip do you have?

    Best place to "memset" the stack memory is in the Reset Handler, before you've called anything. If the routines managing the statics clears the memory, you could do the filling in main() as you enter.

    You're filling it with a pattern that a) you can observe in a Memory View window, or b) walk upward with a pointer until the pattern can't be read any more. Not exactly complicated stuff here.

Reply
  • What chip do you have?

    Best place to "memset" the stack memory is in the Reset Handler, before you've called anything. If the routines managing the statics clears the memory, you could do the filling in main() as you enter.

    You're filling it with a pattern that a) you can observe in a Memory View window, or b) walk upward with a pointer until the pattern can't be read any more. Not exactly complicated stuff here.

Children