Note that the changes in this Makefile have been merged in the now active upstream project at https://github.com/sudar/Arduino-Makefile. The only difference at this point is that the upstream version requries Perl (for the board reset script). This project should be considered deprecated but I will update it once the Perl dependency is finally dropped from the upstream version to say this is dead for good.
This is a versioned history of the work done by Martin Oldfield on an Arduino Makefile. He releases tarballs on his website, so this version might be a bit easier if you want to track your modifications.
The various released versions (0.3, 0.4, etc) are tagged in this repository.
The original blog post: http://mjo.tc/atelier/2009/02/arduino-cli.html
A blog post on the addition of chipKIT support: http://christopherpeplin.com/2011/12/chipkit-arduino-makefile/
This Makefile current requires either Arduino 1.0 or MPIDE 0023.
This version adds support for the Digilent chipKIT Uno32 and Max32, both
Arduino-compatible microcontrollers. To use this Makefile with one of those,
chipKIT.mk instead of
Arduino.mk at the bottom of your Makefile.
You can adjust the same variables as described by Martin for
point to an MPIDE installation (which includes the chipKIT toolchain) instead of
the Arduino IDE.
The Makefile will look for libraries in two places:
- In the Arduino/MPIDE installation directory under the
- In the
librariesdirectory in your Arduino sketchbook. This location is the preferred location for user libraries when using the IDE.
To compile the basic blink example sketch, set the
variable to point to where you clone this repository and use this for your
TARGET = blink BOARD_TAG = mega_pic32 SERIAL_PORT = /dev/ttyUSB* include $(ARDUINO_MAKEFILE_HOME)/chipKIT.mk
If you are defining your own
main() function, you can stop the Ardunio's
main() from being compiled with your code by defining the
NO_CORE_MAIN_FUNCTION = 1
- Martin Oldfield (initial version)
- Chris Peplin (chipKIT)
- rei_vilo / Olivier
- Edward Comer
- John Wallbank
The arduino.mk project is distributed under the LGPL. See licence.txt for the full license text.