-
Notifications
You must be signed in to change notification settings - Fork 141
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[patch #8954] Enable usage of libusb-1.0 for stk500v2 (aka avrispmkii) #704
Comments
Joerg Wunsch <joerg_wunsch> This does unfortunately not compile under FreeBSD where the OS
So it seems the libusb_has_capability() needs an explicit The warnings about char vs. uint8_t * can probably safely |
I believe this issue has been fixed in later version of FreeBSD. |
@dl8dtl can you confirm? |
Well, it's supposed to be in the latest FreeBSD 11.x release (11.4 – 11.x is discontinued now), and since 12.2 in the 12.x release line (and then all more recent ones). So yes, with any supported FreeBSD version, it compiles now. It causes a bunch of warnings though:
In the quoted case, there's even a Just reviewed the header file at Thus, the code needs a bit of cleanup at first, and thorough testing against all affected devices (AVRISPmkII, JTAGICEmkII, JTAGICE3, AtmelICE, STK600, AVR Dragon – did I forget any?) afterwards, as it changes the underlying transport library for all these devices. |
I have the AVR Dragon so I can help out testing. Related topic: |
Just post the patch code here for easier view.
|
From the direction given by @dl8dtl in the following issue, avrdude will probably continue using libusb-0.1 API in the foreseable future. The main advantage of libusb-1.0 vs libusb-0.1 API is the support of asynchronous API. But it may not bring too much speed improvement for avrdude. And then the above patch does not use asynchronous API at all. |
I will close this one for now. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Thu 24 Mar 2016 12:32:46 PM UTC
I tried using an AVRISPmkII in Windows 10 with avrdude 6.3, but libusb couldn't find the device ("avrdude.exe: usbdev_open(): did not find any USB device "usb" (0x03eb:0x2104)").
Since libusb 0.1 is marked deprecated in cygwin, I installed libusb-1.0 and had a look at usbasp.c, where v1.0 is already in use. I then added support for libusb-1.0 in usb_libusb.c, and expanded the corresponding preprocessor conditions in jtag3.c, jtagmkII.c and stk500v2.c.
After replacing the ATMEL driver of the AVRISP by the WinUSB driver using Zadig avrdude is once more able to flash my AVRs using AVRISPmkII.
I also successfully applied and tested my patch with said AVRISPmkII in a virtual machine running xubuntu 14.04.
file #36745: libusb.patch
This issue was migrated from https://savannah.nongnu.org/patch/?8954
The text was updated successfully, but these errors were encountered: