Skip to content

Commit 77d1d9c

Browse files
az-zsudar
authored andcommitted
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.
1 parent c0fea5c commit 77d1d9c

File tree

3 files changed

+36
-12
lines changed

3 files changed

+36
-12
lines changed

Arduino.mk

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@
2727
#
2828
# PATHS YOU NEED TO SET UP
2929
#
30-
# We need to worry about three different sorts of file:
30+
# We need to worry about three different sorts of files:
3131
#
3232
# 1. The directory where the *.mk files are stored
3333
# => ARDMK_DIR
3434
#
3535
# 2. Things which are always in the Arduino distribution e.g.
36-
# boards.txt, libraries, &c.
36+
# boards.txt, libraries, etc.
3737
# => ARDUINO_DIR
3838
#
3939
# 3. Things which might be bundled with the Arduino distribution, but
4040
# might come from the system. Most of the toolchain is like this:
41-
# on Linux it's supplied by the system.
41+
# on Linux it is supplied by the system.
4242
# => AVR_TOOLS_DIR
4343
#
4444
# Having set these three variables, we can work out the rest assuming
@@ -91,8 +91,8 @@
9191
#
9292
# DEPENDENCIES
9393
#
94-
# The Perl programs need a couple of libraries:
95-
# Device::SerialPort
94+
# to reset a board the (python) pySerial program is used.
95+
# please install it prior to continue.
9696
#
9797
########################################################################
9898
#

HISTORY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ A Makefile for Arduino Sketches
44
The following is the rough list of changes that went into different versions.
55
I tried to give credit whenever possible. If I have missed anyone, kindly add it to the list.
66

7+
### In Development
8+
-Tweak: Updated Linux instructions and sync documentation from the old blog(), README.md and Arduino.mk (https://github.com/az-z)
9+
710
### 1.5.1 (Debian version: 1.5-3) (2016-02-22)
811

912
- New: Add show_submenu target (https://github.com/drewhutchison)

README.md

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,12 @@ or you can install it using the [pre-built package installer](https://pypi.pytho
127127

128128
## Usage
129129

130-
You can also find more [detailed instructions in this guide](http://hardwarefun.com/tutorials/compiling-arduino-sketches-using-makefile).
130+
Download a copy of this repo somewhere to your system or install it through a package by following the above installation instruction.
131131

132-
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,
132+
Sample makefiles are provided in the `examples/` directory. E.g. [Makefile-example](examples/MakefileExample/Makefile-example.mk) demonstrates some of the more advanced options,
133133
whilst [Blink](examples/Blink/Makefile) demonstrates the minimal settings required for various boards like the Uno, Nano, Mega, Teensy, ATtiny etc.
134134

135-
Download a copy of this repo some where in your system or install it through a package.
135+
MAC:
136136

137137
On the Mac with IDE 1.0 you might want to set:
138138

@@ -149,14 +149,31 @@ On the Mac with IDE 1.5+ it's like above but with
149149
```
150150
ARDUINO_DIR = /Applications/Arduino.app/Contents/Java
151151
```
152+
LINUX:
152153

153-
On Linux (if you have installed through package), you shouldn't need to set anything other than your board type and port:
154+
You can either declare following variables in your project's makefile or set them as environmental variables.
155+
156+
ARDUINO_DIR – Directory where Arduino is installed
157+
ARDMK_DIR – Directory where you have copied the makefile
158+
AVR_TOOLS_DIR – Directory where avr tools are installed
159+
160+
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.
161+
162+
Example of ~/.bashrc file:
163+
164+
export ARDUINO_DIR=/home/sudar/apps/arduino-1.0.5
165+
export ARDMK_DIR=/home/sudar/Dropbox/code/Arduino-Makefile
166+
export AVR_TOOLS_DIR=/usr/include
167+
168+
Example of the project's make file:
154169

155170
```make
156171
BOARD_TAG = mega2560
157172
MONITOR_PORT = /dev/ttyACM0
158173
```
159174

175+
WINDOWS:
176+
160177
On Windows (using cygwin), you might want to set:
161178

162179
```make
@@ -205,24 +222,28 @@ Instead of:
205222
ARDUINO_DIR=../../../../../Program\ Files\ \(x86\)/Arduino
206223
```
207224

225+
Usefull Variables:
226+
227+
The list of all variables that can be overridden is available at [arduino-mk-vars.md](arduino-mk-vars.md) file.
228+
208229
- `BOARD_TAG` - Type of board, for a list see boards.txt or `make show_boards`
209230
- `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.
210231
- `ARDUINO_DIR` - Path to Arduino installation. In Cygwin in Windows this path must be
211232
relative, not absolute (e.g. "../../arduino" and not "/c/cygwin/Arduino").
212233
- `ARDMK_DIR` - Path where the `*.mk` are present. If you installed the package, then it is usually `/usr/share/arduino`
213234
- `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.
214235

215-
The list of all variables that can be overridden is available at [arduino-mk-vars.md](arduino-mk-vars.md) file.
236+
216237

217238
## Including Libraries
218239

219-
You can specify space separated list of libraries that are needed for your sketch to the variable `ARDUINO_LIBS`.
240+
You can specify space separated list of libraries that are needed for your sketch in the variable `ARDUINO_LIBS`.
220241

221242
```make
222243
ARDUINO_LIBS = Wire SoftwareSerial
223244
```
224245

225-
The libraries will be searched in the following places in the following order.
246+
The libraries will be searched for in the following places in the following order.
226247

227248
- `/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`.
228249
- `/libraries` directory inside your Arduino directory, which is read from `ARDUINO_DIR`.

0 commit comments

Comments
 (0)