So I'm going to expand a little bit on how to install the newest version of
dfu-programmer on OS 10.9.1, Mavericks
The assumptions are:
You have NOT installed macports, or any other tools for installing Linux intended apps on your mac.
You HAVE installed Xcode 5.0.2 from the Mac App Store, as well as the command line tools.
You are at least slightly familiar with the concept of building an application from source code using GNU make
You are willing to trust some random dude on the Internet to tell you to type something into an application that has the power to delete nearly your entire hard drive if you type something dangerous.
You have download libusb 1.0.9 and dfu-programmer 0.6.2 from their respective websites and have saved them in your Downloads folder.
I have my computer set up to not automatically extract archives when they're downloaded. My steps will include extracting the archives, though most people won't have to take that step.
1) Open the Downloads folder, and double click each downloaded archive to extract it into the current directory, this will not be necessary if the folders were automatically extracted.
2) open Terminal.app. I use spotlight search to open pretty much anything, but you can find the app in /Applications/Utilities/Terminal
The commands that I am typing are every thing after the "$" symbols
Last login: Tue Feb 11 09:33:24 on console
Nelsons-iMac:~ nelsonmilum$ cd Downloads/
Nelsons-iMac:Downloads nelsonmilum$ ls
About Downloads.lpdf libusb-1.0.9
Nelsons-iMac:Downloads nelsonmilum$ cd libusb-1.0.9
Nelsons-iMac:libusb-1.0.9 nelsonmilum$ ./configure
Nelsons-iMac:libusb-1.0.9 nelsonmilum$ make
Nelsons-iMac:libusb-1.0.9 nelsonmilum$ sudo make install
WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.
To proceed, enter your password, or type Ctrl-C to abort.
Password: #Type your computer login password here
You may get some warnings during this process, but those are fine. I can't speak for every build, but I am currently doing this on a clean installation of the operating system, so I don't expect anything to get in the way of this process.
That's it! you should now have libusb installed, which is a prerequisite for dfu-programmer.
As a side note, I figured out during this process how to not have to go in and edit a Makefile to get it to work! Yay for environment variables!
Now we need to install the actual dfu-programmer app. This involves setting an environment variable in order to get it to compile correctly in Mavericks... pretty straightforward, but it's only easy once you know about it.
Now, back to the terminal stuff:
Nelsons-iMac:libusb-1.0.9 nelsonmilum$ cd ../dfu-programmer-0.6.2
Nelsons-iMac:dfu-programmer-0.6.2 nelsonmilum$ export CFLAGS='-g -O2 -I/usr/local/include/libusb-1.0'
Nelsons-iMac:dfu-programmer-0.6.2 nelsonmilum$ ./configure
Nelsons-iMac:dfu-programmer-0.6.2 nelsonmilum$ make
Nelsons-iMac:dfu-programmer-0.6.2 nelsonmilum$ sudo make install
Thats it! I now have the latest version of
dfu-programmer installed on my mac with little fuss and bother.
as a little bit of cleanup, I run "unset CFLAGS" in terminal and then test out the app.
Nelsons-iMac:dfu-programmer-0.6.2 nelsonmilum$ unset CFLAGS
Nelsons-iMac:dfu-programmer-0.6.2 nelsonmilum$ dfu-programmer --targets
at89c51snd1c at89c51snd2c at89c5130 at89c5131
at89c5132 at90usb1287 at90usb1286 at90usb1287-4k
at90usb1286-4k at90usb647 at90usb646 at90usb162
at90usb82 atmega32u6 atmega32u4 atmega32u2
atmega16u4 atmega16u2 atmega8u2 at32uc3a0128
at32uc3a1128 at32uc3a0256 at32uc3a1256 at32uc3a0512
at32uc3a1512 at32uc3a0512es at32uc3a1512es at32uc3a364
at32uc3a364s at32uc3a3128 at32uc3a3128s at32uc3a3256
at32uc3a3256s at32uc3a4256s at32uc3b064 at32uc3b164
at32uc3b0128 at32uc3b1128 at32uc3b0256 at32uc3b1256
at32uc3b0256es at32uc3b1256es at32uc3b0512 at32uc3b1512
at32uc3c064 at32uc3c0128 at32uc3c0256 at32uc3c0512
at32uc3c164 at32uc3c1128 at32uc3c1256 at32uc3c1512
at32uc3c264 at32uc3c2128 at32uc3c2256 at32uc3c2512
atxmega64a1u atxmega128a1u atxmega64a3u atxmega128a3u
atxmega192a3u atxmega256a3u atxmega16a4u atxmega32a4u
atxmega64a4u atxmega128a4u atxmega256a3bu atxmega64b1
atxmega128b1 atxmega64b3 atxmega128b3 atxmega64c3
atxmega128c3 atxmega256c3 atxmega384c3
As you can see when I listed the targets, in the second column fifth row, the atmega16u2 is supported officially by the app.
** Additional **
If you think you may want to uninstall these applications, libusb, and dfu-programmer, you will have an easier time if you save the folders in which you did the work. Running "sudo make uninstall" while in those directories (remember the commands that started with 'cd') it will uninstall the files that were put in your /usr/local/ folder when you ran "sudo make install"