- added info about libftdi support under win32
authorntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Fri, 2 May 2008 09:35:48 +0000 (09:35 +0000)
committerntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Fri, 2 May 2008 09:35:48 +0000 (09:35 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@638 b42882b7-edfa-0310-969c-e2dbd0fdcd60

contrib/libftdi/README [new file with mode: 0644]
contrib/libftdi/libftdi-0.12_win32.patch [new file with mode: 0644]
doc/openocd.texi

diff --git a/contrib/libftdi/README b/contrib/libftdi/README
new file mode 100644 (file)
index 0000000..475c4e5
--- /dev/null
@@ -0,0 +1,7 @@
+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
+
diff --git a/contrib/libftdi/libftdi-0.12_win32.patch b/contrib/libftdi/libftdi-0.12_win32.patch
new file mode 100644 (file)
index 0000000..426523c
--- /dev/null
@@ -0,0 +1,20 @@
+--- 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);
index 551b62c5459c8591b2b73a14796510ea02d8cb08..0c5a165ee8344ebb72db1f31df6beddafe4f71b6 100644 (file)
@@ -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

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)