6.3.3 Loadable Projects and Files: Bootloaders
To combine a bootloader with application code:
- Create one project for your application and one project for your
bootloader.Note: In the New Project wizard, you have the option to create both projects by selecting Add Project after you have created the application project (instead of Finish.)
- Load the bootloader project or hex file into the application project. See 6.3.2.1 Projects Window – Loadables Setup or 6.3.2.2 Project Properties Window – Loading Setup for how to do this.
The next time you build your application project, the resulting hex file will be a combined bootloader/application hex file. Any debug files will also be combined.
For build errors, see 6.3.2.3 The Preferred Method to Use Loadables or the sections below.
MPLAB XC8 – PIC18 MCU Example
The following Microchip webinar details how to combine a bootloader with application code for a PIC18 MCU using MPLAB XC8 and MPLAB X IDE: Linking PIC18 Bootloaders and Applications
MPLAB XC16 Bootloader Example
See the MPLAB XC16 C Compiler User’s Guide (DS50002071) or Help file for an example bootloader.
MPLAB XC32 Bootloader Example
See the PIC32 Bootloader Application Note (DS01388) on the Microchip website.