Update README.md about compatibility with Windows

Fix #94
This commit is contained in:
Sudar 2014-01-29 11:32:16 +05:30
parent 967d47c7bd
commit 0526855340
2 changed files with 59 additions and 19 deletions

View file

@ -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: 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) - 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) - 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) ### 1.2.0 (2014-01-14)
- Add: Add RPM SPECfile and new `package` directory to store package instructions and files (https://github.com/sej7278) - Add: Add RPM SPECfile and new `package` directory to store package instructions and files (https://github.com/sej7278)

View file

@ -1,32 +1,37 @@
# A Makefile for Arduino Sketches # 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 ### From source
ARDMK_DIR = /usr/local
AVR_TOOLS_DIR = /usr
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 git@github.com: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 ## Requirements
MONITOR_PORT = /dev/ttyACM0
- `BOARD_TAG` - Type of board, for a list see boards.txt or `make show_boards` You need to have the Arduino IDE. You can either install it through the
- `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. installer or download the distribution zip file and extract it.
- `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.
The Makefile also delegates resetting the board to a short Perl program. The Makefile also delegates resetting the board to a short Perl program.
You'll need to install `Device::SerialPort` to use it though. You'll need to install `Device::SerialPort` to use it though.
@ -45,7 +50,7 @@ On openSUSE:
On Mac using MacPorts: 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 and use /opt/local/bin/perl5 instead of /usr/bin/perl
@ -53,6 +58,39 @@ On other systems:
cpan Device::SerialPort 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 ## Including Libraries
You can specify space separated list of libraries that are needed for your sketch to the variable `ARDUINO_LIBS`. You can specify space separated list of libraries that are needed for your sketch to the variable `ARDUINO_LIBS`.