Go Down

Topic: uno rev3 16u2 firmware flashing with dfu-programmer (Read 6 times) previous topic - next topic

nueh

#5
Nov 29, 2012, 01:59 pm Last Edit: Nov 29, 2012, 10:43 pm by nueh Reason: 1
Code: [Select]
dyld: Library not loaded: /usr/local/lib/libusb-1.0.0.dylib
 Referenced from: /Users/adamrolph/Downloads/dfu-programmer
 Reason: image not found


Sorry, my mistake!
I didn't realize that this is a dynamically linked binary. You're missing the required library.

I had success compiling all libraries and dfu-programmer itself by using the attached install script.
The package was originally created by Uriah Baalke. I just updated the included dfu-programmer to 0.5.4 and patched it.

Installation:
- In Terminal navigate to your dfu_programmer_install directory.
- Type: ./install_dfu_programmer.sh
- This executes the install.
- You will be prompted for your password. Type in your password.
- If the install is sucessful you should see the dfu-programmer
manual
- press 'q' to exit the manual.

Regards
nueh


Ender_sD

#6
Dec 02, 2012, 12:35 am Last Edit: Dec 02, 2012, 12:41 am by Ender_sD Reason: 1
I've been able to successfully install and patch dfu-programmer now, thanks to the information you've provided.  Thanks.

Unfortunately I'm still having trouble flashing firmware.  When I short the two pins on the ISP header closest to the USB port in order to put the Uno r3 16u2 into DFU mode, the serial port in the native Arduino IDE goes away.  So, I am relatively certain the board is in DFU mode.

However, when I run sudo
Code: [Select]
dfu-programmer at90162 erase I still get the error
Code: [Select]
dfu-programmer: no device present.

I have the menu for dfu programmer printing, as well as the menu from Macports, which can be seen here:

Code: [Select]
Adam-Rolphs-iMac-3:~ adamrolph$ port search libusb
libusb @1.0.9 (devel)
   library for USB device access

libusb-compat @0.1.4 (devel)
   library for USB device access

libusb-devel @1.0.8.20101017 (devel)
   library for USB device access

libusb-legacy @0.1.12 (devel)
   Library providing access to USB devices

Found 4 ports.


This post by member Stimmer may be helpful to me but I do not know how to run the commands mentioned in it:

Quote
Both dmesg and lsusb should confirm the device mode change. If there's just a reset without a mode change dmesg should confirm that too.


Any help is appreciated thank you.

stimmer

Thanks for the PM. dmesg and lsusb are linux commands, not mac, so that won't be useful to you. I think you are correct that if the serial port has disappeared then it is probably in DFU mode. Unfortunately I know nothing about Mac OSX at all so can't be of any help.

Ender_sD

#8
Dec 02, 2012, 07:55 am Last Edit: Dec 02, 2012, 08:48 am by Ender_sD Reason: 1
I have been able to confirm that my Arduino Uno is in DFU mode.  By checking in "About this mac", "System Report", and "USB" I have been able to see the my Arduino recognized in two states, depending on whether or not the pins have been shorted.  (when I short the pins it is no longer recognized as an Arduino, but a different device from "atmega corp")  This means the chip is in DFU programming mode and can have its firmware updated.

I am still having trouble with dfu-programmer though.  The dfu-programmer menu prints out, but when trying to erase the firmware on the Arduino I still get the error
Code: [Select]
no device present

I have found a thread where somebody seems to have had the exact same problem I am having, and was able to solve it, but they did not post exactly how they did it.  They just said that they weren't actually running things as a root user and were able to and that solved it for them.

The thread is here: http://arduino.cc/forum/index.php?topic=99902.15

If anybody can make more sense of it than I can I would really appreciate some insights.  I am very discouraged at this point.  All libraries seem to have been installed, the chip is clearly in DFU mode, so I really don't know what else to do, except to uninstall and reinstall all of the tools I have downloaded..

Edit: upon further investigation, I am relatively sure that my issue is that I am running the unpatched version of dfu-programmer from within the terminal, even though there is a patched version on my machine.  Can anybody help me figure out how I would use the patched one over the unpatched one?  Or is this issue even possible? There are like 10 different versions of dfu-programmer on my machine right now.

Thanks for any help

nueh

Are you sure this command is correct?
Quote
dfu-programmer at90162 erase


The UNO R3 uses an Atmega16U2.

Code: [Select]
sudo dfu-programmer atmega16u2 erase

Go Up