avrdude-dev
[Top][All Lists]
Advanced

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

[avrdude-dev] AVRDUDE+libusb, compiling and running on Windows


From: Didrik Madheden
Subject: [avrdude-dev] AVRDUDE+libusb, compiling and running on Windows
Date: Fri, 21 Mar 2014 03:42:37 +0100

Greetings. Today's adventure has been to install avrdude on a freshly
installed 64-bit Windows 7 installation. The subject of this e-mail is
twofold.

1) Trying to use the compiled version in avrdude-6.1-mingw32.zip, I
get an error about a missing libusb0.dll. I do know how to install
libusb. That is not the purpose of this request. Rather, I'm wondering
if it would perhaps be possible to conditionally link the libusb dll
using LoadLibrary and similar functions, so those who want to use
avrdude without USB support (for example for a serial only, or
parallel port programmer) can do so using the stock exe without
installing libusb. Of course, this requires R&D and possible
reorganization of the code, but I'm throwing it out there as a
possible idea.

2) I also gave compiling avrdude without libusb installed a try. I'm
guessing it was some time since someone tried this, as the compilation
failed. In particular, the failure is in dfu.c, flip1.c and flip2.c.
dfu.c defines a number of dummy functions, however, those don't match
the actual header definitions. (Haven't been updated in a while?)

However, these functions don't fix the problem entirely, as dfu.h
creates an empty struct and flip1/flip2 are accessing members of the
struct, and members of dev_desc (of type struct usb_device_descriptor)
directly. After defining stubs of the flip1/flip2 functions, I managed
to finally compile avrdude successfully without libusb present.

Where and how does one submit patches?

And finally, I'd like to suggest two long-term strategies for handling
this problem:

* For the binary (Windows) distribution, load the dll file
conditionally, as discussed above.

* For the source distribution, perhaps exclude non-supported
programming methods at build time instead of compiling them in as
stubs that generate an error at runtime. Is there an infrastructural
reason why this is done? To make avrdude.conf generation easier/less
error-throwing-prone?

/Didrik



reply via email to

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