Building Arduino - kanemunelab/Arduino GitHub Wiki
Steps for First Time Setup
1. Install Development Tools
Windows
On Windows, you'll need Cygwin, a Java JDK, and ant.
Cygwin is downloadable from http://www.cygwin.com/ or specifically: http://www.cygwin.com/setup.exe
In the Cygwin setup configuration select the packages:
- git - used for version control
- make, gcc-mingw, and g++ - used to build arduino.exe (this will also pull in gcc-core)
- perl - use this version, activestate or other distros have trouble
- unzip, zip - for dealing with archives
Included in the defaults, but make sure:
- coreutils (or textutils), gzip, tar Not required but useful:
- openssh - command line ssh client
- nano - handy/simple text editor
And be sure to leave the option selected for 'unix line endings'
Download and install ant. Add the apache-ant-xxx\bin directory to your path.
Download and install a Java JDK.
Point the JAVA_HOME environment variable to the JDK root directory. An error message that reads "Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\lib\tools.jar" means you need to set JAVA_HOME to your JDK (not JRE) installation.
When building on a 64 bit version of Windows, you must still use the 32 bit JDK. If you have both the 32 and 64 bit JDK's installed, ensure JAVA_HOME is set to the 32 bit version.
Mac OS X
On Mac OS X, install Apple's Developer Tools and git.
Linux
On Linux, you need the Sun Java SDK, avr-gcc, avr-g++, avr-libc, make, ant, and git.
2. Build from Source
this grabs the code from GitHub as an anonymous user.
# grab the code, it'll take a while (maybe even a long while for you dialup and international folks)
git clone git://github.com/arduino/Arduino.git
Build It
Use the command line.
cd /path/to/arduino/build
ant
# if everything went well, you'll have no errors. (feel free to make
# suggestions for things to include here for common problems)
# then to run it
ant run
# each time you make a change, use ant to build the thing
# and run to get it up and running.
Updating to the Latest Version
Each time you want to update to latest version from git:
cd /path/to/arduino
git pull
git update
If new folders have been added, or you're getting odd errors, use:
ant clean
Build for other platforms
You can do the build for other platforms using:
ant clean dist -Dplatform=windows
ant clean dist -Dplatform=macosx
ant clean dist -Dplatform=macosx-java-latest