You are currently browsing the Pilot’s Logbook weblog archives for the day 16. April 2009.
- 1. March 2010: Solve this!
- 29. January 2010: PIC32 Starter Kits Software v2.0
- 27. January 2010: Animation on the MikroE PIC32MX4 Multimedia Board
- 26. December 2009: Merry Christmas and Happy New Year
- 18. November 2009: MikroE MX4 Multimedia Board
- 30. September 2009: Good old printf() (continued)
- 26. August 2009: Changing habits... and dreaming a bit
- 24. July 2009: Where is my RAM?
- 15. July 2009: Olimex PIC-P32MX board
- 28. June 2009: A Great New Board from mikroElektronika
Archive for 16. April 2009
Reporting Memory Usage
16. April 2009 by pilot.
I think I can say we all love the little Memory Usage gauges introduced in MPLAB a couple of years ago.. or was it more?
When working in assembly with an 8-bit microcontroller and a couple of Kbytes of FLASH memory they definitely do their job, but when using the PIC24 or PIC32 type of devices, the memory space grows into the hundreds of Kbytes and things get … well, more complicated!
You start including a stack here (USB?) and a library there (Advanced Graphics), the compiler throws in a couple library modules of its own (math libs, stdio…) and both FLASH and RAM spaces become a little more crowded. It does not take long before we start wondering who is using up more memory, and why… the little memory gauges just don’t cut it anymore.
The experts will tell you right away that the sensible thing to do is to turn on the “map” option of the linker, (Project Build Options, Linker Tab, Select Diagnostics pane, then Check Create Map file) and inspect the resulting .map file in the editor window. But the text file generated is a pretty complex (and long) document and browsing through it in search of clues about what happened to our program and data memory can be quite hard work.
Fortunately with the latest version 1.05 of MPLAB C32 compiler there is a new option for the linker to produce a detailed summary of your project memory usage: –report-mem. Read the rest of this entry »
Posted in PIC32, Tools, MPLAB | No Comments »