2016-07-14 02:40 PM
I am using Keil. How should one determine what is the best size for the heap and stack?
Are there any common guidelines? Thanks.2016-07-14 05:21 PM
The common sense guidelines would be to understand how much memory you plan on malloc()ing, and how deep your call tree gets, and how large auto/local variables are.
Keil creates a static call graph in a .HTM file generated by the Linker.Dynamically you can track malloc/free to get an idea of usage and maximal values. The stack depth can be checked, fill it with a marker character and review it periodically.