I agree with @TomCarpenter. If it's an Intel HEX file (Most HEX files are Intel or a derivative), read this page on wiki about the HEX file
The HEX file usually contains lines like the first one of this (without spaces):
:10 0120 00 194E79234623965778239EDA3F01B2CA A7
Bytes Addr Type Data Checksum
This line says that there are 16 bytes (0x10) to be written at address 0x0120. Note that if
Type is not 00, this may alter the address.
If now you have a look at your two HEX files from the two projects, you'll notice that they contain data to be written to different memory addresses. However, some lines may write to the same addresses. This may be:
- Configuration bits / bytes. They are set in both projects, and should be equal, if you used the same settings.
- Jump command. I once found a command for the very first bytes of memory address in a HEX file, which causes the MCU to directly jump to the address, where your main program resides. But as the boot loader should sit at the beginning of the memory, this one had to be deleted.