On 10.04.23 10:52, ger...@openocd.org wrote:
commit d5e2eb80571ae23b0de68fd40a5f79c1c9632011
Author: Weijie Gao <hackpas...@gmail.com>
Date: Mon Apr 10 15:13:01 2023 +0800
jtag/drivers/ftdi: add support for using FTDI D2XX driver on Windows
This patch adds FTDI D2XX support on Windows platform.
Many FTDI boards are shipped with blank EEPROM which will be likely
installed with the FTDI official D2XX driver on Windows.
As many users don't know how to replace the D2XX driver with libusb one,
it's necessary to support the FTDI D2XX driver.
This patch adds new subcommands for ftdi adapter driver:
- ftdi backend (libusb|d2xx)
Selects the backend to be used for accessing device, libusb or d2xx.
libusb is default if not specified.
This makes sure the support for D2XX does not break the compatibility.
- ftdi device_location <location-id>
Specify the D2XX USB device location ID of the FTDI device.
Since FT_OpenEx supports three methods of opening a device, this patch has
also added support for these methods:
1. By serial number:
ftdi backend d2xx
adapter serial <serial_string>
2. By description:
ftdi backend d2xx
ftdi device_desc <d2xx-related-description>
3. By location
ftdi backend d2xx
ftdi device_location <d2xx-location-id>
For portability, the original ftd2xx.lib is not used. Instead, dynamically
loading of ftd2xx.dll is used. This will make the executable not depend on
ftd2xx.dll, and this feature can be always enabled for Windows platform.
Hm. Isn't this still considered dynamic linking against a
non-GPL-compatible library (D2XX)?
In that case, it would make binaries compiled with that option
non-distributable, and even if the aim is to have the users compile
their own openocd binary, I don't think this should be in the source -
IIRC, the existing D2XX support was removed in 0.10.0 for that reason.
cu
Michael