Introduction: Arduino DFU-programmer on Mac OS

Picture of Arduino DFU-programmer on Mac OS

Did you ever needed to change firmware on the Arduino, for example to use it as a MIDI device? Here is a guide to upload new firmware onto your Arduino using an Apple computer.

If you ever uploaded new firmware on the Arduino using a Windows computer, you know this isn't to difficult: Using the application FLIP you're able to select the firmware file and FLIP will do the rest for you. However, on Apple computer, things are a little bit more complicated, because FLIP is Windows only. This guide will explain what steps are needed in order to successfully flash your Arduino to run a different software.

Before we start, there are some programs you need to download

1. First, download and the dfu-programmer file and unzip it.

2. Open the terminal application and navigate to the unzipped file by typing in the file path. If the file is saved in your download folder, the command will look like this:

cd Downloads/dfu-programmer-master

3. Type the following command:


(Press the enter key)


(Press the enter key)<br>


(Press the enter key)

make install

(Press the enter key)

4. The dfu-programmer is install now. Download a firmware (.hex) file you want to upload to your Arduino. Or if your Arduino appears to be dead and you want to restore it, the hex file can be found in the Arduino hardware folder.

Step 1: Uploading the New Firmware

Picture of Uploading the New Firmware

Now it's time to flash the new firmwarm onto your Arduino:

1. Connect your Arduino using a USB cable.

2. Open the Terminal application.

3. In Terminal, navigate to where you stored the hex file. Since I saved the firmware for my Arduino in the Download folder, I type:

cd Downloads/

4. Put your Arduino into DFU-mode by connecting the pins shown in the picture for 1 or 2 seconds.

5. Type in the Terminal window:

 sudo dfu-programmer atmega16u2 erase

If you are asked for a password, type in your master account password.

6. Type in the Terminal window:

dfu-programmer atmega16u2 flash [the name of your firmware file].hex

For example:

dfu-programmer atmega16u2 flash dualMoco.hex

7. Type in the Terminal window:

 dfu-progammer atmega16u2 reset

8. You are done! Reconnect your Arduino and you should be good to go!




If you get an error 'no device present', it's likely you haven't put your Arduino into DFU the right way or that software is missing. May you encounter any other errors during the process, do not hesitate to ask in the comments for help. I will do my best to help you!


hmarcotte (author)2017-09-19


I'm using an Atmega32u4 and I'm getting the 'no device present' message. from what I read, the Atmega32u4 doesn't have a DFU mode. What do you think I should do? I've been researching the subject for a while now. Thanks.

EDD43 (author)2017-05-09

muchas gracias desde bcn!
muy útil!

BálintB13 (author)2017-03-25

What can I do if I get that no device present? (I checked the wiring of the reset pin too, and it's ok)

desayuno (author)2017-03-20

Im having a problem at the make step: fatal error: 'libusb.h' file not found

anyone has found a solution for this issue?

Yaeltex (author)2016-09-29

Hi! Thanks for this instructable.

However, i'm getting this when executing "./" command

"sh: autom4te: command not found

aclocal: error: echo failed with exit status: 127

./ line 3: autoheader: command not found

sh: autoconf: command not found

automake: error: autoconf failed with exit status: 127

./ line 5: autoconf: command not found"

Any idea what's missing and how to solve it?

Bas van Straaten (author)Yaeltex2016-09-30

I might have found a solution, you need to install homebrew. To do so, run this command in the terminal:

/usr/bin/ruby -e "$(curl -fsSL

Please let me know if it worked!

Yaeltex (author)Bas van Straaten2016-09-30

It didin't.

I've copy pasted that line into my terminal, but seems incomplete

Bas van Straaten (author)Yaeltex2016-09-30

hmm, it looks like Instructables cut off my link, here's the source:

About This Instructable



Bio: Design student, wantrepeneur, lifelong learner. Oh, also running a small 3D printing business.
More by Bas van Straaten:How to Make a Cheap Arduino MIDI ControllerArduino DFU-programmer on Mac OSArduino Touch Capacitive MIDI Keyboard
Add instructable to: