How do you size the stack and the heap on a device with a fixed RAM budget?
Stack and heap sizing on fixed RAM starts from the link map, worst-case call depth and interrupt nesting. Measure stack high-water marks with fill patterns, avoid unbounded heap allocation, and prefer fixed pools allocated at startup for predictable firmware behaviour.