d84cc9860c0416ce06795997253d1e1f53dc1148
[pub/USBasp.git] / LUFA / Build / DMBS / DMBS / atprogram.md
1 DMBS - Dean's Makefile Build System
2 ===================================
3
4
5 Module: ATPROGRAM
6 -----------------
7
8 The ATPROGRAM module provides build targets for use with the official
9 `ATPROGRAM` back-end utility distributed with the free
10 [Atmel Studio](http://www.atmel.com) software released by Atmel.
11
12 ## Importing This Module into a Makefile:
13
14 To use this module in your application makefile, add the following code to your
15 makefile:
16
17 include $(DMBS_PATH)/atprogram.mk
18
19 ## Prerequisites:
20
21 This module requires the `atprogram.exe` utility to be available in your
22 system's `PATH` variable. The `atprogram.exe` utility is distributed in Atmel
23 Studio (usually) inside the application install folder's `atbackend`
24 subdirectory.
25
26 ## Build Targets:
27
28 The following targets are supported by this module:
29
30 <table>
31 <tbody>
32 <tr>
33 <td>atprogram</td>
34 <td>Program the device FLASH memory with the application's executable data.</td>
35 </tr>
36 <tr>
37 <td>atprogram-ee</td>
38 <td>Program the device EEPROM memory with the application's EEPROM data.</td>
39 </tr>
40 </tbody>
41 </table>
42
43 ## Mandatory Variables:
44
45 The following variables must be defined (with a `NAME = VALUE` syntax, one
46 variable per line) in the user makefile to be able to use this module:
47
48 <table>
49 <tbody>
50 <tr>
51 <td>MCU</td>
52 <td>Name of the Atmel processor model (e.g. `at90usb1287`).</td>
53 </tr>
54 <tr>
55 <td>TARGET</td>
56 <td>Name of the application output file prefix (e.g. `TestApplication`).</td>
57 </tr>
58 </tbody>
59 </table>
60
61 ## Optional Variables:
62
63 The following variables may be defined (with a `NAME = VALUE` syntax, one
64 variable per line) in the user makefile. If not specified, a default value will
65 be assumed.
66
67 <table>
68 <tbody>
69 <tr>
70 <td>ATPROGRAM_PROGRAMMER</td>
71 <td>Name of the Atmel programmer or debugger tool to communicate with (e.g. `jtagice3`). Default is `atmelice`.</td>
72 </tr>
73 <tr>
74 <td>ATPROGRAM_INTERFACE</td>
75 <td>Name of the programming interface to use when programming the target (e.g. `spi`). Default is `jtag`.</td>
76 </tr>
77 <tr>
78 <td>ATPROGRAM_PORT</td>
79 <td>Name of the communication port to use when when programming with a serially connected tool (e.g. `COM2`). Default is `usb`.</td>
80 </tr>
81 </tbody>
82 </table>
83
84 ## Provided Variables:
85
86 The following variables may be referenced in a user makefile (via `$(NAME)`
87 syntax) if desired, as they are provided by this module.
88
89 <table>
90 <tbody>
91 <tr>
92 <td>N/A</td>
93 <td>This module provides no variables.</td>
94 </tr>
95 </tbody>
96 </table>
97
98 ## Provided Macros:
99
100 The following macros may be referenced in a user makefile (via
101 `$(call NAME, ARG1, ARG2, ...)` syntax) if desired, as they are provided by
102 this module.
103
104 <table>
105 <tbody>
106 <tr>
107 <td>N/A</td>
108 <td>This module provides no macros.</td>
109 </tr>
110 </tbody>
111 </table>