patchAVR Downloader/UploaDEr - Patches: patch #8954, Enable usage of libusb-1.0 for...


You are not allowed to post comments on this tracker with your current authentication level.

patch #8954: Enable usage of libusb-1.0 for stk500v2 (aka avrispmkii)

Submitted by:  Michael Böhme <michaelboehme>
Submitted on:  Thu 24 Mar 2016 12:32:46 PM UTC  
Category:  None Priority:  5 - Normal
Status:  Need Info Privacy:  Public
Assigned to:  None Open/Closed:  Open

Sun 21 Jan 2018 10:21:05 PM UTC, comment #1:

This does unfortunately not compile under FreeBSD where the OS
offers a libusb-1.0 API compatible USB library:

So it seems the libusb_has_capability() needs an explicit
probing in as it has not always been part of
the libusb-1.0 API. (Unfortunately, LIBUSB_CAP_HAS_CAPABILITY
is part of an enum rather than a #define, so it cannot be
tested at compile-time. Seems someone didn't really think
about that detail before.)

The warnings about char vs. uint8_t * can probably safely
be silenced using typecasts.

Joerg Wunsch <joerg_wunsch>
Project Administrator
Thu 24 Mar 2016 12:32:46 PM UTC, original submission:

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.

Michael Böhme <michaelboehme>


Attached Files
file #36745:  libusb.patch added by michaelboehme (23KiB - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by joerg_wunsch (Posted a comment)
  • -email is unavailable- added by michaelboehme (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-01-21 joerg_wunsch StatusNone => Need Info
    2016-03-24 michaelboehme Attached File- => Added libusb.patch, #36745

    Back to the top

    Powered by Savane 3.4