Skip to content

dfu programmer for Windows

hasu@tmk edited this page Oct 13, 2022 · 15 revisions

dfu-programmer for Windows

You can use dfu-programmer to program Atmel AVR controllers on Windows.

Download dfu-programmer-win-0.7.2.zip or newer and unzip it at Desktop for example.

Install driver first if you don’t have yet or reinstall driver if have a trouble during programming.

Programming command

Run three commands to program your controller with firmware(hex file). In following command example atmega32u2 part may be atmega32u4 or other depending on your device. The first command remove existing firmware on controller you have to erase it before programming controller. The second programs new firmware actually, your_firmware.hex is filename or filepath of your firmware. The third restarts controller and exits from programming mode. You may have to re-plung to restart your device for some reason.

dfu-programmer.exe atmega32u2 erase --force
dfu-programmer.exe atmega32u2 flash your_firmware.hex
dfu-programmer.exe atmega32u2 reset

First plug-in your device and turn it into programming mode, for example, by pressing button on controller board.

Open unzipped dfu-programmer folder in File Explorer and select 'Open command prompt' from File menu.

open command prompt

Note that your folder path is showed in comand prompt. And type and run above commands line by line. Optionally you can drag and drop your firmware file from File Explorer to Command prompt window instead of typing long file path.

commands

Click to see image at full resolution.

Driver install

See this .

Clone this wiki locally