#66 Mac OSX avrdude problem


Mac OSX 10.9.1
Eclipse: 20130919-0819
AVR Plugin: 2.4.1
AVRDude: 6.0.1 (CrossPack-AVR-20131216)
AVR ISP: Dragon and MKII


trying to upload a hex file to an AVR while the ISP is disconnected or while the target is not powered (or something is wrong in general) may cause the USB stack of my MAC to blow up (reset). Changes are about 30-50%. When it blows, my mouse, keyboard, and everything else stops to work for approximately 2sec. After that all works as previously except the AVR ISPs. I need to reboot in order to get them recognized by the system again!!
I tested it on two machines using two (USB) programmers. I always had the same result...

This problem is definitely related to avrdude and/or libusb. However I cannot reproduce this issue in the terminal as the timing seems to be critial.

For workaround I wrote a script (attached) for delaying the individual avrdude invocations by 250ms. This seems to do the trick for me.

It would be nice if you could include this small delay in the next version of your plugin.


1 Attachments


  • Sid

    Sid - 2014-01-26

    Turns out that the delay is not important. However, the script is! W/o it the USB stack blows up immediately (in cases when something is wrong). In the end, it seems to be a plugin related problem? What changes by using this tiny script??

  • Kees Bakker

    Kees Bakker - 2014-01-26

    Hi Juergen,

    I'm not convinced. First of all, you are the first to report this problem. If it is plugin related, then why does nobody else have this problem?
    And then you say that the delay is not important. Then what is?

    I'm not denying that you have a USB problem, but the solution is not your script.

    Kind regards,
    Kees Bakker

  • Sid

    Sid - 2014-01-26

    Hi Kees,

    thx for your fast reply.

    Of course, it sounds strange/funny. I do not know why (or how) my man-in-the-middle script exactly solves the problem...
    Indeed, I seem to be the only one reporting such a bug. Most MAC user only report the following line:

    avrdude: usbdev_open(): did not find any USB device "usb"

    However, this is the final state of the mentioned "bug": the programmer does not get recognized anymore. Some resolve this by flashing a cache (http://blog.awesomecontroller.com/2012/04/21/mac-arduino-upload-error-avrdude-usbdev_open-did-not-find-any-usb-device-usb/), upgrading the system (which requires a reboot = problem solution), or buying a new programmer.

    I never would have come across this behavior if I wouldn't have made a project where the ISP header is connected very wobbly on my PCB resulting in a lot of programing errors.

    I conducted the following test:
    I unplugged the target board and tried to upload a sketch. I tried it almost 100 times w/o problems (of course, I was not able to upload the sketch, but the programmer stayed responsive). The second time w/o my script destroyed the system (I could not access the programmer until the next system restart)... I honestly do not know why. I admit that it is more likely a problem of avrdude, however, it never occurs outside of the eclipse plugin and I can reproduce it on my second MAC.

    I just wanted to let you know that.
    Juergen Eckert

    Last edit: Sid 2014-01-26
  • Sid

    Sid - 2014-01-27

    Turn out that the avrdude is invoking an unnecessary usb reset on non-freeBSD systems. To solve this problem I slightly changed the avrdude code. See: https://savannah.nongnu.org/bugs/?41357

    However, it do not know why the reset just occurred while using the eclipse plugin.
    Never mind, I'd say riddle solved...

  • Sid

    Sid - 2014-01-27
    • status: open --> closed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks