AVRUSBBoot – USB bootloader for Atmel AVR [616954]

AVRUSBBoot – USB bootloader for Atmel AVR
controllers
Thomas Fischl
July 11, 2016
Abstract
AVRUSBBoot is a bootloader for the Atmel AVR controllers. It uses a
rmware-only USB driver to transfer binary data from the PC to the
ash
of the controller. Once the AVR is
ashed with the bootloader, no other
ISP programmer is needed; then the microcontroller can be reprogrammed
over USB.
1 Features
Software works under multiple platforms. Linux, Mac OS X and Windows
are tested.
Tested with ATMega8-16
No special USB controllers or smd components are needed.
Bootloader ts into 1024 word bootloader block
2 Hardware
Basically AVRUSBBoot can be used with all circuits which are supported by
the AVR USB driver. To switch between the bootloader and the application,
an aditional jumper is necessary. Here is an example (Here the levels on the
data lines are 5V which doesn't meet the USB speci cation! The supply voltage
should be regulated to 3,3V – 3,6V):
3 Firmware and adaptation
The rmware has to be adapted to your hardware. All necessary changes has
to be done in the following two les:
bootloadercon g.h : De ne the condition when the bootloader should
be started, e.g. if a special pin is put to ground with a jumper, and the
initialisation of the hardware.
usbcon g.h : De ne the used data line pins. You have to adapt USB_CFG_IOPORT ,
USB_CFG_DMINUS_BIT and USB_CFG_DPLUS_BIT to your hardware. The
rest should be left unchanged.
1

Figure 1: Schematics
Compile the rmware. You need avr-gcc, avr-binutils and avr-libc:
$ cd firmware
$ make
The bootloader rmware has to be written to the controller with a ISP pro-
grammer. Once the bootloader is
ashed, you don't need a programmer and
you can download the binary data over USB. Don't forget to set the fuses for
the external clock source when
ashing the bootloader for the rst time!
4 Software
A C++ tool for downloading hex les is provided. To compile the program, you
need libusb.
$ cd software
$ make
When the device is connected and the bootloader is started (set the jumper
before connecting the device), hex les can be written to the
ash of the micro-
controller:
$ ./avrusbboot test.hex
5 Download
avrusbboot.2006-06-25.tar.gz (128 kB)
2

6 Links
http://www.obdev.at/products/avrusb/ Firmware-only AVR USB driver
http://libusb.sourceforge.net/ libusb
http://libusb-win32.sourceforge.net/ LibUsb-Win32
3

Similar Posts