Dangerous Prototypes

Dangerous Prototypes => Bus Blaster JTAG debugger => Topic started by: engineereeyore on February 24, 2014, 06:55:40 pm

Title: BusBlaster v3c setup problem on linux
Post by: engineereeyore on February 24, 2014, 06:55:40 pm
I'm running Ubuntu 12.04 and am attempting to connect to a pandaboard via the BusBlaster v3c and am having no luck at all.  I installed the libftdi1 driver on my system and I can confirm that the devices is showing up.  'lsusb' shows the device, and running 'dmesg' shows the OS picking up the new board.  However, when I attempt to run openocd, I'm getting the following error:

Code: [Select]
Error: The specified debug interface was not found (ft2232)
The following debug interfaces are available:
Runtime error: tcl/interface/busblaster.cfg:11
in procedure 'script'
at file "embedded:startup.tcl", line 58
in procedure 'interface' called at file "tcl/inteface/busblaster.cfg", line 11

I am invoking the application with the following command (from inside the openocd source directory): openocd -f tcl/interface/busblaster.cfg -f tcl/board/ti_pandaboard.cfg

I first install openocd via apt-get and tried that with the same error.  I also tried compiling it from source and got the same error.  Running lsusb displays the following:

Code: [Select]
Bus 002 Device 005: ID 0403:6010 Future Technology Devices Internation, Ltd FT2232C Dual USB-UART/FIFO IC

dmesg shows the following:

Code: [Select]
usb 2-1.2: new high-speed USB device number 5 using ehci_hcd
usb 2-1.2: New USB device found, idVendor=0403, idProduct=6010
usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 2-1.2: Product: Dual RS232-HS
usb 2-1.2: Manufacturer: FTDI
ftdi_sio 2-1.2:1.0: FTDI USB Serial Device converted detected
usb 2-1.2: Detected FT2232H

Any ideas?
Title: Re: BusBlaster v3c setup problem on linux
Post by: tayken on February 25, 2014, 03:54:08 am
Can you post your busblaster.cfg file? Does it look like the one in http://dangerousprototypes.com/docs/Bus ... nOCD_guide (http://dangerousprototypes.com/docs/Bus_Blaster_OpenOCD_guide) ?
Title: Re: BusBlaster v3c setup problem on linux
Post by: engineereeyore on February 25, 2014, 03:14:43 pm
Yes.  I'm just using the default bus blaster configuration file that comes with the openocd source code.

Code: [Select]
interface ft2232
ft2232_device_desc "Dual RS232-HS"
ft2232_layout jtagkey
ft2232_vid_pid 0x0403 0x06010

I'm attempting to include some additional information, but the website says my "post looks too spumy for a new user, please remove off-site URLs", even though I have no URLs in my reply.  So I'll leave this post like this and add a few more comments with the remaining information.
Title: Re: BusBlaster v3c setup problem on linux
Post by: engineereeyore on February 25, 2014, 03:15:46 pm
I actually started over and tried setting this up on a new machine (my original was an offline machine with a somewhat old ubuntu repository) and I'm much further along now, but I'm still running into errors.  When I run my openocd command now, here's what I get:

Code: [Select]
Open On-Chip Debugger 0.8.0-dev-00361-gbc1340c (2014-01-10-15:25)
Licensed under GNU GPL v2
Info : only one transport option; autoselect 'jtag'
RCLK - adaptive
Using dpgbase = 0x80000000
force hard breakpoints
trst_only separate trst_push_pull
Warn : Unable to open FTDI Device tried: 'Dual RS232-HS' and 'Dual RS232-HS A'
Error: unable to open ftdi device: device not opened
Error: ListDevices: 2
Error: 0: "Dual RS232-HS A"
Error: 1: "Dual RS232-HS B"
in procedure 'init'

I checked dmesg again as saw that it still shows 'Detected FT2232H", so I tried changing my cfg file to 'interface ft2232h' just to see what would happen.  When it did that, it showed an error but printed the available interfaces.  It states:

Code: [Select]
Error: The specified debug interface was not found (ft2232h)
The following debug interfaces are available:
1: ft2232

Given that, I have to assume the driver is working and that the computer is detecting the bus blaster.  Any ideas?
Title: Re: BusBlaster v3c setup problem on linux
Post by: tayken on February 25, 2014, 07:59:38 pm
Your first output looks really similar to the one under "Example error if libftdi is not installed with libusb:" on the link I pointed you to. Do you have both installed?
Title: Re: BusBlaster v3c setup problem on linux
Post by: engineereeyore on February 25, 2014, 08:05:19 pm
You are correct; I had forgotten to install libftdi1 on my machine.  However, I am now back to the exact same problem I had before, only now on a second computer.
Title: Re: BusBlaster v3c setup problem on linux
Post by: tayken on February 25, 2014, 09:35:05 pm
Hmm, found a similar problem on a forum, it was caused by incorrect compilation, can you configure with
Code: [Select]
./configure --enable-ft2232_libftdi
then make & make install?
Title: Re: BusBlaster v3c setup problem on linux
Post by: engineereeyore on February 26, 2014, 01:08:25 am
No difference.  I tried compiling the code with those configuration settings, as well as with libftd2xx.  Both have resulted in the exact same behavior.  I will try out these instructions tomorrow and see what happens.

http://http://elinux.org/Compiling_OpenOCD_v0.7.0_on_Ubuntu_13.04
Title: Re: BusBlaster v3c setup problem on linux
Post by: engineereeyore on February 27, 2014, 04:17:19 pm
I have now tried two bus blaster boards, three different machines, and eight different sets of "setup" instructions, and I still can't get this to work.  I am making one last attempt with a Windows XP VM.  If that doesn't work, tincantools it is.
Title: Re: BusBlaster v3c setup problem on linux
Post by: tayken on February 27, 2014, 04:37:36 pm
One other thing that just popped in my mind. Have you tried starting openocd with sudo? Maybe there is some sort of permission issue.
Title: Re: BusBlaster v3c setup problem on linux
Post by: engineereeyore on February 27, 2014, 05:46:28 pm
Yes, I've been using the sudo.

After doing more digging, this may be an openocd problem.  I have tried this with two different pandaboards, ES revision B1 and B2.  I have tried using both the ti_pandaboard.cfg and ti_pandaboard_es.cfg files.  However, the omap4460.cfg file has a bug in it:

Code: [Select]
target create $_TARGETNAME cortex_a -chain-position $_CHIPNAME.dap 
  -coreid 0 -dbgbase $_dbgbase 

The value "cortex_a" is invalid and when you run openocd, it will give the following error:

Code: [Select]
Runtime Error: embedded:startup.tcl:20: Unknown target type cortex_a, try one of
 arm7tdmi, arm9tdmi, arm920t, arm720t, arm966e, arm946e, arm926ejs, fa526, feroceon, dragonite, xscale, cortex_m, cortex_a8, cortex_r4, arm11, mips_m4k, avr, dsp563xx, dsp5680xx, testee, avr32_ap7k,  or hla_target

This bug has been prevalent in many such config files and people have just gone in an set it to cortex_a8.  However, the OMAP 4460, used by the pandaboard es models, is a cortex_a9 processors, not a cortex_a8.  If this is the case, the omap4460.cfg file is useless as it doesn't contain the correct values, which would definitely explain the problems I am having.
Title: Re: BusBlaster v3c setup problem on linux
Post by: tayken on February 27, 2014, 06:53:18 pm
It's most of the time software. urJTAG is also problematic from time to time. The hardware is tested but software portion is not well maintained.

Just an idea:jtagkey.cfg file looks real similar to one we are using with bb. Maybe some people had the same problem. Maybe? Also there is a dp_busblaster.cfg file under interface/ftdi, that may work.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01062076256session_write_close ( )...(null):0
20.01092207832ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01092208608Database_MySQL->query( ).../DatabaseHandler.php:119
40.05602347328Database_MySQL->error( ).../Db-mysql.class.php:273