Greetings all,
I’ve built my OpenOCD and requisite drivers (I think) but still cannot get the Olimex tiny to recognize. lsusb cites the device as being there, but there’s no identifier string, just the VID and PID. I’ve downloaded the direct driver from ftdi (0.4.13) and followed their instructions to the letter, but with no luck.
I should have got the other one! I didn’t know this one was going to raise compatibility issues. Has anyone got this thing to work under linux?
You’re most likely lacking the appropriate permissions to the USB filesystem. Both FTD2XX and libftdi internally rely on libusb which uses the USB filesystem to talk to the hardware from userspace.
Normally you’d use udev to automatically set the required permissions depending on the VID/PID of your USB device.
On my system I have a “/etc/udev/rules.d/45-ft2232.rules” with the following content:
BUS!="usb", ACTION!="add", SUBSYSTEM!=="usb_device", GOTO="kcontrol_rules_end"
SYSFS{idProduct}=="6001", SYSFS{idVendor}=="0403", MODE="664", GROUP="usb"
SYSFS{idProduct}=="6010", SYSFS{idVendor}=="0403", MODE="664", GROUP="usb"
SYSFS{idProduct}=="cff8", SYSFS{idVendor}=="0403", MODE="664", GROUP="usb"
SYSFS{idProduct}=="bcd9", SYSFS{idVendor}=="0403", MODE="664", GROUP="usb"
SYSFS{idProduct}=="bca0", SYSFS{idVendor}=="0403", MODE="664", GROUP="usb"
SYSFS{idProduct}=="bdc8", SYSFS{idVendor}=="0403", MODE="664", GROUP="usb"
SYSFS{idProduct}=="0003", SYSFS{idVendor}=="15ba", MODE="664", GROUP="usb"
SYSFS{idProduct}=="f1a0", SYSFS{idVendor}=="0403", MODE="664", GROUP="usb"
LABEL="kcontrol_rules_end"
Thanks for the help! I’ll get this eventually.
Tried adding the rules to my udev rule set, but with no luck. I used your rules, and added one, since the PID of the arm-usb-tiny is 0x04 not 0x03, reloaded the rules, (even rebooted as a last ditch effort) with no luck.
dmesg spits out a message that says the device is there, but “is not claimed by any active driver”
I modprobe ftd* in an effort to get the ftdi driver to load, and I get the ftdi_sio and usbserial driver in my lsmod, but still no driver to claim the ARM-USB-TINY
I know there’s something simple I haven’t done here, any thoughts?
I guess one good question would be: Should I be using libftdi, or the direct driver from FTDI for linux? I’ve got both and installed them, but I’m not sure which is active, if either. Here’s the relevant output from /proc/bus/usb/devices:
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms
T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 4 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=15ba ProdID=0004 Rev= 5.00
S: Manufacturer=Olimex
S: Product=Olimex OpenOCD JTAG TINY
And here’s the error I get from openocd when I compile it with the libftdi driver:
Info: openocd.c:93 main(): Open On-Chip Debugger 1.0 (2008-01-04-21:44) svn:247
Info: openocd.c:94 main(): $URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $
Error: ft2232.c:1475 ft2232_init_libftdi(): unable to open ftdi device: device not found
And here’s the error I get from openocd with the other ftdi driver:
Info: openocd.c:93 main(): Open On-Chip Debugger 1.0 (2008-01-04-21:54) svn:247
Info: openocd.c:94 main(): $URL: svn://svn.berlios.de/openocd/trunk/src/openocd.c $
Error: ft2232.c:1381 ft2232_init_ftd2xx(): unable to open ftdi device: 2
Error: ft2232.c:1396 ft2232_init_ftd2xx(): ListDevices: 2
Error: ft2232.c:1398 ft2232_init_ftd2xx(): 0: Olimex OpenOCD JTAG TINY A
Error: ft2232.c:1398 ft2232_init_ftd2xx(): 1: Olimex OpenOCD JTAG TINY B
And here’s lsmod, just for the heck of it:
Module Size Used by Tainted: P
fglrx 491592 10
ftdi_sio 21688 0 (unused)
usbserial 19900 0 [ftdi_sio]
ftape 102181 0 (unused)
snd-seq-oss 23104 0 (unused)
snd-seq-midi-event 3208 0 [snd-seq-oss]
snd-seq 33552 2 [snd-seq-oss snd-seq-midi-event]
snd-pcm-oss 28928 0 (unused)
snd-mixer-oss 11928 1 [snd-pcm-oss]
keybdev 1828 0 (unused)
mousedev 4244 1
hid 21380 0 (unused)
usbmouse 1912 0 (unused)
input 3104 0 [keybdev mousedev hid usbmouse]
usb-storage 63520 0
natsemi 15424 0
ohci1394 23568 0 (unused)
ieee1394 41156 0 [ohci1394]
8139too 13672 1
mii 2304 0 [8139too]
crc32 2880 0 [natsemi 8139too]
uhci 23804 0 (unused)
ehci-hcd 17644 0 (unused)
usbcore 56812 1 [ftdi_sio usbserial hid usbmouse usb-storage uhci ehci-hcd]
snd-via82xx 13580 1
gameport 1388 0 [snd-via82xx]
snd-ac97-codec 68160 0 [snd-via82xx]
snd-pcm 52804 0 [snd-pcm-oss snd-via82xx snd-ac97-codec]
snd-timer 13168 0 [snd-seq snd-pcm]
snd-mpu401-uart 3120 0 [snd-via82xx]
snd-rawmidi 12224 0 [snd-mpu401-uart]
snd-seq-device 3716 0 [snd-seq-oss snd-seq snd-rawmidi]
snd 34304 0 [snd-seq-oss snd-seq-midi-event snd-seq snd-pcm-oss snd-mixer-oss snd-via82xx snd-ac97-codec snd-pcm snd-timer snd-mpu401-uart snd-rawmidi snd-seq-device]
soundcore 3300 6 [snd]
snd-page-alloc 4980 0 [snd-seq-oss snd-seq snd-mixer-oss snd-via82xx snd-pcm snd-timer snd-rawmidi snd-seq-device snd]
pcmcia_core 39492 0
ide-scsi 9392 0
agpgart 45092 4
Oh! and my config file:
#daemon configuration
telnet_port 4444
gdb_port 3333
#interface
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG A"
ft2232_layout "olimex-jtag"
ft2232_vid_pid 0x15BA 0x0004
jtag_speed 3
#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst srst_pulls_trst
#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag_device 4 0x1 0xf 0xe
#target configuration
daemon_startup reset
#target <type> <startup mode>
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4
run_and_halt_time 0 30
working_area 0 0x40000000 0x4000 nobackup
#flash configuration
#flash bank lpc2000 <base> <size> 0 0 <target#> <variant>
flash bank lpc2000 0x0 0x40000 0 0 0 lpc2000_v1 14765 calc_checksum
# For more information about the configuration files, take a look at:
# http://openfacts.berlios.de/index-en.phtml?title=Open+On-Chip+Debugger
I’m grateful for any advice. Sorry for the flood of info!
-R
Your ft2232_device_desc is wrong, I guess:
Change
ft2232_device_desc “Olimex OpenOCD JTAG A”
to
ft2232_device_desc “Olimex OpenOCD JTAG TINY A”
or
ft2232_device_desc “Olimex OpenOCD JTAG TINY”
The “A” shouldn’t be necessary on Linux, but apparently your FTDI driver uses it.
The “ftdi_sio” module is only required when using the secondary channel of the FT2232 as a UART (not possible on the tiny, afaik).
Regards,
Dominic