Mkduino: Using GNU Tools for Arduino Development

- - posted in arduino, gnu, ruby

Use GNU Automake with Arduino

mkduino is a small ruby script for building a GNU Automake environment for your Arduino development.

A couple of years ago I grew tired of using the Arduino IDE. I realized that there was nothing special about a “sketch” - it was just regular C/C++ code. Having written C++ code professionally for several years, I had arrived at an environment that worked for me. This Arduino IDE bore no resemblance to that environment. Everything about it seemed to cause me problems

  • It’s Java heritage
  • Neither emacs nor vi key-bindings
  • The strange file hierarchy
  • Line numbers on errors didn’t match up
  • and I’m sure there are others.

I started doing all of my Arduino development using the avr-g++ with my own hand crafted Makefile. The problem was that it was hard to give these to any of my friends. I started working on a rvm-like system to download all of the Arduino requirements, build them and then use that for development. That took hours (literally) to compile and seemed a little much for the typical Arduino hacker.

So, I quickly hacked together this ruby script to spit out the required files for a barebones gnu automake system.


Go to the directory where your source code is (or should be):
./configure --host=avr
# upload to your device
make upload

mkduino will overwrite your code if you already have a or any of the files it generates. You probably wouldn’t be running this utility if you already had a makefile or any of the files it generates.

Go ahead, use emacs or vi to do development for arduino. These tools have evolved over time to provide professional developers with the power they need to get stuff done.

There’s more information on mkduino over on the Github Page