Is there any way to get more information about how much resources my program is using? E.g. I would like to know how much stack I am using. I want to be able to manage my stack usage rather than just find out the hard way that ran out.
Try putting a routine at the beginning of your program that does a ram memory dump where the new stack area will occupy. Then clear out that area. After that do your normal code. When you run your program the second time you will see how far the stack went assuming no power down etc. Kind of crude but it works.
yeah I basically did that, padded it with 0x55 - I was thinking there was a better way though. Especially if you have high priority interrupts, it will be difficult to get to the deepest possible stack. If there was some data collected during build about how much each procedure uses, then it would be easy to add that to the worst case interrupt combination.
Log in to post a comment.