Greetings,
Dont have much luck getting the TINY version hardware to run on Linux and am at a loss. Appears right from the getgo, even before openOCD gets to process its configuration file, there seems to be a problem loading the FTD2xx0 driver.
Please see below.
$ /usr/local/bin/openocd -d3 -f lpc2xxx_armusbocd.cfg
/usr/local/bin/openocd: error while loading shared libraries: /usr/local/lib/libftd2xx.so.0: cannot restore segment prot after reloc: Permission denied
$ ls -al /usr/local/lib/libftd2xx.so.0
lrwxrwxrwx 1 root root 19 May 12 22:45 /usr/local/lib/libftd2xx.so.0 → libftd2xx.so.0.4.13
$ ls -al /usr/local/lib/libftd2xx.so.0.4.13
-rwxrwxrwx 1 root root 319466 Nov 20 2006 /usr/local/lib/libftd2xx.so.0.4.13
Running 2.6.18-53.1.19.el5 on i686 and built openOCD from current svn sources, configured with --enable-ft2232_ftd2xx.
Libftdi2xx.so.0.4.13 is from FTD website and followed their install instrctions.
As far as I can tell, Linux USB subsystem detects the USB TINY and one can read off catProduct = Olimex OpenOCD JTAG, idProduct = 0004, idVendor = 15ba.
Does the USB TINY need a different kind of driver?
Any help will be greatly apreciated.
Thanks in advance.
Johan.
Followup…
Am afraid the FTD driver, libftd2xx0.so.0.4.13 did not work on my platform regardless of what I tried.
As an alternate, I rebuilt openocd using libftdi and libusb instead.
This build uses the --enable_ft2232_libftdi option at ./config time.
Of course, one need to build and install libusb and libftdi first, then build openocd.
Follow the instructions from the openOCD “facts” page.
Reminder not to forget to update libraries with running ldconfig.
Make sure to specify in the config file:
ft2232_device_desc “Olimex OpenOCD JTAG TINY”
ft2232_layout “Olimex-jtag”
ft2232_vid_pid 0x15BA 0x0004
USB TINY JTAG now runs nicely under Linux.
Hope this is of use to someone.
Johan.
I had a similar problem, but when I finally figured out it was a set of 32 bit libraries that was trying to be linked on a 64-bit system, I got it to work by:
-
Create a 32 bit Linux directory using debootstrap (debian command, your distro may vary)
-
Chroot to new directory
-
Install build environment if not already existing
-
Compile using proprietary ftdi driver according to ftdi instructions
-
Run non-chrooted by passing it the variable to the openocd command:
LD_LIBRARY_PATH=/home/addministerater/chroot_etch/usr/lib ./openocd
BTW: How does the libusb version work?
Thanks for letting us know.
I did notice your postining earlier, but thought it was possibly related to a 64-bit issue, which is not what I use.
If there is anyone out there that has had good luck using the FTD2xx0 driver on a recent 32-bit kernel, I would appreciate knowing about it. Perhaps I missed something.
As far as I can tel, libusb and libftdi produces an openOCD executable with similar performance than what I saw on a WinXP system using the Win32 FTD2xx0 driver.
Johan.
Thanks for letting us know.
I did notice your postining earlier, but thought it was possibly related to a 64-bit issue, which is not what I use.
If there is anyone out there that has had good luck using the FTD2xx0 driver on a recent 32-bit kernel, I would appreciate knowing about it. Perhaps I missed something.
You might be barking up the wrong tree. This is exactly what I did, besides use of the kernel. THe kernel makes no difference in compilation. The distro I was compiling chrooted in was a debian etch 32-bit, no 64-bit libs or code anywhere.
I do remember it being tricky, but once I followed all instructions exactly it did work. If you are having trouble try creating a chrooted barebones distro. It only takes up 500-600 MB