DFU-PROGRAMMER(1)
π DFU-PROGRAMMER(1) π
okay bestie, sit DOWN, because this is the manual page for dfu-programmer, section 1 of the manual, and it's literally the group chat of USB firmware upgrading. no cap.
β¨ NAME β¨
dfu-programmer β USB firmware upgrading for Atmel microcontrollers π¦
πΈ SYNOPSIS πΈ
dfu-programmer target[:usb-bus,usb-addr] command [options] [parameters]
dfu-programmer --help
dfu-programmer --targets
dfu-programmer --version
π DESCRIPTION π
So dfu-programmer is a multi-platform command line Device Firmware Upgrade (DFU) based programmer for the flash memory on Atmel AVR, AVR32, XMEGA and 8051 based microcontrollers that ship with a USB boot loader. it's giving "I flash chips and I look cute doing it." β¨
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 they depend on extensions defined by Atmel β to the extent that standard DFU drivers will not work. periodt, don't even try it.
To use it, first connect the device you wanna program and make sure 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 what you drop in as the command line target parameter. iykyk.
8051 based controllers:
at89c51snd1cat89c51snd2cat89c5130at89c5131at89c5132
AVR based controllers:
at90usb1287at90usb1286at90usb1287-4kat90usb1286-4kat90usb647at90usb646at90usb162at90usb82atmega32u6atmega32u4atmega32u2atmega16u4atmega16u2atmega8u2
AVR32 based controllers:
at32uc3a0128at32uc3a1128at32uc3a0256at32uc3a1256at32uc3a0512at32uc3a1512at32uc3a0512esat32uc3a1512esat32uc3a364at32uc3a364sat32uc3a3128at32uc3a3128sat32uc3a3256at32uc3a3256sat32uc3a4256sat32uc3b064at32uc3b164at32uc3b0128at32uc3b1128at32uc3b0256at32uc3b1256at32uc3b0256esat32uc3b1256esat32uc3b0512at32uc3b1512at32uc3c064at32uc3c0128at32uc3c0256at32uc3c0512at32uc3c164at32uc3c1128at32uc3c1256at32uc3c1512at32uc3c264at32uc3c2128at32uc3c2256at32uc3c2512
XMEGA based controllers:
atxmega64a1uatxmega128a1uatxmega64a3uatxmega128a3uatxmega192a3uatxmega256a3uatxmega16a4uatxmega32a4uatxmega64a4uatxmega128a4uatxmega256a3buatxmega64b1atxmega128b1atxmega64b3atxmega128b3atxmega64c3atxmega128c3atxmega256c3atxmega384c3atxmega16c4atxmega32c4
STM32F4 controllers (experimental):
stm32f4_Bstm32f4_Cstm32f4_Estm32f4_G
π USAGE π
There are no mechanisms to implement gang programming. by default, the first device that matches the id codes for the given target is selected. and here's the tea: many targets share the same id codes. so accordingly, you will usually avoid connecting more than one device of a given family (AVR, XMEGA, AVR32 or 8051) at a time. one at a time bestie, we're monogamous with our chips π
The target may be qualified with the USB bus and address number of the device you wish to program. this is how you program multiple devices of the same family at the same time. slay, polyamory unlocked π«Ά
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. it's giving self-check, we love a queen who double-checks her work β¨
Note that unlike Atmel's BatchISP program, dfu-programmer will only perform a single operation at a time. erasing and programming require separate commands. one thing at a time, we're not multitasking here π
configure register [--suppress-validation] dataβ bootloaders for 8051 based controllers support writing certain configuration bytes.dump [--force] [--bin] [(flash)|--user|--eeprom]β reads the program memory in flash and outputs non-blank pages in ihex format to stdout. use--forceto output the entire memory and--binfor binary output. user page and eeprom are selected using--userand--eeprom. πerase [--force]β erases all the flash memory. for AT90 and ATmega type devices a chip erase must be performed before other commands become available. erase first checks if the memory is blank, unless the--forceflag is set.flash [--force] [(flash)|--user|--eeprom] [--suppress-validation] [--suppress-bootloader-mem] [--validate-first] [--ignore-outside] [--serial=hexbytes:offset] file or STDINβ writes flash memory. the input file (or stdin) must use the "ihex" file format convention for a memory image.--suppress-bootloader-memignores any data written to the bootloader memory space when flashing the device β this option is particularly useful for the AVR32 chips. the--forceflag tells the program to ignore whether memory inside the program region is blank. user page and eeprom are selected using--userand--eeprom. the user space flash on AVR32 chips lies outside of the normal range of flash blocks and is designed to contain configuration parameters. bootloader configuration uses the last 4 to 8 bytes of the user page. if this data is corrupted, the device will restart into the bootloader until valid data is used (see atmel doc7745 or doc32166).--forceis always required here.
--serial provides a way to inject a serial number or other unique sequence of bytes into the memory image programmed into the device. this allows using a single .ihex file to program multiple devices, and still give each device its own unique serial number. for example, --serial=ABCDEF01:0x6000 would program the byte at 0x6000 with the hex value AB, the byte at 0x6001 with the value CD, and so on. there must be an even number of hex digits, but the sequence can be any length. the offset is assumed to be given in hex if it starts with a "0x" prefix, octal if it begins with a "0", otherwise it is assumed to be decimal. π
--validate-first adds a validate before writing the flash memory. if the validate succeeds (i.e. the firmware in the chip is the same as the one given as input), then no further operations are done, and the flash is reported as successful.
--ignore-outside changes the validate behavior to ignore any error outside the programming region. this can be useful for programming a single part of the chip (where errors outside the region are expected) without ignoring the validate result.
setsecureβ sets the security bit on AVR32 chips. this prevents the content being read back from the chip, except in the same session in which it was programmed. when the security fuse is set, almost nothing will work without first executing theerasecommand. the only way to clear the security fuse once set is to use a JTAG chip erase, which will also erase the bootloader. be so serious about this one bestie πget registerβ displays various product identifier bytes.launch [--no-reset]β launch the application by resetting the device. the--no-resetflag can be used to launch the device without a reset (jump to the start address of the program). π
π Global Options π
--quietβ minimizes the output. shhh π€«--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.
BSBβ boot status byteSBVβ software boot vectorSSBβ software security byteEBβ extra byteHSBβ hardware security byte
β Get Register β
bootloader-versionβ currently flashed bootloader versionID1β device boot identification 1ID2β device boot identification 2manufacturerβ the hardware manufacturer codefamilyβ the product family codeproduct-nameβ the product nameproduct-revisionβ the product revisionHSBβ same as the configure_register versionBSBβ same as the configure_register versionSBVβ same as the configure_register versionSSBβ same as the configure_register versionEBβ same as the configure_register version
π BUGS π
None known. (iconic behaviour, honestly. not a single one. we love a flawless queen β¨)
π 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. it's giving cryptic text from a girl who won't communicate her feelings π
To remove any write or read protection from any chips, a full chip erasure is required. for AVR32 chips an erase operation over USB will remove protection until the device is rebooted. to remove the protection more permanently requires a JTAG erase (which will also erase the bootloader). so yeah, commit to it or don't, no half measures π
You may need to be a member of the uucp group in order to have access to the device without needing to be root. group chat membership = device access, no sudo required π«Ά
π AUTHOR π
Weston Schmidt <weston_schmidt@alumni.purdue.edu>
π¦ SEE ALSO π¦
nothing here bestie, the original left this section completely empty. a mysterious queen who says nothing and leaves. respect. π
okay and that's the whole page!! πΈ no version, no date, no source line at the bottom to report β the original page just ends with that empty SEE ALSO and dips. so here's your cute sign-off instead: this was DFU-PROGRAMMER(1), flashing Atmel chips and serving looks, periodt. go erase before you flash, bestie, and stay hydrated πβ¨π
π¦ where this page comes from
- arch rolling: dfu-programmer 1.1.0-1 Β· GPL2
- nixos 26.05: dfu-programmer 1.1.0
- nixpkgs unstable: dfu-programmer 1.1.0
- opensuse-leap 16.0: dfu-programmer 1.1.0-bp160.1.12 Β· GPL-2.0-or-later
- opensuse-leap 16.0: dfu-programmer 1.1.0-bp160.1.12 Β· GPL-2.0-or-later
- opensuse-leap 16.0: dfu-programmer 1.1.0-bp160.1.12 Β· GPL-2.0-or-later
- opensuse-leap 16.0: dfu-programmer 1.1.0-bp160.1.12 Β· GPL-2.0-or-later
- ubuntu resolute: dfu-programmer 1.1.0-3 Β· GPL-2.0-or-later
- ubuntu stonking: dfu-programmer 1.1.0-3 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms