arduino-mk 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +60 -0
- data/lib/arduino-mk.rb +10 -0
- data/lib/arduino-mk/base.rb +61 -0
- data/lib/arduino-mk/error_improver.rb +42 -0
- data/lib/arduino-mk/makefile/runner.rb +23 -0
- data/lib/arduino-mk/makefile/template.rb +27 -0
- data/lib/arduino-mk/null_project.rb +5 -0
- data/lib/arduino-mk/null_project/null.c +1 -0
- data/lib/arduino-mk/option_parser.rb +35 -0
- data/lib/arduino-mk/project_copier.rb +9 -0
- data/vendor/Arduino-Makefile/Arduino.mk +1306 -0
- data/vendor/Arduino-Makefile/CONTRIBUTING.md +35 -0
- data/vendor/Arduino-Makefile/Common.mk +46 -0
- data/vendor/Arduino-Makefile/HISTORY.md +225 -0
- data/vendor/Arduino-Makefile/README.md +189 -0
- data/vendor/Arduino-Makefile/ard-reset-arduino.1 +48 -0
- data/vendor/Arduino-Makefile/arduino-mk-vars.md +1101 -0
- data/vendor/Arduino-Makefile/bin/ard-reset-arduino +38 -0
- data/vendor/Arduino-Makefile/chipKIT.mk +109 -0
- data/vendor/Arduino-Makefile/examples/ATtinyBlink/ATtinyBlink.ino +23 -0
- data/vendor/Arduino-Makefile/examples/ATtinyBlink/Makefile +13 -0
- data/vendor/Arduino-Makefile/examples/AnalogInOutSerial/AnalogInOutSerial.ino +53 -0
- data/vendor/Arduino-Makefile/examples/AnalogInOutSerial/Makefile +4 -0
- data/vendor/Arduino-Makefile/examples/Blink/Blink.ino +19 -0
- data/vendor/Arduino-Makefile/examples/Blink/Makefile +5 -0
- data/vendor/Arduino-Makefile/examples/BlinkChipKIT/BlinkChipKIT.pde +19 -0
- data/vendor/Arduino-Makefile/examples/BlinkChipKIT/Makefile +5 -0
- data/vendor/Arduino-Makefile/examples/BlinkInAVRC/Makefile +16 -0
- data/vendor/Arduino-Makefile/examples/BlinkInAVRC/blink.c +38 -0
- data/vendor/Arduino-Makefile/examples/BlinkWithoutDelay/BlinkWithoutDelay.ino +65 -0
- data/vendor/Arduino-Makefile/examples/BlinkWithoutDelay/Makefile +4 -0
- data/vendor/Arduino-Makefile/examples/Fade/Fade.ino +31 -0
- data/vendor/Arduino-Makefile/examples/Fade/Makefile +4 -0
- data/vendor/Arduino-Makefile/examples/HelloWorld/HelloWorld.ino +58 -0
- data/vendor/Arduino-Makefile/examples/HelloWorld/Makefile +4 -0
- data/vendor/Arduino-Makefile/examples/MakefileExample/Makefile-example.mk +55 -0
- data/vendor/Arduino-Makefile/examples/README.md +7 -0
- data/vendor/Arduino-Makefile/examples/TinySoftWareSerial/Makefile +14 -0
- data/vendor/Arduino-Makefile/examples/TinySoftWareSerial/TinySoftwareSerial.ino +12 -0
- data/vendor/Arduino-Makefile/examples/WebServer/Makefile +6 -0
- data/vendor/Arduino-Makefile/examples/WebServer/WebServer.ino +82 -0
- data/vendor/Arduino-Makefile/examples/master_reader/Makefile +6 -0
- data/vendor/Arduino-Makefile/examples/master_reader/master_reader.ino +32 -0
- data/vendor/Arduino-Makefile/examples/toneMelody/Makefile +4 -0
- data/vendor/Arduino-Makefile/examples/toneMelody/pitches.h +95 -0
- data/vendor/Arduino-Makefile/examples/toneMelody/toneMelody.ino +49 -0
- data/vendor/Arduino-Makefile/licence.txt +502 -0
- data/vendor/Arduino-Makefile/packaging/debian/README.md +23 -0
- data/vendor/Arduino-Makefile/packaging/fedora/README.md +39 -0
- data/vendor/Arduino-Makefile/packaging/fedora/arduino-mk.spec +70 -0
- metadata +110 -0
@@ -0,0 +1,48 @@
|
|
1
|
+
.TH ARD-RESET-ARDUINO "1" "April 2014" "ard-reset-arduino 1.3.3" "Arduino CLI Reset"
|
2
|
+
|
3
|
+
.SH NAME
|
4
|
+
ard-reset-arduino - Reset Arduino board
|
5
|
+
|
6
|
+
.SH SYNOPSIS
|
7
|
+
.B ard-reset-arduino
|
8
|
+
[OPTION]... [PORT]
|
9
|
+
|
10
|
+
.SH DESCRIPTION
|
11
|
+
To reset Arduinos, we either pulse the DTR line or open the USB port
|
12
|
+
at 1200 baud and close it again.
|
13
|
+
|
14
|
+
.SH OPTIONS
|
15
|
+
.B \-\-verbose
|
16
|
+
Watch what's going on on STDERR.
|
17
|
+
|
18
|
+
.B \-\-period
|
19
|
+
Specify the DTR pulse width in seconds.
|
20
|
+
|
21
|
+
.B \-\-caterina
|
22
|
+
Reset a Leonardo, Micro, Robot, LilyPadUSB or similar 32u4-based device.
|
23
|
+
|
24
|
+
.SH EXAMPLES
|
25
|
+
ard-reset-arduino /dev/ttyACM0
|
26
|
+
.PP
|
27
|
+
ard-reset-arduino \-\-verbose \-\-period=0.1 /dev/cu.usb*
|
28
|
+
.PP
|
29
|
+
ard-reset-arduino \-\-verbose \-\-caterina /dev/ttyUSB0
|
30
|
+
|
31
|
+
.SH BUGS
|
32
|
+
There are no known bugs in this application. Please report problems
|
33
|
+
to the author. Patches are welcome.
|
34
|
+
|
35
|
+
.SH AUTHOR
|
36
|
+
Simon John, git@the-jedi.co.uk
|
37
|
+
|
38
|
+
.SH LICENSE
|
39
|
+
Copyright (c) 2014, Simon John. All rights reserved.
|
40
|
+
.PP
|
41
|
+
This file is free software; you can redistribute it and/or modify it
|
42
|
+
under the terms of the GNU Lesser General Public License as published
|
43
|
+
by the Free Software Foundation; either version 2.1 of the License, or
|
44
|
+
(at your option) any later version.
|
45
|
+
.PP
|
46
|
+
This program is distributed in the hope that it will be useful, but
|
47
|
+
WITHOUT ANY WARRANTY; without even the implied warranty of
|
48
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
@@ -0,0 +1,1101 @@
|
|
1
|
+
# Documentation of variables
|
2
|
+
|
3
|
+
The following are the different variables that can be overwritten in the user makefiles.
|
4
|
+
|
5
|
+
* [Global variables](#global-variables)
|
6
|
+
* [Installation/Directory variables](#installationdirectory-variables)
|
7
|
+
* [Arduino IDE variables](#arduino-ide-variables)
|
8
|
+
* [Sketch related variables](#sketch-related-variables)
|
9
|
+
* [ISP programming variables](#isp-programming-variables)
|
10
|
+
* [Compiler/Executable variables](#compilerexecutable-variables)
|
11
|
+
* [Avrdude setting variables](#avrdude-setting-variables)
|
12
|
+
* [Bootloader variables](#bootloader-variables)
|
13
|
+
* [ChipKIT variables](#chipkit-variables)
|
14
|
+
|
15
|
+
## Global variables
|
16
|
+
|
17
|
+
### ARDUINO_QUIET
|
18
|
+
|
19
|
+
**Description:**
|
20
|
+
|
21
|
+
Suppress printing of Arduino-Makefile configuration.
|
22
|
+
|
23
|
+
Defaults to `0` (unset/disabled).
|
24
|
+
|
25
|
+
**Example:**
|
26
|
+
|
27
|
+
```Makefile
|
28
|
+
ARDUINO_QUIET = 1
|
29
|
+
```
|
30
|
+
|
31
|
+
**Requirement:** *Optional*
|
32
|
+
|
33
|
+
----
|
34
|
+
|
35
|
+
## Installation/Directory variables
|
36
|
+
|
37
|
+
### ARDMK_DIR
|
38
|
+
|
39
|
+
**Description:**
|
40
|
+
|
41
|
+
Directory where the `*.mk` files are stored.
|
42
|
+
|
43
|
+
Usually can be auto-detected as `AUTO_ARDUINO_DIR` (parent of `Arduino.mk`).
|
44
|
+
|
45
|
+
**Example:**
|
46
|
+
|
47
|
+
```Makefile
|
48
|
+
ARDMK_DIR = /usr/share/arduino
|
49
|
+
```
|
50
|
+
|
51
|
+
**Requirement:** *Optional*
|
52
|
+
|
53
|
+
----
|
54
|
+
|
55
|
+
### AVR_TOOLS_DIR
|
56
|
+
|
57
|
+
**Description:**
|
58
|
+
|
59
|
+
Directory where tools such as `avrdude`, `avr-g++`, `avr-gcc`, etc. are stored in the `bin/` subdirectory.
|
60
|
+
|
61
|
+
Usually can be auto-detected from `$PATH` as `SYSTEMPATH_AVR_TOOLS_DIR` or as `BUNDLED_AVR_TOOLS_DIR` within the Arduino distribution.
|
62
|
+
|
63
|
+
**Example:**
|
64
|
+
|
65
|
+
```Makefile
|
66
|
+
AVR_TOOLS_DIR = /usr
|
67
|
+
# or
|
68
|
+
AVR_TOOLS_DIR = /usr/share/arduino/hardware/tools/avr
|
69
|
+
```
|
70
|
+
|
71
|
+
**Requirement:** *Optional*
|
72
|
+
|
73
|
+
----
|
74
|
+
|
75
|
+
### RESET_CMD
|
76
|
+
|
77
|
+
**Description:**
|
78
|
+
|
79
|
+
Command to reset the MCU.
|
80
|
+
|
81
|
+
Defaults to `ard-reset-arduino` with the extra `--caterina` flag for atmega32u4 boards.
|
82
|
+
|
83
|
+
**Example:**
|
84
|
+
|
85
|
+
```Makefile
|
86
|
+
RESET_CMD = ~/gertduino/reset
|
87
|
+
```
|
88
|
+
|
89
|
+
**Requirement:** *Optional*
|
90
|
+
|
91
|
+
----
|
92
|
+
|
93
|
+
## Arduino IDE variables
|
94
|
+
|
95
|
+
### ARDUINO_DIR
|
96
|
+
|
97
|
+
**Description:**
|
98
|
+
|
99
|
+
Directory where the Arduino IDE and/or core files are stored.
|
100
|
+
|
101
|
+
**Example:**
|
102
|
+
|
103
|
+
```Makefile
|
104
|
+
# Linux
|
105
|
+
ARDUINO_DIR = /usr/share/arduino
|
106
|
+
# Mac OS X
|
107
|
+
ARDUINO_DIR = /Applications/Arduino.app/Contents/Resources/Java
|
108
|
+
```
|
109
|
+
|
110
|
+
**Requirement:** *Optional*
|
111
|
+
|
112
|
+
----
|
113
|
+
|
114
|
+
### ARDUINO_VERSION
|
115
|
+
|
116
|
+
**Description:**
|
117
|
+
|
118
|
+
Version string for Arduino IDE and/or core.
|
119
|
+
|
120
|
+
Usually can be auto-detected as `AUTO_ARDUINO_VERSION` from `/usr/share/arduino/lib/version.txt`
|
121
|
+
|
122
|
+
**Example:**
|
123
|
+
|
124
|
+
```Makefile
|
125
|
+
ARDUINO_VERSION = 105
|
126
|
+
```
|
127
|
+
|
128
|
+
**Requirement:** *Optional*
|
129
|
+
|
130
|
+
----
|
131
|
+
|
132
|
+
### ARDUINO_SKETCHBOOK
|
133
|
+
|
134
|
+
**Description:**
|
135
|
+
|
136
|
+
Path to `sketchbook` directory.
|
137
|
+
|
138
|
+
Usually can be auto-detected from the Arduino `preferences.txt` file or the default `~/sketchbook`
|
139
|
+
|
140
|
+
**Example:**
|
141
|
+
|
142
|
+
```Makefile
|
143
|
+
ARDUINO_SKETCHBOOK = ~/sketches
|
144
|
+
```
|
145
|
+
|
146
|
+
**Requirement:** *Optional*
|
147
|
+
|
148
|
+
----
|
149
|
+
|
150
|
+
### ARDUINO_PREFERENCES_PATH
|
151
|
+
|
152
|
+
**Description:**
|
153
|
+
|
154
|
+
Path to Arduino `preferences.txt` file.
|
155
|
+
|
156
|
+
Usually can be auto-detected as `AUTO_ARDUINO_PREFERENCES` from the defaults:
|
157
|
+
|
158
|
+
* on Linux : `~/.arduino/preferences.txt`
|
159
|
+
* on Mac OS X : `~/Library/Arduino/preferences.txt`
|
160
|
+
|
161
|
+
**Example:**
|
162
|
+
|
163
|
+
```Makefile
|
164
|
+
ARDUINO_PREFERENCES_PATH = ~/sketches/preferences.txt
|
165
|
+
```
|
166
|
+
|
167
|
+
**Requirement:** *Optional*
|
168
|
+
|
169
|
+
----
|
170
|
+
|
171
|
+
### ARDUINO_CORE_PATH
|
172
|
+
|
173
|
+
**Description:**
|
174
|
+
|
175
|
+
Path to standard Arduino core files.
|
176
|
+
|
177
|
+
**Example:**
|
178
|
+
|
179
|
+
```Makefile
|
180
|
+
ARDUINO_CORE_PATH = /usr/share/arduino/hardware/arduino/cores/arduino
|
181
|
+
```
|
182
|
+
|
183
|
+
**Requirement:** *Optional*
|
184
|
+
|
185
|
+
----
|
186
|
+
|
187
|
+
## Sketch related variables
|
188
|
+
|
189
|
+
### ARDUINO_LIBS
|
190
|
+
|
191
|
+
**Description:**
|
192
|
+
|
193
|
+
Any libraries you intend to include.
|
194
|
+
|
195
|
+
Usually can be auto-detected from the sketch. Separated by spaces. If the library has a `/utility` folder (like `SD` or `Wire` library), then the utility folder should also be specified.
|
196
|
+
|
197
|
+
**Example:**
|
198
|
+
|
199
|
+
```Makefile
|
200
|
+
ARDUINO_LIBS = SD SD/utility Wire Wire/utility
|
201
|
+
```
|
202
|
+
|
203
|
+
**Requirement:** *Optional*
|
204
|
+
|
205
|
+
----
|
206
|
+
|
207
|
+
### BOARD_TAG
|
208
|
+
|
209
|
+
**Description:**
|
210
|
+
|
211
|
+
Device type as listed in `boards.txt` or `make show_boards`.
|
212
|
+
|
213
|
+
**Example:**
|
214
|
+
|
215
|
+
```Makefile
|
216
|
+
BOARD_TAG = uno or mega2560
|
217
|
+
```
|
218
|
+
|
219
|
+
**Requirement:** *Mandatory*
|
220
|
+
|
221
|
+
----
|
222
|
+
|
223
|
+
### MONITOR_PORT
|
224
|
+
|
225
|
+
**Description:**
|
226
|
+
|
227
|
+
Path to serial (USB) device used for uploading/serial comms.
|
228
|
+
|
229
|
+
**Example:**
|
230
|
+
|
231
|
+
```Makefile
|
232
|
+
# Linux
|
233
|
+
MONITOR_PORT = /dev/ttyUSB0
|
234
|
+
# or
|
235
|
+
MONITOR_PORT = /dev/ttyACM0
|
236
|
+
# Mac OS X
|
237
|
+
MONITOR_PORT = /dev/cu.usb*
|
238
|
+
# Windows
|
239
|
+
MONITOR_PORT = com3
|
240
|
+
```
|
241
|
+
|
242
|
+
**Requirement:** *Mandatory*
|
243
|
+
|
244
|
+
----
|
245
|
+
|
246
|
+
### USER_LIB_PATH
|
247
|
+
|
248
|
+
**Description:**
|
249
|
+
|
250
|
+
Directory where additional libraries are stored.
|
251
|
+
|
252
|
+
Defaults to `libraries` directory within user's sketchbook.
|
253
|
+
|
254
|
+
**Example:**
|
255
|
+
|
256
|
+
```Makefile
|
257
|
+
# Linux
|
258
|
+
USER_LIB_PATH = ~/sketchbook/libraries
|
259
|
+
# For a random project on *nix
|
260
|
+
USER_LIB_PATH = /path/to/my/project
|
261
|
+
```
|
262
|
+
|
263
|
+
**Requirement:** *Optional*
|
264
|
+
|
265
|
+
----
|
266
|
+
|
267
|
+
### OBJDIR
|
268
|
+
|
269
|
+
**Description:**
|
270
|
+
|
271
|
+
Directory where binaries and compiled files are put.
|
272
|
+
|
273
|
+
Defaults to `build-$(BOARD_TAG)` in your `Makefile` directory.
|
274
|
+
|
275
|
+
**Example:**
|
276
|
+
|
277
|
+
```Makefile
|
278
|
+
OBJDIR = /path/to/my/project-directory/bin
|
279
|
+
```
|
280
|
+
|
281
|
+
**Requirement:** *Optional*
|
282
|
+
|
283
|
+
----
|
284
|
+
|
285
|
+
### ALTERNATE_CORE
|
286
|
+
|
287
|
+
**Description:**
|
288
|
+
|
289
|
+
Non-standard core for Arduino-unsupported chips like the ATtiny.
|
290
|
+
|
291
|
+
**Example:**
|
292
|
+
|
293
|
+
```Makefile
|
294
|
+
# HLT core
|
295
|
+
ALTERNATE_CORE = attiny-master
|
296
|
+
# tiny core
|
297
|
+
ALTERNATE_CORE = arduino-tiny
|
298
|
+
# tiny core 2
|
299
|
+
ALTERNATE_CORE = tiny2
|
300
|
+
```
|
301
|
+
|
302
|
+
**Requirement:** *Optional*
|
303
|
+
|
304
|
+
----
|
305
|
+
|
306
|
+
### ARDUINO_VAR_PATH
|
307
|
+
|
308
|
+
**Description:**
|
309
|
+
|
310
|
+
Path to non-standard core's variant files.
|
311
|
+
|
312
|
+
**Example:**
|
313
|
+
|
314
|
+
```Makefile
|
315
|
+
ARDUINO_VAR_PATH = ~/sketchbook/hardware/arduino-tiny/cores/tiny
|
316
|
+
```
|
317
|
+
|
318
|
+
**Requirement:** *Optional*
|
319
|
+
|
320
|
+
----
|
321
|
+
|
322
|
+
### VARIANT
|
323
|
+
|
324
|
+
**Description:**
|
325
|
+
|
326
|
+
Variant of a standard board design.
|
327
|
+
|
328
|
+
Usually can be auto-detected as `build.variant` from `boards.txt`.
|
329
|
+
|
330
|
+
**Example:**
|
331
|
+
|
332
|
+
```Makefile
|
333
|
+
VARIANT = leonardo
|
334
|
+
```
|
335
|
+
|
336
|
+
**Requirement:** *Optional*
|
337
|
+
|
338
|
+
----
|
339
|
+
|
340
|
+
### USB_VID
|
341
|
+
|
342
|
+
**Description:**
|
343
|
+
|
344
|
+
Override `USB VID` for atmega32u4 boards.
|
345
|
+
|
346
|
+
Usually can be auto-detected as `build.vid` from `boards.txt`
|
347
|
+
|
348
|
+
**Example:**
|
349
|
+
|
350
|
+
```Makefile
|
351
|
+
USB_VID = 0x2341
|
352
|
+
```
|
353
|
+
|
354
|
+
**Requirement:** *Optional*
|
355
|
+
|
356
|
+
----
|
357
|
+
|
358
|
+
### USB_PID
|
359
|
+
|
360
|
+
**Description:**
|
361
|
+
|
362
|
+
Override `USB PID` for atmega32u4 boards.
|
363
|
+
|
364
|
+
Usually can be auto-detected as `build.pid` from `boards.txt`
|
365
|
+
|
366
|
+
**Example:**
|
367
|
+
|
368
|
+
```Makefile
|
369
|
+
USB_PID = 0x8039
|
370
|
+
```
|
371
|
+
|
372
|
+
**Requirement:** *Optional*
|
373
|
+
|
374
|
+
----
|
375
|
+
|
376
|
+
### F_CPU
|
377
|
+
|
378
|
+
**Description:**
|
379
|
+
|
380
|
+
CPU speed in Hz
|
381
|
+
|
382
|
+
Usually can be auto-detected as `build.f_cpu` from `boards.txt`
|
383
|
+
|
384
|
+
**Example:**
|
385
|
+
|
386
|
+
```Makefile
|
387
|
+
F_CPU = 8000000L
|
388
|
+
```
|
389
|
+
|
390
|
+
**Requirement:** *Optional*
|
391
|
+
|
392
|
+
----
|
393
|
+
|
394
|
+
### HEX_MAXIMUM_SIZE
|
395
|
+
|
396
|
+
**Description:**
|
397
|
+
|
398
|
+
Maximum hex file size
|
399
|
+
|
400
|
+
Usually can be auto-detected as `upload.maximum_size` from `boards.txt`
|
401
|
+
|
402
|
+
**Example:**
|
403
|
+
|
404
|
+
```Makefile
|
405
|
+
HEX_MAXIMUM_SIZE = 14336
|
406
|
+
```
|
407
|
+
|
408
|
+
**Requirement:** *Optional*
|
409
|
+
|
410
|
+
----
|
411
|
+
|
412
|
+
### MCU
|
413
|
+
|
414
|
+
**Description:**
|
415
|
+
|
416
|
+
Microcontroller model.
|
417
|
+
|
418
|
+
Usually can be auto-detected as `build.mcu` from `boards.txt`
|
419
|
+
|
420
|
+
**Example:**
|
421
|
+
|
422
|
+
```Makefile
|
423
|
+
MCU = atmega32u4
|
424
|
+
```
|
425
|
+
|
426
|
+
**Requirement:** *Optional*
|
427
|
+
|
428
|
+
----
|
429
|
+
|
430
|
+
### MCU_FLAG_NAME
|
431
|
+
|
432
|
+
**Description:**
|
433
|
+
|
434
|
+
Override default MCU flags.
|
435
|
+
|
436
|
+
Defaults to `mmcu`
|
437
|
+
|
438
|
+
**Example:**
|
439
|
+
|
440
|
+
```Makefile
|
441
|
+
MCU_FLAG_NAME = mprocessor
|
442
|
+
```
|
443
|
+
|
444
|
+
**Requirement:** *Optional*
|
445
|
+
|
446
|
+
----
|
447
|
+
|
448
|
+
### MONITOR_BAUDRATE
|
449
|
+
|
450
|
+
**Description:**
|
451
|
+
|
452
|
+
Baudrate of the serial monitor.
|
453
|
+
|
454
|
+
Defaults to `9600` if it can't find it in the sketch `Serial.begin()`
|
455
|
+
|
456
|
+
**Example:**
|
457
|
+
|
458
|
+
```Makefile
|
459
|
+
MONITOR_BAUDRATE = 57600
|
460
|
+
```
|
461
|
+
|
462
|
+
**Requirement:** *Optional*
|
463
|
+
|
464
|
+
----
|
465
|
+
|
466
|
+
## ISP programming variables
|
467
|
+
|
468
|
+
### ISP_PROG
|
469
|
+
|
470
|
+
**Description:**
|
471
|
+
|
472
|
+
Type of ISP. Either a USB device or ArduinoISP protocol.
|
473
|
+
|
474
|
+
**Example:**
|
475
|
+
|
476
|
+
```Makefile
|
477
|
+
ISP_PROG = usbasp
|
478
|
+
# or
|
479
|
+
ISP_PROG = usbtiny
|
480
|
+
# or
|
481
|
+
ISP_PROG = stk500v2
|
482
|
+
# or
|
483
|
+
ISP_PROG = stk500v1
|
484
|
+
```
|
485
|
+
|
486
|
+
**Requirement:** *Optional*
|
487
|
+
|
488
|
+
----
|
489
|
+
|
490
|
+
### ISP_PORT
|
491
|
+
|
492
|
+
**Description:**
|
493
|
+
|
494
|
+
Device path to ArduinoISP. Not needed for hardware ISP's.
|
495
|
+
|
496
|
+
**Example:**
|
497
|
+
|
498
|
+
```Makefile
|
499
|
+
# Linux
|
500
|
+
ISP_PORT = /dev/ttyACM0
|
501
|
+
```
|
502
|
+
|
503
|
+
**Requirement:** *Optional*
|
504
|
+
|
505
|
+
----
|
506
|
+
|
507
|
+
### ISP_LOCK_FUSE_PRE
|
508
|
+
|
509
|
+
**Description:**
|
510
|
+
|
511
|
+
Bootloader unlock bits.
|
512
|
+
|
513
|
+
Usually can be auto-detected from `boards.txt`
|
514
|
+
|
515
|
+
**Example:**
|
516
|
+
|
517
|
+
```Makefile
|
518
|
+
ISP_LOCK_FUSE_PRE = 0x3f
|
519
|
+
```
|
520
|
+
|
521
|
+
**Requirement:** *Optional*
|
522
|
+
|
523
|
+
----
|
524
|
+
|
525
|
+
### ISP_LOCK_FUSE_POST
|
526
|
+
|
527
|
+
**Description:**
|
528
|
+
|
529
|
+
Bootloader lock bits.
|
530
|
+
|
531
|
+
Usually can be auto-detected from `boards.txt`
|
532
|
+
|
533
|
+
**Example:**
|
534
|
+
|
535
|
+
```Makefile
|
536
|
+
ISP_LOCK_FUSE_POST = 0xcf
|
537
|
+
```
|
538
|
+
|
539
|
+
**Requirement:** *Optional*
|
540
|
+
|
541
|
+
----
|
542
|
+
|
543
|
+
### ISP_HIGH_FUSE
|
544
|
+
|
545
|
+
**Description:**
|
546
|
+
|
547
|
+
`ISP_LOW_FUSE/ISP_EXT_FUSE` - high/low/extended fuse bits.
|
548
|
+
|
549
|
+
Usually can be auto-detected from `boards.txt`
|
550
|
+
|
551
|
+
**Example:**
|
552
|
+
|
553
|
+
```Makefile
|
554
|
+
ISP_HIGH_FUSE = 0xdf # or 0xff or 0x01
|
555
|
+
```
|
556
|
+
|
557
|
+
**Requirement:** *Optional*
|
558
|
+
|
559
|
+
----
|
560
|
+
|
561
|
+
### ISP_EEPROM
|
562
|
+
|
563
|
+
**Description:**
|
564
|
+
|
565
|
+
Whether to upload the EEPROM file or not.
|
566
|
+
|
567
|
+
Defaults to `0`
|
568
|
+
|
569
|
+
**Example:**
|
570
|
+
|
571
|
+
```Makefile
|
572
|
+
ISP_EEPROM = 1
|
573
|
+
```
|
574
|
+
|
575
|
+
**Requirement:** *Optional*
|
576
|
+
|
577
|
+
----
|
578
|
+
|
579
|
+
## Compiler/Executable variables
|
580
|
+
|
581
|
+
### CC_NAME
|
582
|
+
|
583
|
+
**Description:**
|
584
|
+
|
585
|
+
C compiler.
|
586
|
+
|
587
|
+
Defaults to `avr-gcc`
|
588
|
+
|
589
|
+
**Example:**
|
590
|
+
|
591
|
+
```Makefile
|
592
|
+
CC_NAME = pic32-gcc
|
593
|
+
```
|
594
|
+
|
595
|
+
**Requirement:** *Optional*
|
596
|
+
|
597
|
+
----
|
598
|
+
|
599
|
+
### CXX_NAME
|
600
|
+
|
601
|
+
**Description:**
|
602
|
+
|
603
|
+
C++ compiler.
|
604
|
+
|
605
|
+
Defaults to `avr-g++`
|
606
|
+
|
607
|
+
**Example:**
|
608
|
+
|
609
|
+
```Makefile
|
610
|
+
CXX_NAME = pic32-g++
|
611
|
+
```
|
612
|
+
|
613
|
+
**Requirement:** *Optional*
|
614
|
+
|
615
|
+
----
|
616
|
+
|
617
|
+
### OBJCOPY_NAME
|
618
|
+
|
619
|
+
**Description:**
|
620
|
+
|
621
|
+
Objcopy utility.
|
622
|
+
|
623
|
+
Defaults to `avr-objcopy`
|
624
|
+
|
625
|
+
**Example:**
|
626
|
+
|
627
|
+
```Makefile
|
628
|
+
OBJCOPY_NAME = pic32-objcopy
|
629
|
+
```
|
630
|
+
|
631
|
+
**Requirement:** *Optional*
|
632
|
+
|
633
|
+
----
|
634
|
+
|
635
|
+
### OBJDUMP_NAME
|
636
|
+
|
637
|
+
**Description:**
|
638
|
+
|
639
|
+
Objdump utility.
|
640
|
+
|
641
|
+
Defaults to `avr-objdump`
|
642
|
+
|
643
|
+
**Example:**
|
644
|
+
|
645
|
+
```Makefile
|
646
|
+
OBJDUMP_NAME = pic32-objdump
|
647
|
+
```
|
648
|
+
|
649
|
+
**Requirement:** *Optional*
|
650
|
+
|
651
|
+
----
|
652
|
+
|
653
|
+
### AR_NAME
|
654
|
+
|
655
|
+
**Description:**
|
656
|
+
|
657
|
+
Archive utility.
|
658
|
+
|
659
|
+
Defaults to `avr-ar`
|
660
|
+
|
661
|
+
**Example:**
|
662
|
+
|
663
|
+
```Makefile
|
664
|
+
AR_NAME = pic32-ar
|
665
|
+
```
|
666
|
+
|
667
|
+
**Requirement:** *Optional*
|
668
|
+
|
669
|
+
----
|
670
|
+
|
671
|
+
### SIZE_NAME
|
672
|
+
|
673
|
+
**Description:**
|
674
|
+
|
675
|
+
Size utility.
|
676
|
+
|
677
|
+
Defaults to `avr-size`
|
678
|
+
|
679
|
+
**Example:**
|
680
|
+
|
681
|
+
```Makefile
|
682
|
+
SIZE_NAME = pic32-size
|
683
|
+
```
|
684
|
+
|
685
|
+
**Requirement:** *Optional*
|
686
|
+
|
687
|
+
----
|
688
|
+
|
689
|
+
### NM_NAME
|
690
|
+
|
691
|
+
**Description:**
|
692
|
+
|
693
|
+
Nm utility.
|
694
|
+
|
695
|
+
Defaults to `avr-nm`
|
696
|
+
|
697
|
+
**Example:**
|
698
|
+
|
699
|
+
```Makefile
|
700
|
+
NM_NAME = pic32-nm
|
701
|
+
```
|
702
|
+
|
703
|
+
**Requirement:** *Optional*
|
704
|
+
|
705
|
+
----
|
706
|
+
|
707
|
+
### OPTIMIZATION_LEVEL
|
708
|
+
|
709
|
+
**Description:**
|
710
|
+
|
711
|
+
Linker's `-O` flag
|
712
|
+
|
713
|
+
Defaults to `s`, which shouldn't really be changed as it breaks `SoftwareSerial` and usually results in bigger hex files.
|
714
|
+
|
715
|
+
**Example:**
|
716
|
+
|
717
|
+
```Makefile
|
718
|
+
OPTIMIZATION_LEVEL = 3
|
719
|
+
```
|
720
|
+
|
721
|
+
**Requirement:** *Optional*
|
722
|
+
|
723
|
+
----
|
724
|
+
|
725
|
+
### CFLAGS_STD
|
726
|
+
|
727
|
+
**Description:**
|
728
|
+
|
729
|
+
Flags to pass to the C compiler.
|
730
|
+
|
731
|
+
Defaults to `-std=gnu99`
|
732
|
+
|
733
|
+
**Example:**
|
734
|
+
|
735
|
+
```Makefile
|
736
|
+
<unset as per chipKIT.mk>
|
737
|
+
```
|
738
|
+
|
739
|
+
**Requirement:** *Optional*
|
740
|
+
|
741
|
+
----
|
742
|
+
|
743
|
+
### OVERRIDE_EXECUTABLES
|
744
|
+
|
745
|
+
**Description:**
|
746
|
+
|
747
|
+
Override the default build tools.
|
748
|
+
|
749
|
+
If set to `1`, each tool (`CC`, `CXX`, `AS`, `OBJCOPY`, `OBJDUMP`, `AR`, `SIZE`, `NM`) must have its path explicitly defined. See `chipKIT.mk`.
|
750
|
+
|
751
|
+
**Example:**
|
752
|
+
|
753
|
+
```Makefile
|
754
|
+
OVERRIDE_EXECUTABLES = 1
|
755
|
+
```
|
756
|
+
|
757
|
+
**Requirement:** *Optional*
|
758
|
+
|
759
|
+
----
|
760
|
+
|
761
|
+
### MONITOR_CMD
|
762
|
+
|
763
|
+
**Description:**
|
764
|
+
|
765
|
+
Command to run the serial monitor.
|
766
|
+
|
767
|
+
Defaults to `screen`
|
768
|
+
|
769
|
+
**Example:**
|
770
|
+
|
771
|
+
```Makefile
|
772
|
+
MONITOR_CMD = minicom
|
773
|
+
```
|
774
|
+
|
775
|
+
**Requirement:** *Optional*
|
776
|
+
|
777
|
+
----
|
778
|
+
|
779
|
+
### PRE_BUILD_HOOK
|
780
|
+
|
781
|
+
**Description:**
|
782
|
+
|
783
|
+
Path to shell script to be executed before build. Could be used to automatically
|
784
|
+
bump revision number for example.
|
785
|
+
|
786
|
+
Defaults to `pre-build-hook.sh`
|
787
|
+
|
788
|
+
**Example:**
|
789
|
+
|
790
|
+
```Makefile
|
791
|
+
PRE_BUILD_HOOK = ~/bin/bump-revision.sh
|
792
|
+
```
|
793
|
+
|
794
|
+
**Requirement:** *Optional*
|
795
|
+
|
796
|
+
----
|
797
|
+
|
798
|
+
## Avrdude setting variables
|
799
|
+
|
800
|
+
### AVRDUDE
|
801
|
+
|
802
|
+
**Description:**
|
803
|
+
|
804
|
+
Path to `avrdude` utility
|
805
|
+
|
806
|
+
Usually can be auto-detected within the parent of `AVR_TOOLS_DIR` or in the `$PATH`
|
807
|
+
|
808
|
+
**Example:**
|
809
|
+
|
810
|
+
```Makefile
|
811
|
+
AVRDUDE = /usr/bin/avrdude
|
812
|
+
```
|
813
|
+
|
814
|
+
**Requirement:** *Optional*
|
815
|
+
|
816
|
+
----
|
817
|
+
|
818
|
+
### AVRDUDE_CONF
|
819
|
+
|
820
|
+
**Description:**
|
821
|
+
|
822
|
+
Path to `avrdude.conf` file
|
823
|
+
|
824
|
+
Usually can be auto-detected within the parent of `AVR_TOOLS_DIR`
|
825
|
+
|
826
|
+
**Example:**
|
827
|
+
|
828
|
+
```Makefile
|
829
|
+
AVRDUDE_CONF = /etc/avrdude.conf
|
830
|
+
# or
|
831
|
+
AVRDUDE_CONF = /usr/share/arduino/hardware/tools/avrdude.conf
|
832
|
+
```
|
833
|
+
|
834
|
+
**Requirement:** *Optional*
|
835
|
+
|
836
|
+
----
|
837
|
+
|
838
|
+
### AVR_TOOLS_PATH
|
839
|
+
|
840
|
+
**Description:**
|
841
|
+
|
842
|
+
Directory where tools such as `avrdude`, `avr-g++`, `avr-gcc` etc. are stored.
|
843
|
+
|
844
|
+
Usually can be auto-detected from `AVR_TOOLS_DIR/bin`
|
845
|
+
|
846
|
+
**Example:**
|
847
|
+
|
848
|
+
```Makefile
|
849
|
+
AVR_TOOLS_PATH = /usr/bin
|
850
|
+
# or
|
851
|
+
AVR_TOOLS_PATH = /usr/share/arduino/hardware/tools/avr/bin
|
852
|
+
```
|
853
|
+
|
854
|
+
**Requirement:** *Optional*
|
855
|
+
|
856
|
+
----
|
857
|
+
|
858
|
+
### ARDUINO_LIB_PATH
|
859
|
+
|
860
|
+
**Description:**
|
861
|
+
|
862
|
+
Directory where the standard Arduino libraries are stored.
|
863
|
+
|
864
|
+
Defaults to `ARDUINO_DIR/libraries`
|
865
|
+
|
866
|
+
**Example:**
|
867
|
+
|
868
|
+
```Makefile
|
869
|
+
# Linux
|
870
|
+
ARDUINO_LIB_PATH = /usr/share/arduino/libraries
|
871
|
+
```
|
872
|
+
|
873
|
+
**Requirement:** *Optional*
|
874
|
+
|
875
|
+
----
|
876
|
+
|
877
|
+
### ARDUINO_CORE_PATH
|
878
|
+
|
879
|
+
**Description:**
|
880
|
+
|
881
|
+
Directory where the standard Arduino cores are stored.
|
882
|
+
|
883
|
+
Defaults to `ARDUINO_DIR/hardware/arduino/cores/arduino`
|
884
|
+
|
885
|
+
**Example:**
|
886
|
+
|
887
|
+
```Makefile
|
888
|
+
ARDUINO_CORE_PATH = /usr/share/arduino/hardware/arduino/cores/robot
|
889
|
+
```
|
890
|
+
|
891
|
+
**Requirement:** *Optional*
|
892
|
+
|
893
|
+
----
|
894
|
+
|
895
|
+
### ALTERNATE_CORE_PATH
|
896
|
+
|
897
|
+
**Description:**
|
898
|
+
|
899
|
+
Path to non-standard cores.
|
900
|
+
|
901
|
+
Defaults to `ARDUINO_SKETCHBOOK/hardware/ALTERNATE_CORE`
|
902
|
+
|
903
|
+
**Example:**
|
904
|
+
|
905
|
+
```Makefile
|
906
|
+
ALTERNATE_CORE_PATH = ~/sketchbook/hardware/arduino-tiny/cores/tiny
|
907
|
+
```
|
908
|
+
|
909
|
+
**Requirement:** *Optional*
|
910
|
+
|
911
|
+
----
|
912
|
+
|
913
|
+
### BOARDS_TXT
|
914
|
+
|
915
|
+
**Description:**
|
916
|
+
|
917
|
+
Path to `boards.txt`
|
918
|
+
|
919
|
+
Defaults to `ARDUINO_DIR/hardware/arduino/boards.txt`
|
920
|
+
|
921
|
+
**Example:**
|
922
|
+
|
923
|
+
```Makefile
|
924
|
+
BOARD_TXT = ~/sketchbook/hardware/boards.txt
|
925
|
+
# or
|
926
|
+
BOARD_TXT = /usr/share/arduino/hardware/arduino/boards.txt
|
927
|
+
```
|
928
|
+
|
929
|
+
**Requirement:** *Optional*
|
930
|
+
|
931
|
+
----
|
932
|
+
|
933
|
+
### AVRDUDE_ARD_BAUDRATE
|
934
|
+
|
935
|
+
**Description:**
|
936
|
+
|
937
|
+
Upload speed
|
938
|
+
|
939
|
+
Usually can be auto-detected as `upload.speed` from `boards.txt`
|
940
|
+
|
941
|
+
**Example:**
|
942
|
+
|
943
|
+
```Makefile
|
944
|
+
AVRDUDE_ARD_BAUDRATE = 19200
|
945
|
+
```
|
946
|
+
|
947
|
+
**Requirement:** *Optional*
|
948
|
+
|
949
|
+
----
|
950
|
+
|
951
|
+
### AVRDUDE_ARD_PROGRAMMER
|
952
|
+
|
953
|
+
**Description:**
|
954
|
+
|
955
|
+
Upload protocol
|
956
|
+
|
957
|
+
Usually can be auto-detected as `upload.protocol` from `boards.txt`
|
958
|
+
|
959
|
+
**Example:**
|
960
|
+
|
961
|
+
```Makefile
|
962
|
+
AVRDUDE_ARD_PROGRAMMER = stk500v1
|
963
|
+
```
|
964
|
+
|
965
|
+
**Requirement:** *Optional*
|
966
|
+
|
967
|
+
----
|
968
|
+
|
969
|
+
### AVRDUDE_ISP_BAUDRATE
|
970
|
+
|
971
|
+
**Description:**
|
972
|
+
|
973
|
+
ISP speed if different to `upload.speed`
|
974
|
+
|
975
|
+
Defaults to same as `AVRDUDE_ARD_BAUDRATE` or `19200`
|
976
|
+
|
977
|
+
**Example:**
|
978
|
+
|
979
|
+
```Makefile
|
980
|
+
AVRDUDE_ISP_BAUDRATE = 19200
|
981
|
+
```
|
982
|
+
|
983
|
+
**Requirement:** *Optional*
|
984
|
+
|
985
|
+
----
|
986
|
+
|
987
|
+
### AVRDUDE_OPTS
|
988
|
+
|
989
|
+
**Description:**
|
990
|
+
|
991
|
+
Options to pass to `avrdude`.
|
992
|
+
|
993
|
+
Defaults to `-q -V -D` (quiet, don't verify, don't auto-erase). User values are not *ANDed* to the defaults, you have to set each option you require.
|
994
|
+
|
995
|
+
**Example:**
|
996
|
+
|
997
|
+
```Makefile
|
998
|
+
AVRDUDE_OPTS = -v
|
999
|
+
```
|
1000
|
+
|
1001
|
+
**Requirement:** *Optional*
|
1002
|
+
|
1003
|
+
----
|
1004
|
+
|
1005
|
+
## Bootloader variables
|
1006
|
+
|
1007
|
+
### BOOTLOADER_FILE
|
1008
|
+
|
1009
|
+
**Description:**
|
1010
|
+
|
1011
|
+
File for bootloader.
|
1012
|
+
|
1013
|
+
Usually can be auto-detected as `bootloader.file` from `boards.txt`
|
1014
|
+
|
1015
|
+
**Example:**
|
1016
|
+
|
1017
|
+
```Makefile
|
1018
|
+
BOOTLOADER_FILE = optiboot_atmega328.hex
|
1019
|
+
```
|
1020
|
+
|
1021
|
+
**Requirement:** *Optional*
|
1022
|
+
|
1023
|
+
----
|
1024
|
+
|
1025
|
+
### BOOTLOADER_PATH
|
1026
|
+
|
1027
|
+
**Description:**
|
1028
|
+
|
1029
|
+
Relative path to bootloader directory.
|
1030
|
+
|
1031
|
+
Usually can be auto-detected as a relative `bootloader.path` from `boards.txt`
|
1032
|
+
|
1033
|
+
**Example:**
|
1034
|
+
|
1035
|
+
```Makefile
|
1036
|
+
BOOTLOADER_PATH = optiboot
|
1037
|
+
# or
|
1038
|
+
BOOTLOADER_PATH = arduino:atmega
|
1039
|
+
```
|
1040
|
+
|
1041
|
+
**Requirement:** *Optional*
|
1042
|
+
|
1043
|
+
----
|
1044
|
+
|
1045
|
+
### BOOTLOADER_PARENT
|
1046
|
+
|
1047
|
+
**Description:**
|
1048
|
+
|
1049
|
+
Absolute path to bootloader file's parent directory.
|
1050
|
+
|
1051
|
+
Defaults to `/usr/share/arduino/hardware/arduino/bootloaders` (Linux)
|
1052
|
+
|
1053
|
+
**Example:**
|
1054
|
+
|
1055
|
+
```Makefile
|
1056
|
+
BOOTLOADER_PARENT = ~/sketchbook/hardware/promicro/bootloaders
|
1057
|
+
BOOTLOADER_PATH = caterina
|
1058
|
+
BOOTLOADER_FILE = Caterina-promicro16.hex
|
1059
|
+
```
|
1060
|
+
|
1061
|
+
Would result in an absolute path to the bootloader hex file of `~/sketchbook/hardware/promicro/bootloaders/caterina/Caterina-promicro16.hex`
|
1062
|
+
|
1063
|
+
**Requirement:** *Optional, unless BOOTLOADER_FILE and/or BOOTLOADER_PATH are user-defined*
|
1064
|
+
|
1065
|
+
----
|
1066
|
+
|
1067
|
+
## ChipKIT variables
|
1068
|
+
|
1069
|
+
### MPIDE_DIR
|
1070
|
+
|
1071
|
+
**Description:**
|
1072
|
+
|
1073
|
+
Path to chipKIT MP IDE
|
1074
|
+
|
1075
|
+
Usually can be auto-detected as `AUTO_MPIDE_DIR` from the defaults `/usr/share/mpide` (Linux) or `/Applications/Mpide.app/Contents/Resources/Java` (OSX)
|
1076
|
+
|
1077
|
+
**Example:**
|
1078
|
+
|
1079
|
+
```Makefile
|
1080
|
+
MPIDE_DIR = ~/mpide
|
1081
|
+
```
|
1082
|
+
|
1083
|
+
**Requirement:** *Optional*
|
1084
|
+
|
1085
|
+
----
|
1086
|
+
|
1087
|
+
### MPIDE_PREFERENCES_PATH
|
1088
|
+
|
1089
|
+
**Description:**
|
1090
|
+
|
1091
|
+
Path to chipKIT `preferences.txt` file.
|
1092
|
+
|
1093
|
+
Usually can be auto-detected as `AUTO_MPIDE_PREFERENCES_PATH` from the defaults `~/.mpide/preferences.txt` (Linux) or `~/Library/Mpide/preferences.txt` (OSX)
|
1094
|
+
|
1095
|
+
**Example:**
|
1096
|
+
|
1097
|
+
```Makefile
|
1098
|
+
MPIDE_PREFERENCES_PATH = ~/chipkit/preferences.txt
|
1099
|
+
```
|
1100
|
+
|
1101
|
+
**Requirement:** *Optional*
|