I was wondering if there was something special needed to rebuild the firmware ?
I downloaded MPLAB and the C compiler evaluation, installed them. Then cloned the SVN and loaded the project file in source/ and build that. Then I tried flashing the output/busPirate.hex resulting of this but the loaded doesn't even want to load the .hex file ...
Yesterday I had to dump the NOR from a target with JTAG. It took about 8 hours to dump 64 Mo of flash. That's pretty long !
When looking at the jtag bus, I notices that it is currently the limiting factor. (the with 'fast' uart mode, the uart keeps up but is slowed down by the bit-banging).
The JTAG bus is aroung 100-125 kHz right now (with a very un-even duty cycle). I think that by using an optimized loop, we could bring that to 500 - 600 kHz. Which should provide a pretty nice speed up.
I haven't programmed PIC in a long time ... (back when the 16f84 was a new product), but I tried estimating what could be done by a quick look at the datasheet. Below is what I came up with (probably buggy but that's just to estimate the cycle count) :
Basically there would be several 'layers' of loop to avoid doing the uart test or handling #bits != 16 ... and you'd have one very fast function doing just the bit bang for a certain number of 16 bits words and for the 'end' and when uart flushes are needed, we'd just have an outer loop in C.
I just tried the OpenOCD with the v5 firmware ( BPv3-Firmware-v5.0.hex ) and it doesn't work (not even the IDCODE) Looking at it with a logic analyzer shows the the commands sent to the JTAG bus are correct, the TDO signal is correct on the bus but does _not_ match the bits received by openocd.
With the exact same setup and just reflashing to BPv3-Firmware-v4.2.OpenOCD.hex and things work fine.