What is the max program size and how can I tell how big my program is?
**The Robot Controllers only have 32k of program memory space. If your code is larger than that, it won’t work. To tell how close you are to the limit, there are several methods.
Method One:
Open IFI_Loader. Browse and Open your .hex file. Now in the lower left status bar of IFI_Loader you can see your file size. Look for the message “Flash 800-XXXX”. The number XXXX will represent the highest location in the microcontroller’s Flash memory that your program will use. It is a hexadecimal number, so when it approaches 7FFF then you are nearing the 32k limit .
Method Two:
Inside MPLAB, after successfully compiling your code, open the file .map. This is your memory map. Scroll down to (or Find) the line that says “Program Memory Usage” Underneath this is a line which will tell you the percentage of memory utilization.
Method Three:
Inside MPLAB, after successfully compiling your code, select “Program Memory” from the “View” menu.
Watch the Address column as you scroll down. Your code will be located starting at 0800. Continue scrolling down until you see Opcodes of FFFF and Disassembly of NOP for the remainder of the file. The last lines before the FFFFs begin is the last line of your code. Once again, the closer this address is to 7FFF, the fuller your program memory is.**