USBaspLoader v0.97 stable release
[pub/USBaspLoader.git] / Readme.txt
1 This is the README file for USBaspLoader.
2
3 USBaspLoader is a USB boot loader for AVR microcontrollers. It can be used on
4 most AVRs with at least 2 kB of boot loader section, e.g. the popular ATMega8.
5 The firmware is flashed into the bootloader-section of the flash memory and
6 takes control immediately after reset. If a certain hardware condition is met
7 (this condition can be configured, e.g. a jumper), the boot loader waits for
8 data on the USB interface and loads it into the remaining part of the flash
9 memory. If the condition is not met, control is passed to the loaded firmware.
10
11 This boot loader is similar to Thomas Fischl's avrusbboot and our own
12 bootloadHID, but it requires no separate command line tool to upload the data.
13 USBaspLoader emulates Thomas Fischl's USBasp programmer instead. You can thus
14 use AVRDUDE to upload flash memory data (and if the option is enabled) EEPROM
15 data.
16
17 Since USBaspLoader cooperates with AVRDUDE, it can be used in conjunction with
18 the Arduino software to upload flash memory data.
19
20
21 FILES IN THE DISTRIBUTION
22 =========================
23 Readme.txt ........ The file you are currently reading.
24 firmware .......... Source code of the controller firmware.
25 firmware/usbdrv ... USB driver -- See Readme.txt in that directory for info
26 updater ........... Source code of an updater-firmware exchanging bootloaders
27 License.txt ....... Public license (GPL2) for all contents of this project.
28 Schematics.txt .... File giving infos about default and recommended hw-layout.
29
30 *_usbasploader.hex precompiled USBaspLoader for default layout and settings
31
32
33 BUILDING AND INSTALLING
34 =======================
35 This project can be built on Unix (Linux, FreeBSD or Mac OS X) or Windows.
36
37 For all platforms, you must first describe your hardware and layout
38 specific parameters (PINs to use, etc...) in "firmware/bootloaderconfig.h".
39 Some USB tuning is possible by modifying "firmware/usbconfig.h".
40 All files provide working default settings, which can be used as an example.
41 Then edit "Makefile.inc" (NEVER any Makefile directly!) to reflect
42 the target device, and some feature set departing from the default one.
43 (You also can edit "firmware/bootloaderconfig.h" to change feature set
44 and therefore memory space requirements).
45 Since now "Makefile.inc" has an automatic selection logic based on
46 the type of the microcontroller, there is NO need for setting bootloader-
47 addresses, lock- or fusebits anymore...
48
49 Building on Windows:
50 You need WinAVR for the firmware, see http://winavr.sourceforge.net/.
51 To build the firmware with WinAVR, change into the "USBaspLoader" directory,
52 check whether you need to edit the files mentioned above (e.g. change device
53 settings, programmer hardware, clock rate etc.) and type "make" to compile
54 the complete source code.
55 After you upload the code to the device with "make flash", you should set
56 the fuses with "make fuse".
57
58 If you already have some working USBaspLoader on your controller, you can
59 use "make update" to flash the "updater"-firmware to it.
60 After starting this firmware on the microcontroller it will replace the
61 old bootloader with the new one just compiled.
62 The update-feature can be used on boards, where HVPP or ISP is not possible
63 after production anymore. (Or you just want to save trouble laying out ISP.)
64 Therefore you also could implement the "HAVE_SPMINTEREFACE_MAGICVALUE"-
65 feature, protecting your board from wrong updates for other boards.
66
67 At default configuration the bootloader protects itself from overwriting
68 itself. In order to sustain the new update-capability, no lock bits
69 ("make lock") should be programmed after uploading the firmware and
70 programming the fuse bits.
71
72
73 Building on Unix (Linux, FreeBSD and Mac):
74 You need the GNU toolchain and avr-libc for the firmware. See
75 http://www.nongnu.org/avr-libc/user-manual/install_tools.html
76 for a good description on how to install the GNU compiler toolchain and
77 avr-libc on Unix. For Mac OS X, we provide a read-made package, see
78 http://www.obdev.at/avrmacpack/
79
80 To build the firmware, change to the "USBaspLoader" directory, edit the
81 files mentioned above if you need to change settings (as also described in
82 the Windows paragraph above) and type "make" to compile the source code.
83 After you upload the code to the device with "make flash", you should
84 set the fuses with "make fuse".
85 As described within the Windows paragraph, "make update" can also
86 be used instead.
87
88 WORKING WITH THE BOOT LOADER
89 ============================
90 The boot loader is quite easy to use. Set the jumper (or whatever condition
91 you have configured) for boot loading on the target hardware, connect it to
92 the host computer and (if not bus powered) issue a Reset on the AVR.
93
94 You can now flash the device with AVRDUDE through a "virtual" USBasp
95 programmer.
96
97
98 ABOUT THE LICENSE
99 =================
100 It is our intention to make our USB driver and this demo application
101 available to everyone. Moreover, we want to make a broad range of USB
102 projects and ideas for USB devices available to the general public. We
103 therefore want that all projects built with our USB driver are published
104 under an Open Source license. Our license for the USB driver and demo code is
105 the GNU General Public License Version 2 (GPL2). See the file "License.txt"
106 for details.
107
108 If you don't want to publish your source code under the GPL2, you can simply
109 pay money for AVR-USB. As an additional benefit you get USB PIDs for free,
110 licensed exclusively to you. See the file "CommercialLicense.txt" in the usbdrv
111 directory for details.
112
113
114 MORE INFORMATION
115 ================
116 For questions, reports, suggestions or just for fun please contact
117 Stephan Baerwolf (matrixstorm@gmx.de) and/or visit demonstration-board
118 for USBaspLoader at
119
120 http://matrixstorm.com/avr/tinyusbboard/
121
122
123 For more information about Objective Development's firmware-only USB driver
124 for Atmel's AVR microcontrollers please visit the URL
125
126 http://www.obdev.at/products/avrusb/
127
128 A technical documentation of the driver's interface can be found in the
129 file "firmware/usbdrv/usbdrv.h".
130
131
132 --
133 recent version:
134 (c) 2013 by Stephan Baerwolf
135 matrixstorm@gmx.de
136
137 initial version:
138 (c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH.
139 http://www.obdev.at/