avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avrdude-dev] Re: [bug #22271] usb_reset in usb_libusb.c not necessary i


From: David Hoerl
Subject: [avrdude-dev] Re: [bug #22271] usb_reset in usb_libusb.c not necessary in FreeBSD 6.x
Date: Fri, 06 Nov 2009 16:55:06 -0500
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.1) Gecko/20090903 Eudora/3.0b3

On 11/6/09 4:37 PM, David A. Mellis wrote:

Follow-up Comment #5, bug #22271 (project avrdude):

In my testing, the usb_reset() is necessary on Mac OS X (10.6 Snow Leopard).
Otherwise, the upload process will stall for about 25 seconds on the second
and subsequent attempts.  I suggest that revision 873 be reverted.



David,

Well, I kind of agree. Once I made the change, I too then started seeing more failures. But I also noticed that when it succeeds, its also a bit slow.

As I posted the other day, what I ended up doing is installing libusb.1.0, and libcompat.0.1. The current libusb.0.1 is quite old and will itself never be updated. The combination of the new library and a glue library fix a lot of issues (according to authors).

Even then, avrdude was running slowly. I actually spend a fair amount of time putting in debugging command to find out why. It turned out its in the two library calls to get busses and devices.

Well, it seems Apple suspends unused devices (like iSights), and the current libusb.1.0 tries to wake them, get their info, and then put them back to sleep. The code that does this was easily turned off, so I build a special version of libusb-1.0, and now avrdude is running MUCH faster than it ever did with the old libusb.0.1

My point in all this is that you can work with avrdude the way it is, do the same things I did (take less than an hour), and have a much faster and more reliable system.


That said, if you want it back, well, what I would then suggest is that I add a new flag to avrdude that forces a usb reset - current systems would get it, others could request it. This would then allows FreeBSD/Mac people use either the new or the old library.


David

PS: should avrdude migrate to the new usblib.1.0 someday?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]