1 DMBS - Dean's Makefile Build System
2 ===================================
8 The AVRDUDE module provides build targets for use with the official
9 open source `AVRDUDE` programmer utility, for the reprogramming of Atmel devices
10 using a wide variety of official and non-official programming devices and
13 ## Importing This Module into a Makefile:
15 To use this module in your application makefile, add the following code to your
18 include $(DMBS_PATH)/avrdude.mk
22 This module requires the `avrdude` utility to be available in your
23 system's `PATH` variable. The `avrdude` utility is distributed on the project's
24 [official site](https://savannah.nongnu.org/projects/avrdude) but is also
25 made available in many *nix operating system's package managers.
29 The following targets are supported by this module:
34 <td>avrdude-lfuse</td>
35 <td>Program the device low fuse. Requires AVRDUDE_LFUSE variable set.</td>
38 <td>avrdude-hfuse</td>
39 <td>Program the device high fuse. Requires AVRDUDE_HFUSE variable set.</td>
42 <td>avrdude-efuse</td>
43 <td>Program the device extended fuse. Requires AVRDUDE_EFUSE variable set.</td>
47 <td>Program the device lock bits. Requires AVRDUDE_LOCK variable set.</td>
50 <td>avrdude-fuses</td>
52 Program the device fuses (lfuse, hfuse, efuse, lock bits).<br>
53 Requires AVRDUDE_LFUSE, AVRDUDE_HFUSE and AVRDUDE_LOCK variable set. AVRDUDE_EFUSE is optional.
58 <td>Program the device FLASH memory with the application's executable data.</td>
62 <td>Program the device EEPROM memory with the application's EEPROM data.</td>
66 <td>Same as avrdude + avrdude-fuses.</td>
69 <td>avrdude-all-ee</td>
70 <td>Same as avrdude + avrdude-ee + avrdude-fuses.</td>
75 ## Mandatory Variables:
77 The following variables must be defined (with a `NAME = VALUE` syntax, one
78 variable per line) in the user makefile to be able to use this module:
84 <td>Name of the Atmel processor model (e.g. `at90usb1287`).</td>
88 <td>Name of the application output file prefix (e.g. `TestApplication`).</td>
93 ## Optional Variables:
95 The following variables may be defined (with a `NAME = VALUE` syntax, one
96 variable per line) in the user makefile. If not specified, a default value will
103 <td>Override the `MCU` variable for `avrdude`. On some controllers, `avrdude` expects another spelling than the compiler needs. Default is `MCU`.</td>
106 <td>AVRDUDE_PROGRAMMER</td>
107 <td>Name of the programmer/debugger tool or bootloader to communicate with (e.g. `jtagicemkii`). Default is `jtagicemkii`.</td>
110 <td>AVRDUDE_PORT</td>
111 <td>Name of the communication port to use when when programming with a serially connected tool (e.g. `COM2`). Default is `usb`.</td>
114 <td>AVRDUDE_FLAGS</td>
115 <td>Additional flags to pass to `avrdude` when invoking the tool. Default is empty (no additional flags).</td>
118 <td>AVRDUDE_MEMORY</td>
119 <td>Memory space to program when executing the `avrdude` target (e.g. 'application` for an XMEGA device). Default is `flash`.</td>
122 <td>AVRDUDE_BAUD</td>
123 <td>Baud rate to use when executing the `avrdude` target (e.g. '115200` for an Optiboot device). Default is empty.</td>
126 <td>AVRDUDE_BITCLK</td>
127 <td>ISP bit clock period in microseconds to use when executing the `avrdude` target (format: float). Must be minimum 4x longer than MCU clock period. Default is 1 us.</td>
130 <td>AVRDUDE_HFUSE</td>
131 <td>Fuse setting to use when executing the `avrdude-hfuse` target (format: 0x??). Default is empty.</td>
134 <td>AVRDUDE_EFUSE</td>
135 <td>Fuse setting to use when executing the `avrdude-efuse` target (format: 0x??). Default is empty.</td>
138 <td>AVRDUDE_LFUSE</td>
139 <td>Fuse setting to use when executing the `avrdude-lfuse` target (format: 0x??). Default is empty.</td>
142 <td>AVRDUDE_LOCK</td>
143 <td>Bit bits setting to use when executing the `avrdude-lock` target (format: 0x??). Default is empty.</td>
148 ## Provided Variables:
150 The following variables may be referenced in a user makefile (via `$(NAME)`
151 syntax) if desired, as they are provided by this module.
157 <td>This module provides no variables.</td>
164 The following macros may be referenced in a user makefile (via
165 `$(call NAME, ARG1, ARG2, ...)` syntax) if desired, as they are provided by
172 <td>This module provides no macros.</td>
179 The changes to this module since its initial release are listed below, as of the
180 DMBS version where the change was made.
183 Made `AVRDUDE_EFUSE` optional for `avrdude-fuses` because not every AVR has this fuse.
186 Added `AVRDUDE_BAUD`, `AVRDUDE_HFUSE`, `AVRDUDE_EFUSE`, `AVRDUDE_LFUSE` and
187 `AVRDUDE_LOCK` optional variables.