-
Notifications
You must be signed in to change notification settings - Fork 447
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update
README.md
about compatibility with Windows
Fix #94
- Loading branch information
Showing
2 changed files
with
59 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
@@ -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`. | ||
|