Generation Of Multiple HEX Files For Chips With External Memory
#export has options for specifying how to export and import HEX files. You will find these commands useful if creating bootloaders or using a device with external memory (CPU or EMCU mode):
The compiler will create two HEX files. One contains all the ODD addressed program memory, the other contains all the EVEN addressed program memory. You will find this useful if you are using the 16-bit byte write mode on the 18F family external memory interface.
#export(HEX, file=odd.hex, ODD)
#export(HEX, file=even.hex, EVEN)
When the compiler creates the HEX file for this project, offset all addresses up 0x800 bytes.
#export(HEX, file=application.hex, offset=0x800)
The previous example was an application where the final HEX file had it's addresses offset by 0x800. If we wanted to import the loader HEX into the application this could have been done instead:
#import(HEX, file=loader.hex, range=0:0x7FF)