Page 1 of 2

5.9 and 5.10 firmware still no OpenOCD?

PostPosted: Sat Jan 22, 2011 1:08 am
by invisigoth
OpenOCD seems to be able to detect the 5.8 firmware (as discussed in a previous thread).  Are there any plans for a new release which will have the OpenOCD code reactivated?  I can confirm that neither 5.9 or 5.10 seem to detect correctly...  If you need testing I'd be happy to help ;)

-visi

Re: 5.9 and 5.10 firmware still no OpenOCD?

PostPosted: Sat Jan 22, 2011 1:13 am
by ian
Hi invisigoth - as far as I know, OpenOCD should be active in the latest firmware. There was one version some time ago where it was broken, but I don't think anyone removed it.

Can you please share the output of a good and bad attempt?

Re: 5.9 and 5.10 firmware still no OpenOCD?

PostPosted: Tue Feb 08, 2011 9:18 am
by Anunakin
How to use it?
I must put BPv3 on mode JTAG and try "openocd -f interface/buspirate.cfg -f board/pic-p32mx.cfg" ?

Re: 5.9 and 5.10 firmware still no OpenOCD?

PostPosted: Tue Feb 08, 2011 9:33 am
by ian
Hi anunakin -

THere's some guides and posts about it here:
http://dangerousprototypes.com/docs/Bus ... nd_OpenOCD

Re: 5.9 and 5.10 firmware still no OpenOCD?

PostPosted: Tue Feb 08, 2011 12:21 pm
by robots
Hi, attached is fw built from svn with Openocd support enabled.

The latest openocd git has some fixes in the config file parsing for buspirate. You will probably need to change the port of buspirate in your config file.

your config file:

buspirate_port /dev/ttyXXX
source [find interface/buspirate.cfg]
source [find board/pic-p32mx.cfg]


And run openocd as:
openocd -f ./openocd.cfg -c "init"

Re: 5.9 and 5.10 firmware still no OpenOCD?

PostPosted: Wed Mar 09, 2011 4:33 pm
by omegat
Hi,

I have a similar problem - I got the openOCD 0.5-dev sources via git and compiled it with --enable-buspirate - which worked.
OpenOCD can connect to the buspirate (as a test - without hardware config file, because I haven't found a suitable (and working) one yet - LPC2138). But then openOCD quits maybe 5 seconds later...

Code: Select all
Error: Buspirate error. Is is binary//OpenOCD support enabled?


When I start openOCD the buspirate's MODE-LED turns on.
I use the 5.10-BP-Firmware with a custom openOCD compile on a virtual (and thus extremely slow) Ubuntu 10.10-install on a WinXP-Host (using VirualBox).
I tried this as a workaround of the Windows-problem; but since openOCD has a network-interface, it should work....

The question is: Is this error a result of the lacking device-spec or is there some more serious issue?

-> I changed the port-spec in the buspirate-conf-file to /dev/ttyUSB0, which corresponds to the buspirates usb/uart-bridge.
What is not working is the vreg-setting, as far as I tested this.

The buspirate/openOCD explanations and tutorials are extremely weak; maybe some of you pros out there should write a wiki page? - I would really really appreciate that :)

I'll keep trying...
Tobi

[EDIT]
I got a halfway working device config file ...
output is now:
Code: Select all
tobi@tobi-VirtualBox:~$ openocd -f buspirate.cfg -f lpc2138.cfg
Open On-Chip Debugger 0.5.0-dev-00783-g0123985 (2011-03-07-23:25)
Licensed under GNU GPL v2
For bug reports, read
   http://openocd.berlios.de/doc/doxygen/bugs.html
Warn : Adapter driver 'buspirate' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
srst_only separate srst_gates_jtag srst_open_drain
trst_and_srst srst_pulls_trst srst_gates_jtag trst_push_pull srst_open_drain
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
Warn : use 'lpc2138.cpu' as target identifier, not '0'
dcc downloads are enabled
fast memory access is enabled
Error: Error reading data
Error: Buspirate error. Is is binary//OpenOCD support enabled?
tobi@tobi-VirtualBox:~$


Sorry, I forgot the reading error earlier...

I doubt it is the config...
Might be a device handthrough problem... but the mode-led lights up as soon as I hit return...

Re: 5.9 and 5.10 firmware still no OpenOCD?

PostPosted: Thu Mar 10, 2011 2:15 pm
by robots
Have you tried the Firmware from my earlier post ? (it is attached to the post)

There is some tutorial on my blog (link somewhere in my profile)

But I still think you got problem with FW.

Re: 5.9 and 5.10 firmware still no OpenOCD?

PostPosted: Sat Mar 12, 2011 3:53 pm
by omegat
hi,

thanks, robots!

I loaded your firmware (ver. 6 according to the i-option), for which my fresh-out-of-the-oven cygwin-openocd has the following to say:
fw6.jpg

(with no target connected) (seems like it would work)

When I try the actual 5.10-Version I get the same error as I got above, which would imply that there is no jtag-support on 5.10 (and on 5.9-extras which I tested as well).

What do you think?

Re: 5.9 and 5.10 firmware still no OpenOCD?

PostPosted: Sun Mar 13, 2011 3:33 am
by robots
The OpenOCD support is commented in the SVN. I don't know why, it might be some space saving, but I let Ian decide :)

I can fix the svn myself, but I don't want to break other stuff. For now, the Fw that is posted above is the temporary fix.

Re: 5.9 and 5.10 firmware still no OpenOCD?

PostPosted: Sun Mar 13, 2011 4:48 am
by ian
As far as I know openOCD support is in 5.9 and at least 5.10. If it is commented in SVN it is probably for development reasons, but should not be removed from an actual release as far as I know.

Re: 5.9 and 5.10 firmware still no OpenOCD?

PostPosted: Sun Mar 13, 2011 9:07 am
by omegat
Hm I got the latest 5.10-package from sourceforge...
Could you post a compile with uncommented jtag for testing? Maybe like a 5.10+ -Version?
I am not into pics and thus I don't have any compilers...

I keep testing my buspirate/LPC2138-Setup here - seems like I messed up my cable...

@Ian ... What do you think about combining the Buspirate and the Busblaster (v2) to some kind of Superblaster? (-> but keeping them as seperate products too)
You could use the 2. FT2232-Output as uart-bridge and it would bring the benefits of both tools - versatility from the pirate and speed from the ft2232.
I like the buspirate as much as my trusty usbProg but they both have the same problem: When it comes to JTAG-programming/debugging they are dead slow.
Just an idea... ;)

Re: 5.9 and 5.10 firmware still no OpenOCD?

PostPosted: Mon Mar 14, 2011 4:24 am
by ian
If it isn't in the current release, then it is definitely in the archive robots posted above:
viewtopic.php?f=27&t=1702&view=unread&sid=2e92fb9d4306d7c13fcf4254661f4012#p17536

That is actually a very interesting idea. It would be quite expensive.

Re: 5.9 and 5.10 firmware still no OpenOCD?

PostPosted: Mon Mar 14, 2011 8:42 am
by omegat
Well, robots's firmware image is working with my cygwin-openOCD (sorry I forgot to mention that I was testing against it); 'i' lists it as 6.0RC:

Code: Select all
HiZ>i
Bus Pirate v3b
Firmware v6.0RC (r572)  Bootloader v4.2
DEVID:0x0447 REVID:0x3043 (24FJ64GA002 B5)
http://dangerousprototypes.com
HiZ>


So that would prove that 5.10 and 5.9 do not come with jtag. ...or am I wrong?

... I would pay 80€ for that tool. (even more if you would implement AVR-ISP MK2 functionality... ;) )
And... think what you could do with a Buspirate and a CPLD / FPGA...
Should I post this on the idea / suggestion forums?

Re: 5.9 and 5.10 firmware still no OpenOCD?

PostPosted: Thu Mar 24, 2011 12:50 pm
by roman3017
I have the same problem as described by others:

Code: Select all
$ src/openocd tcl/interface/buspirate.cfg
Open On-Chip Debugger 0.5.0-dev-00807-gdec80e1 (2011-03-24-09:39)
Licensed under GNU GPL v2
For bug reports, read
   http://openocd.berlios.de/doc/doxygen/bugs.html
Warn : Adapter driver 'buspirate' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
srst_only separate srst_gates_jtag srst_open_drain
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
adapter_nsrst_delay: 300
jtag_ntrst_delay: 200
RCLK - adaptive
Error: Error reading data
Error: Buspirate error. Is is binary//OpenOCD support enabled?


My firmware version is:
Code: Select all
HiZ>i
Bus Pirate v3b
Firmware v5.10 (r559)  Bootloader v4.4
DEVID:0x0447 REVID:0x3043 (24FJ64GA002 B5)
http://dangerousprototypes.com


So I downloaded the posted firmware and got this error:
Code: Select all
./pirate-loader_lnx --dev=/dev/ttyUSB0 --hex=busPirate.production.hex
+++++++++++++++++++++++++++++++++++++++++++
+ Pirate-Loader for BP with Bootloader v4 +
+++++++++++++++++++++++++++++++++++++++++++

Parsing HEX file [busPirate.production.hex]
Checksum does not match, line 4
Could not load HEX file, result=-1


Is there anything wrong with my firmware upgrade process?
Thanks,

Roman

Re: 5.9 and 5.10 firmware still no OpenOCD?

PostPosted: Thu Mar 24, 2011 12:54 pm
by omegat
Hm, I updated the pirate with this GUI-update-thingy... It worked fine.