Quote:
Originally posted by ErichKeane
ETA 30 seconds later: What can i do to figure out if it takes too much memory?
|
Two comments...
First of all, there is a separate code space and data space. One could be full and the other virtually empty.
If you want to find out all about the program you are down-loading to the controller, the linker generates a file called...
FNAME.LST
where FNAME is the name of your project (for instance: IFI Default Code.LST).
This file contains your C code, with the assembly next to it, with the line numbers of the code addresses where this code is getting dumped. It also contains the machine code translation of your instructions.
If your code is getting too big, you should see addresses above 008000 in this file.
[NOTE: this LST file only contains code which is being compiled. The library code is not disassembled in this file.]
You can also look in the FNAME.map file (if you have the "generate map file" option checked in your MPLAB environment). This will show you the section information.
At the end of the code section there is a little block which says:
"Program Memory Usage"
It gives start and end address.
You will have a little subblock that says:
xxx out of 33816 program addresses used, ...
You get similar information for the data memory. Only, you'll have to look at the "data" section address of the last symbol to figure how close you are to full in the data space.