...find out how much RAM or FLASH my application uses?
How do I determine how much memory I have used and how much I have left?
You can use the Memory Usage Window to display a graphical summary of how memory has been used in each memory segment of a linked application. Click View > Memory Usage to open the Memory Usage Window.
If you need more detailed information you can use the Symbol Browser Window. Click Tools > Symbol Browser to open the Symbol Browser Window.
Please refer to the user guide for more information on the Memory Usage Window and Symbol Browser Window.
-
Working on an STM32F2 and the most recent crossstudio. There isn't a "symbol browser" window under view any more. There are code and data outputs under project explorer but they appear to update depending on what was changed rather than totals, and there is a substantial accumulation of memory that I can't add up without wandering into the memory .map file and trying to add up what is going into .bss - The information is still there. It is simply a bit inconvenient. I can't work out what project explorer is doing at all there because at least half the time the total appeared to be double the available ram. and right now it looks like 20 k more than the 128k defined. I'm just sort of curious what it is totalling up in the project explorer. The memory .map file is OK and the program and project compile, load and run OK so it isn't bad. BJ -
I can't work out what project explorer is doing at all there because at least half the time the total appeared to be double the available ram. and right now it looks like 20 k more than the 128k defined
The Project Explorer works off the object file and provides information obtained from it. Consider that you put a huge array in your source code but it is never used in the final application because you never call a function that references it. What you'll see is that the Project Explorer will count the size of that array, but as the array never makes it into the executable, it doesn't contribute to the applications memory space.
Also note that you can configure the Project Explorer to allocate "const" data to ether the Code column or the Data column, depending on how you wish to account for your const data and, hence, data can be data placed into RAM only or data placed into RAM and flash.
-
Thanks - I see the symbol browser. A most useful tool it is too. Does the Project Explorer add in the heap allocation in some way ? Is there any way to get at what Project Explorer is adding up?? Near as I can tell the symbol browser is telling me the final version... and if something I allocated at some point is unused it would be useful to know. -
The documentation says that the values in the Project Explorer are approximate (for the reasons I gave). However, the sizes reported for a linked project in the Project Explorer should be accurate and include any fixed heap allocation. As for stuff that's thrown away being reported, well, that would be a huge report for many apps.
Please sign in to leave a comment.
Comments
6 comments