Cortex-M0+Determining stack frame size at run time

71 Views Asked by At

How can one determine the size of a stack frame for a function call at run time?

I could use CMSIS __get_MSP before and after the call and get the difference, but I would prefer to not require the caller to do anything before the call.

Knowing the frame sizes would allow deconstructing the stack which would be beneficial for analysing on a fault.

0

There are 0 best solutions below