How to determine maximum stack usage in embedded system?
When I give the Keil compiler the "--callgraph" option, it statically calculates the exact "Maximum Stack Usage" for me. Alas, today it is giving me a "Maximum Stack Usage = 284 bytes + Unknown(Functions without stacksize...)" message, along with a list of "Functions with no stack information". Nigel Jones says that recursion is a really bad idea in embedded systems ( "Computing your stack size" 2009), so I've been careful not to make any mutually recursive functions in this code. Also, I make sure that none of my interrupt handlers ever re-enable interrupts until their final return-from