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

Calculation of stack sizes...

Hallo

I wonder if there are any good methodes of calculating the stack size for ex user or IRQ stack size? Is there any "best practice"?

Or is it just add up the size of data structures and/ot ISR's??

/Thomas

Parents
  • And what does "align and grow the stack in 8-byte" mean?

    If I am not mistaken, the stack pointer must be 8-byte aligned when calling external functions, such as standard library functions. Between the function calls, you can push/pop in 4-byte chunks. As far as I know, the library that ships with Keil MDK does require 8-byte aligned stack (at least for some floating point operations.)

Reply
  • And what does "align and grow the stack in 8-byte" mean?

    If I am not mistaken, the stack pointer must be 8-byte aligned when calling external functions, such as standard library functions. Between the function calls, you can push/pop in 4-byte chunks. As far as I know, the library that ships with Keil MDK does require 8-byte aligned stack (at least for some floating point operations.)

Children
No data