1 This is the README file for USBaspLoader.
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.
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
17 Since USBaspLoader cooperates with AVRDUDE, it can be used in conjunction with
18 the Arduino software to upload flash memory data.
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 License.txt ....... Public license (GPL2) for all contents of this project.
28 Schematics.txt .... File giving infos about default and recommended hw-layout.
31 BUILDING AND INSTALLING
32 =======================
33 This project can be built on Unix (Linux, FreeBSD or Mac OS X) or Windows.
35 For all platforms, you must first describe your hardware and layout
36 specific parameters (PINs to use, etc...) in "firmware/bootloaderconfig.h".
37 Some USB tuning is possible by modifying "firmware/usbconfig.h".
38 All files provide working default settings, which can be used as an example.
39 Then edit "firmware/Makefile.inc" (NOT Makefile directly!) to reflect
40 the target device, and some feature set departing from the default one.
41 (You also can edit "firmware/bootloaderconfig.h" to change feature set
42 and therefore memory space requirements).
43 Since now "Makefile.inc" has an automatic selection logic based on
44 the type of the microcontroller, there is NO need for setting bootloader-
45 addresses, lock- or fusebits anymore...
48 You need WinAVR for the firmware, see http://winavr.sourceforge.net/.
49 To build the firmware with WinAVR, change into the "USBaspLoader" directory,
50 check whether you need to edit the files mentioned above (e.g. change device
51 settings, programmer hardware, clock rate etc.) and type "make" to compile
52 the complete source code.
53 After you upload the code to the device with "make flash", you should set
54 the fuses with "make fuse".
56 If you already have some working USBaspLoader on your controller, you can
57 use "make update" to flash the "updater"-firmware to it.
58 After starting this firmware on the microcontroller it will replace the
59 old bootloader with the new one just compiled.
60 The update-feature can be used on boards, where HVPP or ISP is not possible
61 after production anymore. (Or you just want to save trouble laying out ISP.)
62 Therefore you also could implement the "HAVE_SPMINTEREFACE_MAGICVALUE"-
63 feature, protecting your board from wrong updates for other boards.
65 At default configuration the bootloader protects itself from overwriting
66 itself. In order to sustain the new update-capability, no lock bits
67 ("make lock") should be programmed after uploading the firmware and
68 programming the fuse bits.
71 Building on Unix (Linux, FreeBSD and Mac):
72 You need the GNU toolchain and avr-libc for the firmware. See
73 http://www.nongnu.org/avr-libc/user-manual/install_tools.html
74 for a good description on how to install the GNU compiler toolchain and
75 avr-libc on Unix. For Mac OS X, we provide a read-made package, see
76 http://www.obdev.at/avrmacpack/
78 To build the firmware, change to the "USBaspLoader" directory, edit the
79 files mentioned above if you need to change settings (as also described in
80 the Windows paragraph above) and type "make" to compile the source code.
81 After you upload the code to the device with "make flash", you should
82 set the fuses with "make fuse".
83 As described within the Windows paragraph, "make update" can also
86 WORKING WITH THE BOOT LOADER
87 ============================
88 The boot loader is quite easy to use. Set the jumper (or whatever condition
89 you have configured) for boot loading on the target hardware, connect it to
90 the host computer and (if not bus powered) issue a Reset on the AVR.
92 You can now flash the device with AVRDUDE through a "virtual" USBasp
98 It is our intention to make our USB driver and this demo application
99 available to everyone. Moreover, we want to make a broad range of USB
100 projects and ideas for USB devices available to the general public. We
101 therefore want that all projects built with our USB driver are published
102 under an Open Source license. Our license for the USB driver and demo code is
103 the GNU General Public License Version 2 (GPL2). See the file "License.txt"
106 If you don't want to publish your source code under the GPL2, you can simply
107 pay money for AVR-USB. As an additional benefit you get USB PIDs for free,
108 licensed exclusively to you. See the file "CommercialLicense.txt" in the usbdrv
109 directory for details.
114 For questions, reports, suggestions or just for fun please contact
115 Stephan Baerwolf (matrixstorm@gmx.de) and/or visit demonstration-board
118 http://matrixstorm.com/avr/tinyusbboard/
121 For more information about Objective Development's firmware-only USB driver
122 for Atmel's AVR microcontrollers please visit the URL
124 http://www.obdev.at/products/avrusb/
126 A technical documentation of the driver's interface can be found in the
127 file "firmware/usbdrv/usbdrv.h".
132 (c) 2013 by Stephan Baerwolf
136 (c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH.