@@ -9,14 +9,14 @@ programming instruction to the AVR chip regardless of whether AVRDUDE
99implements that specific feature of a particular chip.
1010
1111AVRDUDE was originally written in 2003 by Brian S. Dean. Since 2006, AVRDUDE has been maintained by Jörg Wunsch,
12- with the help of [ various contributors] ( https://github.com/avrdudes/avrdude/graphs/contributors ) .
12+ with the help of [ various contributors] ( ./AUTHORS ) .
1313
1414The latest version of AVRDUDE is always available here:\
1515< https://github.com/avrdudes/avrdude >
1616
1717## Getting AVRDUDE for Windows
1818
19- To get AVRDUDE for Windows, install the latest version from the [ Releases] ( . /releases) page:
19+ To get AVRDUDE for Windows, install the latest version from the [ Releases] ( http://download.savannah.gnu.org /releases/avrdude/ ) page.
2020
2121Alternatively, you may [ build AVRDUDE] ( #building-avrdude-for-windows ) yourself from source.
2222
@@ -30,6 +30,12 @@ sudo apt-get install avrdude
3030
3131Alternatively, you may [ build AVRDUDE] ( #building-avrdude-for-linux ) yourself from source.
3232
33+ ## Getting AVRDUDE for MacOS
34+
35+ On MacOS, AVRDUDE can be installed through Mac Ports.
36+
37+ Alternatively, you may [ build AVRDUDE] ( #building-avrdude-for-macos ) yourself from source.
38+
3339## Using AVRDUDE
3440
3541AVRDUDE is a command-line application. Run the command ` avrdude ` without any arguments for a list of options.
@@ -50,6 +56,59 @@ avrdude -c arduino -P COM1 -b 115200 -p atmega328p -D -U flash:w:objs/blink.hex:
5056There are many different programmers and options that may be required for the programming to succeed.
5157For more information, refer to the [ AVRDUDE documentation] ( #todo ) .
5258
59+ ## General build instructions
60+
61+ ### Prerequisites
62+
63+ Depending on your requirements, the following prerequisites are
64+ needed:
65+
66+ * libelf including header files (for directly reading ELF files)
67+ * libusb 0.1 or 1.0 (or compatible), including header files
68+ * libftdi or libftdi1 (for direct access to FTDI devices)
69+ * libhidapi or libhid (for access to recent Atmel/Microchip dongles)
70+
71+ ### Building
72+
73+ All source code is located in the ` src/ ` subdirectory. Thus all
74+ instructions are relative to that directory.
75+
76+ Source-code releases contain an up-to-date configure script that
77+ can be run to generate the required Makefiles:
78+
79+ ``` console
80+ cd src && ./configure && make && sudo make install
81+ ```
82+ At the end of the configure script, a configuration summary is issued,
83+ like this:
84+
85+ ``` console
86+ Configuration summary:
87+ ----------------------
88+ DO HAVE libelf
89+ DO HAVE libusb
90+ DO HAVE libusb_1_0
91+ DO HAVE libftdi1
92+ DON'T HAVE libftdi
93+ DON'T HAVE libhid
94+ DO HAVE libhidapi
95+ DO HAVE pthread
96+ DISABLED doc
97+ DISABLED parport
98+ DISABLED linuxgpio
99+ DISABLED linuxspi
100+ ```
101+
102+ Make sure all the features you are interested in have been found.
103+
104+ Building the development source tree might possibly require to
105+ re-generate the configure script using the autoconf/automake
106+ tools. This can be done using the ` bootstrap ` script:
107+
108+ ``` console
109+ cd src && ./bootstrap
110+ ```
111+
53112## Building AVRDUDE for Windows
54113
55114### Windows Prerequisites
@@ -95,6 +154,36 @@ cd doc
95154make all
96155```
97156
157+ ## Building AVRDUDE for MacOS
158+
159+ ### Prerequisites
160+
161+ The following things are needed to build AVRDUDE on MacOS:
162+
163+ * a C compiler; either full XCode, or the XCode Command Line tools
164+ * autoconf, automake, libtool, hidapi, libftdi1, libusb, libelf;
165+ they can be installed e.g. from Mac Ports using
166+ ``` console
167+ port install autoconf automake \
168+ libtool hidapi libftdi1 libusb libelf
169+ ```
170+
171+ ### Compilation
172+
173+ Depending on the location of the prerequisites, the ` CPPFLAGS ` and
174+ ` LDFLAGS ` variables need to be set accordingly. Mac Ports installs
175+ everything under ` /opt/local ` , so use
176+
177+ ``` console
178+ ./configure CPPFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib
179+ ```
180+
181+ MacOS Brew requires
182+
183+ ``` console
184+ ./configure CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/Cellar
185+ ```
186+
98187## License
99188
100189AVRDUDE is licensed under the [ GNU GPLv2] ( ./COPYING ) .
0 commit comments