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>
51 <td>Program the device fuses (lfuse, hfuse, efuse, lock bits).</td>
55 <td>Program the device FLASH memory with the application's executable data.</td>
59 <td>Program the device EEPROM memory with the application's EEPROM data.</td>
63 <td>Same as avrdude + avrdude-fuses.</td>
66 <td>avrdude-all-ee</td>
67 <td>Same as avrdude + avrdude-ee + avrdude-fuses.</td>
72 ## Mandatory Variables:
74 The following variables must be defined (with a `NAME = VALUE` syntax, one
75 variable per line) in the user makefile to be able to use this module:
81 <td>Name of the Atmel processor model (e.g. `at90usb1287`).</td>
85 <td>Name of the application output file prefix (e.g. `TestApplication`).</td>
90 ## Optional Variables:
92 The following variables may be defined (with a `NAME = VALUE` syntax, one
93 variable per line) in the user makefile. If not specified, a default value will
99 <td>AVRDUDE_PROGRAMMER</td>
100 <td>Name of the programmer/debugger tool or bootloader to communicate with (e.g. `jtagicemkii`). Default is `jtagicemkii`.</td>
103 <td>AVRDUDE_PORT</td>
104 <td>Name of the communication port to use when when programming with a serially connected tool (e.g. `COM2`). Default is `usb`.</td>
107 <td>AVRDUDE_FLAGS</td>
108 <td>Additional flags to pass to `avrdude` when invoking the tool. Default is empty (no additional flags).</td>
111 <td>AVRDUDE_MEMORY</td>
112 <td>Memory space to program when executing the `avrdude` target (e.g. 'application` for an XMEGA device). Default is `flash`.</td>
114 <td>AVRDUDE_BAUD</td>
115 <td>Baud rate to use when executing the `avrdude` target (e.g. '115200` for an Optiboot device). Default is empty.</td>
118 <td>AVRDUDE_HFUSE</td>
119 <td>Fuse setting to use when executing the `avrdude-hfuse` target (format: 0x??). Default is empty.</td>
122 <td>AVRDUDE_EFUSE</td>
123 <td>Fuse setting to use when executing the `avrdude-efuse` target (format: 0x??). Default is empty.</td>
126 <td>AVRDUDE_LFUSE</td>
127 <td>Fuse setting to use when executing the `avrdude-lfuse` target (format: 0x??). Default is empty.</td>
130 <td>AVRDUDE_LOCK</td>
131 <td>Bit bits setting to use when executing the `avrdude-lock` target (format: 0x??). Default is empty.</td>
136 ## Provided Variables:
138 The following variables may be referenced in a user makefile (via `$(NAME)`
139 syntax) if desired, as they are provided by this module.
145 <td>This module provides no variables.</td>
152 The following macros may be referenced in a user makefile (via
153 `$(call NAME, ARG1, ARG2, ...)` syntax) if desired, as they are provided by
160 <td>This module provides no macros.</td>
167 The changes to this module since its initial release are listed below, as of the
168 DMBS version where the change was made.