Skip to content
Snippets Groups Projects
Commit 8bf24de7 authored by ntfreak's avatar ntfreak
Browse files

- added info about libftdi support under win32

git-svn-id: svn://svn.berlios.de/openocd/trunk@638 b42882b7-edfa-0310-969c-e2dbd0fdcd60
parent 872919e5
No related branches found
No related tags found
No related merge requests found
libftdi can be built to work under win32 (cygwin/mingw) after applying the patch in this directory.
The issue is caused by windows requiring usb_set_configuration to be called before the usb_claim_interface.
Spen
spen@spen-soft.co.uk
--- src/ftdi.c.orig Wed Apr 16 16:24:30 2008
+++ src/ftdi.c Thu May 01 20:19:46 2008
@@ -358,6 +358,17 @@
if (usb_detach_kernel_driver_np(ftdi->usb_dev, ftdi->interface) != 0 && errno != ENODATA)
detach_errno = errno;
#endif
+
+#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
+ if (usb_set_configuration(ftdi->usb_dev, 1) != 0) {
+ usb_close (ftdi->usb_dev);
+ if (detach_errno == EPERM) {
+ ftdi_error_return(-8, "inappropriate permissions on device!");
+ } else {
+ ftdi_error_return(-5, "unable to set configuration");
+ }
+ }
+#endif
if (usb_claim_interface(ftdi->usb_dev, ftdi->interface) != 0) {
usb_close (ftdi->usb_dev);
......@@ -126,8 +126,8 @@ a FTDI FT2232 based interface:
homepage (@uref{www.amontec.com}), as the JTAGkey uses a non-standard VID/PID.
@end itemize
Please note that the ftdi2232 variant (using libftdi) isn't supported under Cygwin.
You have to use the ftd2xx variant (using FTDI's D2XX) on Cygwin.
libftdi is supported under windows. Versions earlier than 0.13 will require patching.
see contrib/libftdi for more details.
In general, the D2XX driver provides superior performance (several times as fast),
but has the draw-back of being binary-only - though that isn't that bad, as it isn't
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment