chipKIT® Development Platform

Inspired by Arduino™

Programming via ICSP (Fubarino Mini)

Created Wed, 07 Dec 2016 11:09:36 +0000 by BobEdge


Wed, 07 Dec 2016 11:09:36 +0000


I received a couple of Fubarino Mini boards yesterday. Working great with LCD display, and blinking LED. Then I tried programming using the ICSP, PicKit 3, and MPLAB IPE. This did not work, and bricked the Fubarino. I did eventually (link on chipKit products page not working) find the correct boot loader, and programmed it via ICSP, and the board is ok again. I suspect that the configuration bits are not correct, and the oscilator is not working.

Can anyone please instruct me how to program the board using the ICSP?

Kind regards Bob.


Wed, 07 Dec 2016 15:25:36 +0000

What exactly did you try programming? Was it the output from the Arduino IDE, or did you write your own program in MPLAB-X?


Wed, 07 Dec 2016 16:19:55 +0000

Yeah, majenko is on the right track (as usual). The chipKIT development environment depends on the bootloader to be there.

If you want to take your sketch and use ICSP to program it, you'll have to merge the bootloader hex file with your sketch output before programming.



Thu, 08 Dec 2016 09:22:51 +0000

Thank you both for your answers. I was just trying to program the hex file from a sketch. I have heard before of merging hex files. I know it is not as simple as copy paste sketch hex at end of boot loader hex. I seem to remember something about some software which does this. I'll google it.

Regards Bob.


Thu, 08 Dec 2016 10:08:43 +0000

The chipKIT core comes with "bootloaderless" variants of the linker scripts for most boards. It's not easy switching to using them with the Arduino IDE, since it requires editing the boards.txt file and adding "-nobootloader" before the ".ld" of the board specific linker script.

It's easier with UECIDE though which even has an experimental system (using "mdb" which comes with MPLAB-X) to directly program through the likes of a PICkit3. Just install the right programmer plugin, select it in the menu, and set the location of the mdb.jar file in the preferences, and the rest should happen magically.


Thu, 08 Dec 2016 10:32:48 +0000

I have found a very easy solution. None of the complicated mucking about with hexmate, and command lines. Load your program, or sketch in the normal usb way. Then using MPLAB IPE read the contents of the chip. Export the hex file, and there you have it. A merged hex file that can be programmed using ICSP.

Regards Bob.


Thu, 08 Dec 2016 10:49:34 +0000

The down side of that though is that you end up with a HEX file that is full of almost nothing. You end up with an image of the entire 128K of flash, not just the bits that are used. Not a problem as such, but does take longer to re-program on a blank chip than just the bits you actually use.