Arduino from the Command Line

[UPDATE] from version 1.5.0 arduino has its own official CLI, see https://github.com/arduino/Arduino/blob/ide-1.5.x/build/shared/manpage.adoc following tool is unofficial but still on development

There is a command line toolkit for working with Arduino. It is called Ino and available at http://inotool.org/.

PlatformIO

PlatformIO is a cross-platform code builder and the missing library manager for Arduino. It has pre-configured settings for most Arduino Boards.

Embedded Development. Easier Than Ever.

  • Colourful command-line output
  • Built-in Serial Port Monitor
  • Configurable build -flags/-options
  • Integration with development environments (IDE)
  • Pre-built tool chains, frameworks for the popular Hardware Platforms

Smart Code Builder. Fast and Reliable.

  • Reliable, automatic dependency analysis and detection of build changes
  • Improved support for parallel builds
  • Ability to share built files in a cache
  • Lookup for external libraries which are installed via Library Manager

The Missing Library Manager for Arduino. It's here!

  • Friendly Command-Line Interface
  • Modern Web 2.0 Library Search
  • Library dependency management
  • Automatic library updating

It runs on Windows, Mac OS X, and Linux (+ARMv6).

Initial text

// Restored the following text from history ~~TimPe, 2011-07-13

Here is a Makefile for compiling and uploading Arduino programs from the command line without the use of the Arduino environment or Java. You will still need a number of other programs. On the Mac or Windows, it's probably easiest just to download and install the Arduino software. Then grab this makefile: Attach:Makefile

On Linux, you will need to install avr-gcc (whose package is usually called gcc-avr), avr-libc and avrdude. On Debian you might try

   sudo apt-get install gcc-avr avr-libc avrdude 

On Gentoo, see the instructions, but don't worry about installing Java, RXTX, subversion, or jikes or checking anything out of subversion, but do substitute avrdude for uisp. Then, download this zip archive of the Arduino core (it includes the Makefile): Attach:arduino-core-0005.zip

Instructions for writing, compiling/verifying, and uploading your programs are in the Makefile.


Notes

Minor detail: on my OS X 10.4 box, I had to add a "-C /location/to/avrdude.conf" to AVRDUDE_FLAGS otherwise it's bombing out when avrdude wants to upload your code.


Unsuccesful move notes

These instructions have moved to the hacking section of the main Arduino homepage.

Link to the hacking section is a broken link? Where has this page gone?

(// Restored the following text from history ~~TimPe, 2011-07-13)

Share