This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430G2855: Determining size of stack and heap

Part Number: MSP430G2855


I'm running out of ram and want to find the actual amount of RAM used for the stack and the heap.  It looks like it would be the easiest to fill the stack and the heap with a pattern, run the program, and look at the memory.  I've looked at the literature on the _system_pre_init() but can't figure out how to use it - do I write that function at the start of my main.cc file?  Put it in a separate file and somehow tell the linker to load it and not the default one in pre_init.c?

I am no longer using the console for I/O, using the UART instead so don't need CIO, but I am using functions like sprintf() but don't know if it or anything else from the standard libraries use the heap.

Any help would be appreciated.

Thanks, Doug Broadwell

**Attention** This is a public forum