The chipKIT family of boards is extremely versatile. Considering that they can be programmed with not one but two different development environments, you have the option of programming them in either C/C++ or Assembly, whichever language is your strongest.
The other day I decided to program my chipKIT PRO MX4 board using MPIDE. Long story short, it wasn’t working and I couldn’t figure out why. So I posted my question to the forum and waited for somebody else to find the answer. I got impatient because the answer didn’t come within the next hour, so like a good boy, I started digging into the reference manuals. Come to find out, if you use the chipKIT boards with MPLAB X, the bootloader will be overwritten and must be reloaded if you want to use the board with MPIDE. Since I had done some programming with MPLAB X in assembly language, that was clearly my problem. Should be a simple fix, right? Well, it is. Sort of.
In order to reload the chipKIT bootloader, you have to have the integrated Programming Environment that comes with MPLAB. You will also need the debugger circuit. This is built in to the MX4 PRO and MX7 PRO boards, but is an independent break out board for the rest of the chipKIT family. On all of the chipKIT boards, there is a location for a 6-pin jumper with the holes slightly offset from one another. This header is near the power port on all boards except for the chipKIT CMOD, where it is near the reset button. On the uC32, the header is labeled as “JP3” and on the chipKIT PRO MX4 it is labeled as “JP9”.
The instructions for loading the bootloader are pretty straightforward, and are located here in section 2.1 of the updated reference manual for the chipKIT PRO MX4. For a different board, just ensure that you are loading the correct bootloader for that specific board and that you define the correct chip in the “Device:” dialog box. The chip ID can be found printed on the top of the chip and is something like “PIC32MX—F—-“.
Do you have any other tips for reloading a bootloader?