title: Microchip: How to load more then one HEX file in MPLAB X
body: <p>I use MPLAB X (sometime MPLAB 8) and i get some project to finish. I have these HEX files:</p>
  
  <ul>
  <li>bootloader.hex</li>
  <li>magic_flag.hex</li>
  </ul>
  
  <p>Bootloader is loaded from address 0x0 to 0x7FF. The magic flag has position in address 0x40 (so in bootloader area).</p>
  
  <p>And now I need setup the project in MPLAB X to load everything (bootloader+magicFlag+app).
  It is possible to load bootloader, and then magicFlag and then setup Preserved flash memory and work on the application and load only appl area (from 0x800 to 0xFFFF) but it's not much comfortable for me. For example, when I worked with Freescale with WinIDEA IDE from iSYSTEM, I was able to set many SX files to load, very simple, quickly and it was working. But when I try it with MPLAB X I always get error: </p>
  
  <blockquote>
    <p>(944) data conflict at address 0h between appl.hex and bootloader.hex.</p>
  </blockquote>
  
  <p>What I tried:</p>
  
  <ul>
  <li>setup files for loading in Project properties (section Loading)</li>
  <li>setup memory range in project properties (section ICD 3)</li>
  </ul>
  
  <p>But I thing that it is not problem with ICD 3 loading. Because the error came in time when the MPLAB X is creating unified hex file.</p>
  
  <p>And for imagine, this is my part of linker:</p>
  
  <pre><code>CODEPAGE   NAME=BootResetVec START=0x000             END=0x007         PROTECTED
  CODEPAGE   NAME=BootHighISR  START=0x008             END=0x017         PROTECTED
  CODEPAGE   NAME=BootLowISR   START=0x018             END=0x029         PROTECTED
  CODEPAGE   NAME=TRMAGIC      START=0x040             END=0x07F         PROTECTED
  CODEPAGE   NAME=BootLoader   START=0x080             END=0x07FF        PROTECTED
  
  CODEPAGE   NAME=page         START=0x800             END=0x7D7F
  CODEPAGE   NAME=debug        START=0x7D80            END=0x7FFF        PROTECTED
  </code></pre>
  
  <p>I reminder, that this is not only my project and a just have bootloader with magicFlag and I have only source code from the appl. Of course, it will be better to have bootloader source code with appl in one project.</p>
  
  <p>So, the MPLAB X is killing me, please help me :-) </p>