You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+57-19Lines changed: 57 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -1,32 +1,37 @@
1
1
# A Makefile for Arduino Sketches
2
2
3
-
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.
3
+
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.
4
4
5
-
If you're using FreeBSD, Debian or Ubuntu, you can find this in the `arduino-mk` package.
5
+
## Features
6
6
7
-
## Usage
7
+
- Very robust
8
+
- Supports all official AVR-based Arduino boards
9
+
- Supports chipKIT
10
+
- Works on all three major OS (Mac, Linux, Windows)
11
+
- Auto detects serial baud rate and libraries used
12
+
- Support for `*.ino` and `*.pde` sketches as well as raw `*.c` and `*.cpp`
13
+
- Support for Arduino Software versions 1.0.x as well as 0.x.
14
+
Support for Arduino 1.5.x is still work in progress
15
+
- Automatic dependency tracking. Referred libraries are automatically included
16
+
in the build process. Changes in `*.h` files lead to recompilation of sources which include them
8
17
9
-
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
18
+
## Installation
10
19
11
-
Download a copy of this repo some where in your system.
20
+
### Through package
12
21
13
-
On the Mac you might want to set:
22
+
If you're using FreeBSD, Debian or Ubuntu, you can find this in the `arduino-mk`
23
+
package and can be installed using `apt-get` or `aptitude`.
On Linux, you shouldn't need to set anything other than your board type and port:
27
+
- Download the latest release
28
+
- Or clone it from Github using the command `git clone [email protected]:sudar/Arduino-Makefile.git`
29
+
- Check the [usage section](https://github.com/sudar/Arduino-Makefile#usage) in this readme about setting usage options
20
30
21
-
BOARD_TAG = mega2560
22
-
MONITOR_PORT = /dev/ttyACM0
31
+
## Requirements
23
32
24
-
-`BOARD_TAG` - Type of board, for a list see boards.txt or `make show_boards`
25
-
-`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.
26
-
-`ARDUINO_DIR` - Path to Arduino installation. In Cygwin in Windows this path must be
27
-
relative, not absolute (e.g. "../../arduino" and not "/c/cygwin/Arduino").
28
-
-`ARDMK_DIR` - Path where the `*.mk` are present. If you installed the package, then it is usually `/usr/share/arduino`
29
-
-`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.
33
+
You need to have the Arduino IDE. You can either install it through the
34
+
installer or download the distribution zip file and extract it.
30
35
31
36
The Makefile also delegates resetting the board to a short Perl program.
32
37
You'll need to install `Device::SerialPort` to use it though.
@@ -45,14 +50,47 @@ On openSUSE:
45
50
46
51
On Mac using MacPorts:
47
52
48
-
sudo port install p5-device-serialport
53
+
sudo port install p5-device-serialport
49
54
50
55
and use /opt/local/bin/perl5 instead of /usr/bin/perl
51
56
52
57
On other systems:
53
58
54
59
cpan Device::SerialPort
55
60
61
+
## Usage
62
+
63
+
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
64
+
65
+
Download a copy of this repo some where in your system or install it through a package.
On Linux (if you have installed through package), you shouldn't need to set anything other than your board type and port:
76
+
77
+
BOARD_TAG = mega2560
78
+
MONITOR_PORT = /dev/ttyACM0
79
+
80
+
On Windows (using cygwin), you might want to set:
81
+
82
+
ARDUINO_DIR = ../../arduino
83
+
ARDMK_DIR = path/to/mkfile
84
+
MONITOR_PORT = com3
85
+
BOARD_TAG = mega2560
86
+
87
+
-`BOARD_TAG` - Type of board, for a list see boards.txt or `make show_boards`
88
+
-`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.
89
+
-`ARDUINO_DIR` - Path to Arduino installation. In Cygwin in Windows this path must be
90
+
relative, not absolute (e.g. "../../arduino" and not "/c/cygwin/Arduino").
91
+
-`ARDMK_DIR` - Path where the `*.mk` are present. If you installed the package, then it is usually `/usr/share/arduino`
92
+
-`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.
93
+
56
94
## Including Libraries
57
95
58
96
You can specify space separated list of libraries that are needed for your sketch to the variable `ARDUINO_LIBS`.
0 commit comments