
robots, a new contributor to the Bus Pirate OpenOCD support effort, has taken charge and produced the first working toolchain. A patch for OpenOCD 0.3.0 that adds Bus Pirate support is here. The latest compatible OpenOCD firmware for the Bus Pirate is here, bootloader v4 required.
JTAG programming speed is a paltry 1.4kb/s, about a tenth the speed of a Wiggler. Due to the Bus Pirate’s slow serial port connection, there’s not a lot of room for improvement. We’re going to look at increasing the serial port speed and using interrupt-based data transfers to increase the speed.
We’re looking for additional testers and contributors, please let us know if it works for you.

Tags: OpenOCD
-
“JTAG programming speed is a paltry 1.4kb/s, about a tenth the speed of a Wiggler. Due to the Bus Pirate’s slow serial port connection…”
Wow… this caught me by surprise. Where’s the bottleneck here? If the PIC USART is supposedly best-case 1Mbps (and the RT232RL 3Mbps), is it that the 1Mbps is only a wet dream, the PC+driver can’t drive anything that fast, either BP batchmode or USBPROG is chatty, or there’s tons of emulation work to do? Even if the PIC could only be driven at 115kbps (~150 IPS/bit), there’s still almost two orders of magnitude there in the data rate, although the 10x difference between a parallel Wiggler and a serial substitute just about match-up (all other things being equal… yeah, right).
I’ll be the first to admit that I don’t know crap about JTAG (or USB, or Windoze drivers, or…) but I’m curious about where the bottleneck is (and in the Wiggler for that matter)…
-
JTAG is not flashing interface !
It is used to directly manipulate state of cpu, content of registers, memory, etc.
To write a flash you have to erase it first. And then write some registers to enable writing, and write the data, move to another page …So what the openocd does, it “emulates” the cpu, as if internal program was writing the flash. So your calculation is not correct :)
We are actually transferring ~200kB to BP and receiving ~100kB during the flashing process.
Please read the http://whereisian.com/forum/index.php?topic=223.msg2011#msg2011 post, where i do some calculations :)
-
-
Lets just say, that there is very little left from usbprog :) The main parts of openocd driver was rewritten, and many parts of BP firmware are not used, in favour of new parts.
I have done some calculation on where the bottleneck is on the forum
http://whereisian.com/forum/index.php?topic=223.msg2011#msg2011I have used the Ian’s base for the firmware (115200 baus UART) , There is a lot of room for optimalizations – faster Uart, interrupts routines,etc.
-
The JTAG part doesn’t take a lot of time, but sending (and receiving) the bytes through the serial port is pretty slow. Here’s robots’ take on the speed:
http://whereisian.com/forum/index.php?topic=223.msg2011#msg2011The protocol we adopted from another project is really simple and efficient, but we spend most of the time waiting around for a packet to arrive.
We hope to increase the baud rate and get better speed. 1Mbaud is the goal, but some PIC crystals might not be accurate enough to do that speed.
-
“…A patch for OpenOCD 0.3.0 that adds Bus Pirate support is here.”
There is nothing and in the mean time OpenOCD is either V0.3.1 or V0.4.0-rc1
What’s the actual status of the patch ? Where is it ?


6 comments
Comments feed for this article