dfu-programmer
is a Linux command line Device Firmware Upgrade (DFU) based programmer
for the flash memory on Atmel AVR, AVR32 and 8051 based microcontrollers
which ship with a USB boot loader.
It supports In System Programming (ISP) for developers and potentially
product updates in the field.
Those boot loaders are patterned after the standard USB DFU 1.0 class
specification, but depend on extensions defined by Atmel to the extent
that standard DFU drivers will not work.
To use it, first connect the device to be programmed and ensure that it
comes up in DFU mode.
The microcontrollers come up in that mode as shipped by Atmel;
or they may reenter that mode after a special hardware reset.
Then invoke this program to issue one or more DFU commands.
You will normally need to start by issuing the "erase" command;
the default security policies prevent extracting firmware, to prevent
reverse engineering of what is usually proprietary code.
SUPPORTED MICROCONTROLLERS
These chip names are used as the command line "target" parameter.
8051 based controllers:
at89c51snd1c, at89c51snd2c, at89c5130, at89c5131, and at89c5132.
AVR based controllers:
at90usb1287, at90usb1286, at90usb647, at90usb646, at90usb162,
at90usb82, atmega32u6, atmega32u4, and atmega16u4.
There are no mechanisms for selecting which single device
should be programmed, or to implement gang programming.
Accordingly, you will usually avoid connecting more than one
device of a given family (AVR, AVR32 or 8051) at a time.
All of these commands support the "global options".
Unless you override it,
commands which write to the microcontroller will perform
a validation step that rereads the data which was written,
compares it to the expected result, and reports any errors.
configure
register
[--suppress-validation]
data
Bootloaders for 8051 based controllers support writing certain
configuration bytes.
dump
Reads all the available flash memory, and writes it as binary
data to stdout.
eeprom-dump
Reads all the available eeprom memory, and writes it as binary
data to stdout.
erase
[--suppress-validation]
Erases all the flash memory.
This is required before the bootloader will perform other commands.
file
Writes flash memory. The input file must use the "ihex" file
format convention for a memory image. --suppress-bootloader-mem
ignores any data written to the bootloader memory space when flashing
the device. This option is particularly useful for the AVR32 chips
trampoline
code.
eeprom-flash
[--suppress-validation]
file
Writes to eeprom memory. The input file must use the "ihex" file
format convention for a memory image.
get
register
Displays various product identifier bytes.
reset
Resets microcontroller using watchdog timer
start
Starts the application firmware by having the microcontroller
jump to address zero.
version
This prints a string identifying the version of this utility.
Global Options
--quiet - minimizes the output
--debug level - enables verbose output at the specified level
Configure Registers
The standard bootloader for 8051 based chips supports writing
data bytes which are not relevant for the AVR based chips.
bootloader-version - currently flashed bootloader version
ID1 - device boot identification 1
ID2 - device boot identification 2
manufacturer - the hardware manufacturer code
family - the product family code
product-name - the product name
product-revision - the product revision
HSB - same as the configure_register version
BSB - same as the configure_register version
SBV - same as the configure_register version
SSB - same as the configure_register version
EB - same as the configure_register version
BUGS
None known.
KNOWN ISSUES
The at90usb series chips do not make available any read/write protect
flags so the
dump
or
flash
command may fail with a less than helpful error message.
To remove
any
write or read protection from any chips, a full chip erasure is required.
You may need to be a member of the
uucp
group in order to have access to the device without needing to be root.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA