From 61ae9b0236c78dde25c804873d66f51ec4bd794e Mon Sep 17 00:00:00 2001 From: az-z Date: Sat, 18 Jun 2016 14:58:23 -0400 Subject: [PATCH] Update README.md Updated to reflect the information (Linux portion) from the guide. Removed the URL to the blog. --- README.md | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index bf59185..35b70b9 100644 --- a/README.md +++ b/README.md @@ -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 in your system or install it through a package. -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,25 @@ On the Mac with IDE 1.5+ it's like above but with ``` ARDUINO_DIR = /Applications/Arduino.app/Contents/Java ``` +LINUX: +You can either declare following variables in your child makefile or set them as environmental variables. -On Linux (if you have installed through package), you shouldn't need to set anything other than your board type and port: + 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 for Arduino 1.5.x+ comes with it's own copy of avr tools which you can leverage 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 ```make BOARD_TAG = mega2560 MONITOR_PORT = /dev/ttyACM0 ``` +WINDOWS: On Windows (using cygwin), you might want to set: ```make @@ -205,6 +216,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 +227,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`.