[UPDATED - 2009.11.05 as the Win x64 patch has also been integrated in the latest GIT source for libftdi]
[UPDATED - 2009.10.20 as the MinGW-W64 patches have now been integrated in the latest GIT source for OpenOCD]

PREREQUISITES:

o WPG System64 (MinGW x64) installed in C:\msys\o [Optional - Only needed if you want to recompile libusb-win32]libusb-win32-src-0.1.12.2.tar.gz extracted in C:\msys\src\libusb-win32-src-0.1.12.2\o The latest sources for libftdi should be downloaded from git (they contain important fixes for Win x64!) and installed in C:\msys\src\libftdi\If you have git installed you can retrieve the latest source with:

Note that OpenOCD has recently been updated with patches to ensure successful compilation on MinGW, so if you are using the svn source or an archive version lower than 0.3.0, you will encounter issues. Using git is the only way to avoid these issues right now.

You should now have a libusb0.sys and libusb0.dll in C:\msys\src\libusb-win32-src-0.1.12.2\ddk_make\. You can now close the "x86 Free Build Environment" command prompt window.o (Building of the 64 bit drivers) Open Windows Drivers Kits -> WDK 7600.16385.0 -> Build Environments -> Windows 7 -> x64 Free Build Environmento Rename libusb0.def and libusb0_drv.def in C:\msys\src2\libusb-win32-src-0.1.12.2\ to libusb0_x64.def libusb0_x64_drv.def respectivelyo Edit C:\msys\src\libusb-win32-src-0.1.12.2\ddk_make\sources_dll and change the line

You should now have a libusb0_x64.sys and libusb0_x64.dll in C:\msys\src\libusb-win32-src-0.1.12.2\ddk_make\. You can now close the "x64 Free Build Environment" command prompt window.o Copy the following inf file to your C:\msys\src\libusb-win32-src-0.1.12.2\ddk_make\ directory. Edit it as appropriate according to your USB device (The LibUSB-Win32 drivers we built are not exclusive to FTDI USB devices)o Still in the ddk_make\ directory, create 2 empty files, named: "libusb_x64.cat" and "libusb.cat" (or edit the inf file to remove the .cat references)o Navigate to <your_WinDDK_install_dir>\7600.16385.0\bin\amd64\ and copy the files CertMgr.exe, MakeCert.exe and SignTool.exe to the C:\msys\src\libusb-win32-src-0.1.12.2\ddk_make\ directoryo Follow the steps highlighted here to sign your drivers.o Remove any existing FTDI drivers, plug in your system, and install the libUSB drivers. One the drivers have been installed, you should have libusb0_x64.dll in C:\Windows\System32

STEP 1: Compiling libftdi

o Make sure you have the LibUSB Win32 x64 driver installed, with libusb0_x64.dll in C:\Windows\System32\o Navigate to the directory where you have the libusb0_x64.def from the LibUSB-Win32 driver files and issue the command:

at the beginning of your def file. If not, you are likely to get the error "The application failed to start because "(null).dll" was not found" later on, as the DLL needs to be referenced in the lib file. o Copy the file usb.h from your libusb drivers to /usr/local/include (or C:\msys\local\include in Windows - create the directory if it doesn't exist)o [OPTIONAL] You might also want to check that libUSB is working using the libfti test programs (which is a wise thing to do before compiling OpenOCD), so before compiling libfti, you should retrieve the Vendor ID and Product ID of your USB device, and edit src/examples/find_all.c to update line #24.For instance, for the SheevaPlug dev kit:

You can find the vendor ID & product ID in the Device Manager by going to: LibUSB-Win32 Devices -> <your device name> -> Properties -> Details -> Hardware ID. There you should see something like USB\VID_AAAA&PID_BBBB with AAAA being the vendor ID and BBBB the product ID. (For the SheevaPlug Dev Kit, the like is: "USB\VID_9E88&PID_9E8F&REV_0500&MI_00")o Issue the command

(Once again, you can add a CFLAGS="-O0 -g -Wall" in there to compile with debug, so that you can use gdb)o Once the compilation has completed successfully, run make install. You should now be able to run a fully GPL compliant version of openocd on Windows 64 systems.

i was trying to use the drivers provided here with Windows 7 x64 and my amontec jtag key tiny and they did not work .. the installer fails during insalling the driver. I got the message that someting in the service installation sector is invalid (sorry for this crude translation, i have a german windows and thats what M$ call it *ggg*)

Have you checked that the Vendor ID and Product ID for your amontec jtag key tiny matched the ones reported by the Device Manager.

Also, unless I'm mistaken, I don't think you have used the right set of files for your driver installation (you need to download the libusb-win32_ft2232_drivers_x64.zip archive, and then run the various cmd file as administrator, as indicated in INSTALL.txt), because the original batch files I gave in the archive did not work with Windows 7.

I have now fixed them, but I don't really see how you could have installed the driver on Windows 7 with the previous archive, as you should have seen errors when trying to run the .cmd files.

Remember that, before you can install the driver on Windows x64, you must:

1. run the Windows_Enable_Test_Mode.cmd file as administrator and reboot your machine, if your machine is not already in Test Mode (you must see Test Mode displayed on your wallpaper before you attempt to install the drivers)

2. run the Sign_Drivers.cmd as administrator, before attempting to install the driver. This is because you cannot use the .sys files provided in the archive unless they are signed, and the original files from the zip are unsigned.

If you do just that, and have the proper VID and PID for your USB device in the .inf, then the driver installation should work.