Update README

Updated to reflect the Linux changes for Arduino 1.6.5
Updated to reflect the information (Linux portion) from the guide. Removed the URL to the blog.
This commit is contained in:
az-z 2016-06-18 14:59:18 -04:00 committed by Sudar Muthu
parent c0fea5ccd9
commit 77d1d9c4ea
3 changed files with 36 additions and 12 deletions

View file

@ -27,18 +27,18 @@
#
# PATHS YOU NEED TO SET UP
#
# We need to worry about three different sorts of file:
# We need to worry about three different sorts of files:
#
# 1. The directory where the *.mk files are stored
# => ARDMK_DIR
#
# 2. Things which are always in the Arduino distribution e.g.
# boards.txt, libraries, &c.
# boards.txt, libraries, etc.
# => ARDUINO_DIR
#
# 3. Things which might be bundled with the Arduino distribution, but
# might come from the system. Most of the toolchain is like this:
# on Linux it's supplied by the system.
# on Linux it is supplied by the system.
# => AVR_TOOLS_DIR
#
# Having set these three variables, we can work out the rest assuming
@ -91,8 +91,8 @@
#
# DEPENDENCIES
#
# The Perl programs need a couple of libraries:
# Device::SerialPort
# to reset a board the (python) pySerial program is used.
# please install it prior to continue.
#
########################################################################
#

View file

@ -4,6 +4,9 @@ A Makefile for Arduino Sketches
The following is the rough list of changes that went into different versions.
I tried to give credit whenever possible. If I have missed anyone, kindly add it to the list.
### In Development
-Tweak: Updated Linux instructions and sync documentation from the old blog(), README.md and Arduino.mk (https://github.com/az-z)
### 1.5.1 (Debian version: 1.5-3) (2016-02-22)
- New: Add show_submenu target (https://github.com/drewhutchison)

View file

@ -127,12 +127,12 @@ or you can install it using the [pre-built package installer](https://pypi.pytho
## Usage
You can also find more [detailed instructions in this guide](http://hardwarefun.com/tutorials/compiling-arduino-sketches-using-makefile).
Download a copy of this repo somewhere to your system or install it through a package by following the above installation instruction.
You can also checkout the sample makefiles inside the `examples/` directory, e.g. [Makefile-example](examples/MakefileExample/Makefile-example.mk) demonstrates some of the more advanced options,
Sample makefiles are provided in the `examples/` directory. E.g. [Makefile-example](examples/MakefileExample/Makefile-example.mk) demonstrates some of the more advanced options,
whilst [Blink](examples/Blink/Makefile) demonstrates the minimal settings required for various boards like the Uno, Nano, Mega, Teensy, ATtiny etc.
Download a copy of this repo some where in your system or install it through a package.
MAC:
On the Mac with IDE 1.0 you might want to set:
@ -149,14 +149,31 @@ On the Mac with IDE 1.5+ it's like above but with
```
ARDUINO_DIR = /Applications/Arduino.app/Contents/Java
```
LINUX:
On Linux (if you have installed through package), you shouldn't need to set anything other than your board type and port:
You can either declare following variables in your project's makefile or set them as environmental variables.
ARDUINO_DIR Directory where Arduino is installed
ARDMK_DIR Directory where you have copied the makefile
AVR_TOOLS_DIR Directory where avr tools are installed
Keep in mind, that Arduino 1.5.x+ comes with it's own copy of avr tools which you can leverage in your build process here.
Example of ~/.bashrc file:
export ARDUINO_DIR=/home/sudar/apps/arduino-1.0.5
export ARDMK_DIR=/home/sudar/Dropbox/code/Arduino-Makefile
export AVR_TOOLS_DIR=/usr/include
Example of the project's make file:
```make
BOARD_TAG = mega2560
MONITOR_PORT = /dev/ttyACM0
```
WINDOWS:
On Windows (using cygwin), you might want to set:
```make
@ -205,6 +222,10 @@ Instead of:
ARDUINO_DIR=../../../../../Program\ Files\ \(x86\)/Arduino
```
Usefull Variables:
The list of all variables that can be overridden is available at [arduino-mk-vars.md](arduino-mk-vars.md) file.
- `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
@ -212,17 +233,17 @@ Instead of:
- `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. Otherwise set it realtive and not absolute.
The list of all variables that can be overridden is available at [arduino-mk-vars.md](arduino-mk-vars.md) file.
## 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 in the variable `ARDUINO_LIBS`.
```make
ARDUINO_LIBS = Wire SoftwareSerial
```
The libraries will be searched in the following places in the following order.
The libraries will be searched for in the following places in the following order.
- `/libraries` directory inside your sketchbook directory. Sketchbook directory will be auto detected from your Arduino preference file. You can also manually set it through `ARDUINO_SKETCHBOOK`.
- `/libraries` directory inside your Arduino directory, which is read from `ARDUINO_DIR`.