Skip to main content
Topic: PiratePICprog rocks! (Read 3380 times) previous topic - next topic

PiratePICprog rocks!

For some reason my OLS's bootloader got mangled, causing me to perform a OLS-rescue operation. After several disappointing tries with the .NET application, I compiled the PiratePICprog and it worked instantaneously! It rescued my beloved OLS, which is now happily capturing again...!

I'm thinking about writing a new rescue-howto for the OLS. Maybe in a couple of days, as I'm now busy with other stuff (the OLS client).
when good software is not an alternative...

Re: PiratePICprog rocks!

Reply #1
another bus pirate rescue!

Re: PiratePICprog rocks!

Reply #2
I had problem with .NET too, and used PiratePICprog afterwards (BP was left in Bin mode). It worked on the first try.

Later I have replugged BP and There seems to be some trouble with the function that enters bin mode. It Does say error 20timer.

Other than that it is GREAT, and fast :)

Re: PiratePICprog rocks!

Reply #4
I wonder what was wrong with the old code (the same I use for OpenOCD, and seems more robust)

diff here

My code sends 20x 'zero', and reads/checks everything that comes back.

The new code just sends 1 zero at time, and waits for serial port timeout (1 sec). The correct reply wont come until 20 zeroes are transmitted. It take 20 seconds.

I should probably get into fixing that :-)


Re: PiratePICprog rocks!

Reply #5
[quote author="Sjaak"]
Good to know!

I believe there was a OLS rescue app, because some of the OLS left seeed without bootloader. Happy hacking!

Edit: ... er-rescue/

/me zwaait naar jan willem

That's the document I was talking about; it uses the .net app, but that seems not always the most reliable solution...

/me zwaait terug ;)
when good software is not an alternative...

Re: PiratePICprog rocks!

Reply #6
Here's the log message on my change, looks like the BBIO entry was changed because of stupid Windows tricks:

updated piratepicprog - added some missing argument processing. Made to changes
to serial port handling to get it to work under windows (this should be examined
closer). Tweaked the binmode entry routine. Includes windows.h for the Sleep

There's really no telling why I do some of the things I do though ;)

The .NET one should still work, but piratePICprog is massively superior. Maybe a later version of the .net client used a custom command that I changed in the firmware. I added queuing of commands and command packets to get a huge speed boost.

The current major bug in piratePICprog is that is doesn't know how to handle PIC config words for the <=18F chips. They are located at a really high address, with nothing in between, and it confuses the HEX parser (memory allocation) and programmer. >=18FJ with config words in flash work great.
Got a question? Please ask in the forum for the fastest answers.