Skip to content

Commit

Permalink
Update README.md about compatibility with Windows
Browse files Browse the repository at this point in the history
Fix #94
  • Loading branch information
sudar committed Jan 29, 2014
1 parent 967d47c commit 0526855
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 19 deletions.
2 changes: 2 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it
- Tweak: Don't hard code MONITOR_PORT in examples, for more flexible testing. (Issue #157) (https://github.com/peplin)
- Tweak: Silence the stderr output from call to `which`. (Issue #158) (https://github.com/peplin)
- Fix: Override complete compiler tool paths for chipKIT. (Issue #159) (https://github.com/peplin)
- New: The makefile is compatible with Windows
- New: Update `README.md` file about usage and Windows compatibility

### 1.2.0 (2014-01-14)
- Add: Add RPM SPECfile and new `package` directory to store package instructions and files (https://github.com/sej7278)
Expand Down
76 changes: 57 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,37 @@
# A Makefile for Arduino Sketches

This is a very simple Makefile which knows how to build Arduino sketches. It defines the entire workflows for compiling code, flashing it to Arduino and even communicating through Serial monitor. You don't need to change anything in the Arduino sketches.
This is a very simple Makefile which knows how to build Arduino sketches. It defines entire workflows for compiling code, flashing it to Arduino and even communicating through Serial monitor. You don't need to change anything in the Arduino sketches.

If you're using FreeBSD, Debian or Ubuntu, you can find this in the `arduino-mk` package.
## Features

## Usage
- Very robust
- Supports all official AVR-based Arduino boards
- Supports chipKIT
- Works on all three major OS (Mac, Linux, Windows)
- Auto detects serial baud rate and libraries used
- Support for `*.ino` and `*.pde` sketches as well as raw `*.c` and `*.cpp`
- Support for Arduino Software versions 1.0.x as well as 0.x.
Support for Arduino 1.5.x is still work in progress
- Automatic dependency tracking. Referred libraries are automatically included
in the build process. Changes in `*.h` files lead to recompilation of sources which include them

You can also find more [detailed instructions in this guide](http://hardwarefun.com/tutorials/compiling-arduino-sketches-using-makefile) or also checkout the sample makefiles inside the examples/ folder
## Installation

Download a copy of this repo some where in your system.
### Through package

On the Mac you might want to set:
If you're using FreeBSD, Debian or Ubuntu, you can find this in the `arduino-mk`
package and can be installed using `apt-get` or `aptitude`.

ARDUINO_DIR = /Applications/Arduino.app/Contents/Resources/Java
ARDMK_DIR = /usr/local
AVR_TOOLS_DIR = /usr
### From source

On Linux, you shouldn't need to set anything other than your board type and port:
- Download the latest release
- Or clone it from Github using the command `git clone [email protected]:sudar/Arduino-Makefile.git`
- Check the [usage section](https://github.com/sudar/Arduino-Makefile#usage) in this readme about setting usage options

BOARD_TAG = mega2560
MONITOR_PORT = /dev/ttyACM0
## Requirements

- `BOARD_TAG` - Type of board, for a list see boards.txt or `make show_boards`
- `MONITOR_PORT` - The port where your Arduino is plugged in, usually `/dev/ttyACM0` or `/dev/ttyUSB0` in Linux or Mac OS X and `com3`, `com4`, etc. in Windows.
- `ARDUINO_DIR` - Path to Arduino installation. In Cygwin in Windows this path must be
relative, not absolute (e.g. "../../arduino" and not "/c/cygwin/Arduino").
- `ARDMK_DIR` - Path where the `*.mk` are present. If you installed the package, then it is usually `/usr/share/arduino`
- `AVR_TOOLS_DIR` - Path where the avr tools chain binaries are present. If you are going to use the binaries that came with Arduino installation, then you don't have to set it.
You need to have the Arduino IDE. You can either install it through the
installer or download the distribution zip file and extract it.

The Makefile also delegates resetting the board to a short Perl program.
You'll need to install `Device::SerialPort` to use it though.
Expand All @@ -45,14 +50,47 @@ On openSUSE:

On Mac using MacPorts:

sudo port install p5-device-serialport
sudo port install p5-device-serialport

and use /opt/local/bin/perl5 instead of /usr/bin/perl

On other systems:

cpan Device::SerialPort

## Usage

You can also find more [detailed instructions in this guide](http://hardwarefun.com/tutorials/compiling-arduino-sketches-using-makefile) or also checkout the sample makefiles inside the examples/ folder

Download a copy of this repo some where in your system or install it through a package.

On the Mac you might want to set:

ARDUINO_DIR = /Applications/Arduino.app/Contents/Resources/Java
ARDMK_DIR = /usr/local
AVR_TOOLS_DIR = /usr
MONITOR_PORT = /dev/ttyACM0
BOARD_TAG = mega2560

On Linux (if you have installed through package), you shouldn't need to set anything other than your board type and port:

BOARD_TAG = mega2560
MONITOR_PORT = /dev/ttyACM0

On Windows (using cygwin), you might want to set:

ARDUINO_DIR = ../../arduino
ARDMK_DIR = path/to/mkfile
MONITOR_PORT = com3
BOARD_TAG = mega2560

- `BOARD_TAG` - Type of board, for a list see boards.txt or `make show_boards`
- `MONITOR_PORT` - The port where your Arduino is plugged in, usually `/dev/ttyACM0` or `/dev/ttyUSB0` in Linux or Mac OS X and `com3`, `com4`, etc. in Windows.
- `ARDUINO_DIR` - Path to Arduino installation. In Cygwin in Windows this path must be
relative, not absolute (e.g. "../../arduino" and not "/c/cygwin/Arduino").
- `ARDMK_DIR` - Path where the `*.mk` are present. If you installed the package, then it is usually `/usr/share/arduino`
- `AVR_TOOLS_DIR` - Path where the avr tools chain binaries are present. If you are going to use the binaries that came with Arduino installation, then you don't have to set it.

## Including Libraries

You can specify space separated list of libraries that are needed for your sketch to the variable `ARDUINO_LIBS`.
Expand Down

0 comments on commit 0526855

Please sign in to comment.