chipKIT® Development Platform

Inspired by Arduino™

chipKIT Compatible Makefile

Created Fri, 09 Dec 2011 20:47:43 +0000 by peplin


peplin

Fri, 09 Dec 2011 20:47:43 +0000

Hi everyone,

I bit the bullet and took some the to update one of the more common Arduino Makefiles (Martin Oldfield's Arduino.mk) to work with the chipKIT boards.

The code is available at GitHub (https://github.com/peplin/arduino.mk) and I've written up a short blog post about the changes (http://christopherpeplin.com/2011/12/chipkit-arduino-makefile/).

You might find this useful if you get tired of having the GUI open, or if you need to programatically generate the final .hex file so you can distribute that instead of full sketch source.

Patches are welcome if you have trouble with this on your platform!


Jacob Christ

Sat, 10 Dec 2011 18:17:43 +0000

Chris,

This is awesome, thanks for posting this... I was going to have to figure this out this week. The other think I need to do is to make or find some kind of program for uploading hex files with a nice GUI.

Nothing against the creators or maintainers of MPIDE, it has a great purpose for beginners, but I've been coding for about 30 years and we do some pretty sophisticated things and like some power in our IDE's. We plan on spinning a version of the QT Creator IDE that has the features of MPIDE, and this will help in that effort as well.

Thanks for sharing,

Jacob


Larkin32

Thu, 05 Jan 2012 10:41:14 +0000

The Arduino is a great platform for rapid prototyping hardware devices. If you need to squeeze a bit more performance out of your project, I've recently found the Digilent chipKIT a great drop-in replacement board.

The chipKIT is based on the PIC32 microcontroller (as opposed to the Ardunio's Atmel ATmega chips), and thus uses a different toolchain for compiling. The folks at Digilent have kindly released a new version of the Arduino IDE renamed MPIDE which includes the pic32 compilers and other tools.

If you're not wild about GUI IDEs, there are a few Arduino-compatible Makefiles floating around that allow you to build and deploy code from the command line. None of these that I've found have supported the chipKIT until now - I've published on GitHub an extended version of Martin Oldfield's Arduino.mk that works with the tools provided by MPIDE.

The biggest change is allowing the tool names to be overriden - e.g. you need to use pic32-gcc instead of avr-gcc. To use it, follow Martin's instructions but instead of including Arduino.mk at the bottom of your Makefile, just include chipKIT.mk instead.

Thanks for Martin for the well-documented Makefile - this would have taken much longer had it not been so clearly explained.