PrinterBootloader: Don't store 32-bit HEX parser flash offsets on small flash devices.
[pub/USBasp.git] / LUFA / Build / DMBS / DMBS / avrdude.md
1 DMBS - Dean's Makefile Build System
2 ===================================
3
4
5 Module: AVRDUDE
6 -----------------
7
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
11 bootloaders.
12
13 ## Importing This Module into a Makefile:
14
15 To use this module in your application makefile, add the following code to your
16 makefile:
17
18 include $(DMBS_PATH)/avrdude.mk
19
20 ## Prerequisites:
21
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.
26
27 ## Build Targets:
28
29 The following targets are supported by this module:
30
31 <table>
32 <tbody>
33 <tr>
34 <td>avrdude-lfuse</td>
35 <td>Program the device low fuse. Requires AVRDUDE_LFUSE variable set.</td>
36 </tr>
37 <tr>
38 <td>avrdude-hfuse</td>
39 <td>Program the device high fuse. Requires AVRDUDE_HFUSE variable set.</td>
40 </tr>
41 <tr>
42 <td>avrdude-efuse</td>
43 <td>Program the device extended fuse. Requires AVRDUDE_EFUSE variable set.</td>
44 </tr>
45 <tr>
46 <td>avrdude-lock</td>
47 <td>Program the device lock bits. Requires AVRDUDE_LOCK variable set.</td>
48 </tr>
49 <tr>
50 <td>avrdude-fuses</td>
51 <td>Program the device fuses (lfuse, hfuse, efuse, lock bits).</td>
52 </tr>
53 <tr>
54 <td>avrdude</td>
55 <td>Program the device FLASH memory with the application's executable data.</td>
56 </tr>
57 <tr>
58 <td>avrdude-ee</td>
59 <td>Program the device EEPROM memory with the application's EEPROM data.</td>
60 </tr>
61 <tr>
62 <td>avrdude-all</td>
63 <td>Same as avrdude + avrdude-fuses.</td>
64 </tr>
65 <tr>
66 <td>avrdude-all-ee</td>
67 <td>Same as avrdude + avrdude-ee + avrdude-fuses.</td>
68 </tr>
69 </tbody>
70 </table>
71
72 ## Mandatory Variables:
73
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:
76
77 <table>
78 <tbody>
79 <tr>
80 <td>MCU</td>
81 <td>Name of the Atmel processor model (e.g. `at90usb1287`).</td>
82 </tr>
83 <tr>
84 <td>TARGET</td>
85 <td>Name of the application output file prefix (e.g. `TestApplication`).</td>
86 </tr>
87 </tbody>
88 </table>
89
90 ## Optional Variables:
91
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
94 be assumed.
95
96 <table>
97 <tbody>
98 <tr>
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>
101 </tr>
102 <tr>
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>
105 </tr>
106 <tr>
107 <td>AVRDUDE_FLAGS</td>
108 <td>Additional flags to pass to `avrdude` when invoking the tool. Default is empty (no additional flags).</td>
109 </tr>
110 <tr>
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>
113 </tr>
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>
116 </tr>
117 </tr>
118 <td>AVRDUDE_HFUSE</td>
119 <td>Fuse setting to use when executing the `avrdude-hfuse` target (format: 0x??). Default is empty.</td>
120 </tr>
121 </tr>
122 <td>AVRDUDE_EFUSE</td>
123 <td>Fuse setting to use when executing the `avrdude-efuse` target (format: 0x??). Default is empty.</td>
124 </tr>
125 </tr>
126 <td>AVRDUDE_LFUSE</td>
127 <td>Fuse setting to use when executing the `avrdude-lfuse` target (format: 0x??). Default is empty.</td>
128 </tr>
129 </tr>
130 <td>AVRDUDE_LOCK</td>
131 <td>Bit bits setting to use when executing the `avrdude-lock` target (format: 0x??). Default is empty.</td>
132 </tr>
133 </tbody>
134 </table>
135
136 ## Provided Variables:
137
138 The following variables may be referenced in a user makefile (via `$(NAME)`
139 syntax) if desired, as they are provided by this module.
140
141 <table>
142 <tbody>
143 <tr>
144 <td>N/A</td>
145 <td>This module provides no variables.</td>
146 </tr>
147 </tbody>
148 </table>
149
150 ## Provided Macros:
151
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
154 this module.
155
156 <table>
157 <tbody>
158 <tr>
159 <td>N/A</td>
160 <td>This module provides no macros.</td>
161 </tr>
162 </tbody>
163 </table>
164
165 ## Module Changelog:
166
167 The changes to this module since its initial release are listed below, as of the
168 DMBS version where the change was made.
169
170 ### 20160403
171 Initial release.