5.9 and 5.10 firmware still no OpenOCD?

OpenOCD JTAG debugging with the Bus Pirate.

5.9 and 5.10 firmware still no OpenOCD?

Postby invisigoth » Sat Jan 22, 2011 1:08 am

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
invisigoth
Newbie
Newbie
 
Posts: 1
Joined: Sat Jan 22, 2011 1:05 am

Re: 5.9 and 5.10 firmware still no OpenOCD?

Postby ian » Sat Jan 22, 2011 1:13 am

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?
Got a question? Please ask in the forum for the fastest answers.
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: 5.9 and 5.10 firmware still no OpenOCD?

Postby Anunakin » Tue Feb 08, 2011 9:18 am

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

Re: 5.9 and 5.10 firmware still no OpenOCD?

Postby ian » Tue Feb 08, 2011 9:33 am

Hi anunakin -

THere's some guides and posts about it here:
http://dangerousprototypes.com/docs/Bus ... nd_OpenOCD
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: 5.9 and 5.10 firmware still no OpenOCD?

Postby robots » Tue Feb 08, 2011 12:21 pm

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"
Attachments
busPirate.production.zip
Fw
(50.52 KiB) Downloaded 2675 times
User avatar
robots
Hero Member
Hero Member
 
Posts: 569
Joined: Sat Dec 05, 2009 11:19 am
Location: CZ/Prague

Re: 5.9 and 5.10 firmware still no OpenOCD?

Postby omegat » Wed Mar 09, 2011 4:33 pm

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...
omegat
Newbie
Newbie
 
Posts: 14
Joined: Sat Sep 04, 2010 3:24 pm

Re: 5.9 and 5.10 firmware still no OpenOCD?

Postby robots » Thu Mar 10, 2011 2:15 pm

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.
User avatar
robots
Hero Member
Hero Member
 
Posts: 569
Joined: Sat Dec 05, 2009 11:19 am
Location: CZ/Prague

Re: 5.9 and 5.10 firmware still no OpenOCD?

Postby omegat » Sat Mar 12, 2011 3:53 pm

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?
omegat
Newbie
Newbie
 
Posts: 14
Joined: Sat Sep 04, 2010 3:24 pm

Re: 5.9 and 5.10 firmware still no OpenOCD?

Postby robots » Sun Mar 13, 2011 3:33 am

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.
User avatar
robots
Hero Member
Hero Member
 
Posts: 569
Joined: Sat Dec 05, 2009 11:19 am
Location: CZ/Prague

Re: 5.9 and 5.10 firmware still no OpenOCD?

Postby ian » Sun Mar 13, 2011 4:48 am

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.
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: 5.9 and 5.10 firmware still no OpenOCD?

Postby omegat » Sun Mar 13, 2011 9:07 am

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... ;)
omegat
Newbie
Newbie
 
Posts: 14
Joined: Sat Sep 04, 2010 3:24 pm

Re: 5.9 and 5.10 firmware still no OpenOCD?

Postby ian » Mon Mar 14, 2011 4:24 am

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.
User avatar
ian
Crew
Crew
 
Posts: 10803
Joined: Mon Jul 06, 2009 6:14 am

Re: 5.9 and 5.10 firmware still no OpenOCD?

Postby omegat » Mon Mar 14, 2011 8:42 am

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?
omegat
Newbie
Newbie
 
Posts: 14
Joined: Sat Sep 04, 2010 3:24 pm

Re: 5.9 and 5.10 firmware still no OpenOCD?

Postby roman3017 » Thu Mar 24, 2011 12:50 pm

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
roman3017
Newbie
Newbie
 
Posts: 8
Joined: Sun Mar 06, 2011 3:01 pm

Re: 5.9 and 5.10 firmware still no OpenOCD?

Postby omegat » Thu Mar 24, 2011 12:54 pm

Hm, I updated the pirate with this GUI-update-thingy... It worked fine.
omegat
Newbie
Newbie
 
Posts: 14
Joined: Sat Sep 04, 2010 3:24 pm

Next

Return to OpenOCD JTAG