On 26/07/17 08:43, [email protected] wrote: > I'm not sure that you can determine how big the stack is (nor can you > constrain it). In the AVR, the stack grows unconstrained downwards from the > top of RAM. See here: http://www.nongnu.org/avr-libc/user-manual/malloc.html > for an explanation of the memory sections in the AVR. > > If you're running an RTOS you can often allocate/specify where the stacks for > each process reside, and how big they are, but you can't actually constrain > them to always fit within that space so you have to be careful to allocate > enough space for them.
Agreed, you can't constrain it directly, but you can estimate how big it'll get by the depth of subroutine calls and ISRs, then reserve that portion of RAM so that stack and application state do not meet. In my case, I'm not running an RTOS due to the severe memory restrictions present in the ATTiny861. -- Stuart Longland (aka Redhatter, VK4MSL) I haven't lost my mind... ...it's backed up on a tape somewhere.
signature.asc
Description: OpenPGP digital signature
_______________________________________________ AVR-chat mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/avr-chat
