3.4.19 Maxichip Option

The -mmaxichip option tells the assembler to build for a hypothetical device with the same physical core and peripherals as the selected device, but with the maximum allowable memory resources permitted by the device family. You might use this option if your program does not fit in your intended target device and you wish to get an indication of the code or data size reductions needed to be able to program that device.

The assembler will normally terminate if the selected device runs out of program memory, data memory, or EEPROM. When using this option, the program memory of PIC18 and mid-range devices will be maximized to extend from address 0 to either the bottom of external memory or the maximum address permitted by the PC register, whichever is lower. The program memory of baseline parts is maximized from address 0 to the lower address of the Configuration Words.

The number of data memory banks is expanded to the maximum number of selectable banks as defined by the BSR register (for PIC18 devices), RP bits in the STATUS register (for mid-range devices), or the bank select bits in the FSR register (for baseline devices). The amount of RAM in each additional bank is equal to the size of the largest contiguous memory area within the physically implemented banks.

If present on the device, EEPROM is maximized to a size dictated by the number of bits in the EEADR or NVMADR register, as appropriate.

If required, check the map file (6.3 Map Files) section to see the size and arrangement of the memory available when using this option with your device.

Note: When using the -mmaxichip option, you are not building for a real device. The generated code may not load or execute in simulators or the selected device. This option will not allow you to fit extra code into a device.