ft2232d

My problem is, how can i work with jtag (channel A) and serial interface (channel B) at the same time? When i deinstall the VCP-driver, OpenOCD works fine with the adapter. When i install the VCP-driver, OpenOCD can’t communicate with the adapter (i tried this with both, libftdi and ftd2xx driver).

I start OpenOCD with this command:

openocd -f /opt/local/share/openocd/scripts/interface/openocd-usb.cfg -f /opt/local/share/openocd/scripts/board/olimex_stm32_h103.cfg

and get

Open On-Chip Debugger 0.5.0 (2012-03-31-14:35)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.berlios.de/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
1000 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
cortex_m3 reset_config sysresetreq
Warn : Unable to open FTDI Device tried: 'Dual RS232' and 'Dual RS232 A'
Error: unable to open ftdi device: 3
Error: ListDevices: 2
Error: 0: "Dual RS232 A"
Error: 1: "Dual RS232 B"
in procedure 'init'

I tried to remove entries from the Info.plist (look at this topic: viewtopic.php?t=8923), but without success. I removed all entries at IOKitPersonalities, but there is still /dev/tty.usbserial-00002226A and /dev/tty.usbserial-00002226B (reboot, disconnect + connect the device)?¿?

My system:

software:

  • OS X Lion

  • VCP from ftdi installed

  • D2XX via macport installed (libftd2xx @1.1.0_0 (active))

  • OpenOCD via macport installed (openocd @0.5.0_1+ft2232_ftd2xx (active))

hardware:

hi mario,

i found this thread while searching for my adapter from the embedded-projects shop. unfortunately it differs from yours: [embedded-projects adapter

this one uses the FT2232D usb-uart chip.

did you get solved your problem? i get the same answer as you described:

Warn : Unable to open FTDI Device tried: 'Dual RS232' and 'Dual RS232 A'
Error: unable to open ftdi device: 3  <<############
Error: ListDevices: 2
Error: 0: "Dual RS232 A"
Error: 1: "Dual RS232 B"
in procedure 'init'

i think the marked line was thrown from [here. google showed me [this page for ftd2xx_status_string.

from ftd2xx_common.h:

00028 static const char *ftd2xx_status_string(FT_STATUS status)

00029 {

00030 switch (status) {

00031 case FT_OK: return “OK”;

00032 case FT_INVALID_HANDLE: return “invalid handle”;

00033 case FT_DEVICE_NOT_FOUND: return “device not found”;

00034 case FT_DEVICE_NOT_OPENED: return “device not opened”;

00035 case FT_IO_ERROR: return “io error”;

00036 case FT_INSUFFICIENT_RESOURCES: return “insufficient resources”;

00037 case FT_INVALID_PARAMETER: return “invalid parameter”;

00038 case FT_INVALID_BAUD_RATE: return “invalid baud rate”;

00039

00040 case FT_DEVICE_NOT_OPENED_FOR_ERASE: return “device not opened for erase”;

00041 case FT_DEVICE_NOT_OPENED_FOR_WRITE: return “device not opened for write”;

00042 case FT_FAILED_TO_WRITE_DEVICE: return “failed to write device”;

00043 case FT_EEPROM_READ_FAILED: return “eeprom read failed”;

00044 case FT_EEPROM_WRITE_FAILED: return “eeprom write failed”;

00045 case FT_EEPROM_ERASE_FAILED: return “eeprom erase failed”;

00046 case FT_EEPROM_NOT_PRESENT: return “eeprom not present”;

00047 case FT_EEPROM_NOT_PROGRAMMED: return “eeprom not programmed”;

00048 case FT_INVALID_ARGS: return “invalid args”;

00049 case FT_NOT_SUPPORTED: return “not supported”;

00050 case FT_OTHER_ERROR: return “other error”;

00051 }

00052

00053 return “undefined FTD2xx error”;

00054 }

if the adapter is not plugged in, a line “Error: ListDevices: 0” occurs. that tells me, something is ok in there ;).

if it is plugged in, the ft2232_… settings have no influence (or i couldn’t find the right parameters :think: ):

ft2232_device_desc “Dual RS232 A”

which parameter do you have chosen for ft2232_layout ?

do i have to specify the vid/pid values? (ft2232_vid_pid)

i compiled openocd (official 0.5.0 code release from august 2011) with the “–enable-ftd2232_ftd2xx” and “–with-ftd2xx-lib=static” flags. the driver is the proprietary on from ftdichip.com (http://www.ftdichip.com/Drivers/D2XX/Li … .10.tar.gz). linux version is centos 5.8

or maybe anyone else can help? :text-thankyouyellow:](http://openocd.sourceforge.net/doc/doxygen/html/ftd2xx__common_8h_source.html)](OpenOCD - Open On-Chip Debugger / Git tools)](http://shop.embedded-projects.net/index.php?module=artikel&action=artikel&id=519)

now i have build openocd from a git clone (29.05.) with the proprietary driver and get the same behavior.

this config lines worked at someone with the same adapter:

interface ft2232
ft2232_device_desc "Dual RS232 A"
ft2232_layout oocdlink
ft2232_vid_pid 0x0403 0x6010
jtag_speed 100
jtag_nsrst_delay 200
jtag_ntrst_delay 200

(jtag_speed throws exception: "Runtime Error: test2.cfg:5: invalid command name “jtag_speed” " :think: )

when i use this config i get again the same error:

Warn : Unable to open FTDI Device tried: 'Dual RS232' and 'Dual RS232 A'
Error: unable to open ftdi device: device not opened
Error: ListDevices: 2
Error: 0: "Dual RS232 A"
Error: 1: "Dual RS232 B"
in procedure 'init'

if the adapter is not plugged in, the error is “device not found”.

any ideas? :shifty:

building openocd from a git clone using the opensource libftdi finally works :dance: .

i wrote a [little howto](HOWTO: Building OpenOCD for FT2232 from scratch with libftdi - SparkFun Electronics Forum)