
Update: Thanks to our testers we caught an early bug, a new update is now available for testing.
Last week we identified a shortcoming in the Bus Pirate bootloader. We’ve been working on an upgrade that will free space for more features, eliminate verify errors in the last page of memory, and fix the bootloader speed limitation on some PICs.
Three fantastic programmers contributed to the bootloader upgrade, going from bug identification to release candidate in about one week. Sjaak helped port the new bootloader to the Bus Pirate, and wrote an installer to make the upgrade process as safe as possible. Alexdresko made extensive updates to the bootloader GUI so we can release the firmware with pre-configured settings. Mikael Gustafsson, author of the ds30 Loader toolchain we’re using, added custom bootloader placement, error messages, and distribution configuration to the project for us.
We’re confident the bootloader upgrade will go smoothly, and don’t plan additional changes, so it’s time for a release candidate. We’d like to invite alpha testers with PIC programmers and Bus Pirate v2go or v3 to try the bootloader upgrade. Until we complete some initial testing, please do not upgrade unless you can restore the old bootloader with a PIC programmer. Upgrade instructions follow.
Overview
What we’re going to do is use the existing v2 bootloader and P24QP.exe application (or Python upload script) to upload a bootloader upgrader. The upgrader will erase and reprogram the correct parts of the PIC flash memory with the new bootloader. After the new bootloader is programmed, we’ll erase the installer and old bootloader by uploading a new Bus Pirate firmware.
Step 1. Download the upgrade package for v2go & v3
Please do not upgrade unless you can restore the old bootloader with a PIC programmer!!!
The upgrade package (v4.1) includes:
- Bootloader updater (BPv3-blupdater-v4.hex)
- V4 Bus Pirate firmware compatible with the new bootloader (BPv3-firmware-v4.hex)
- Application for v2 bootloader (P24QP.exe or P24qp.py)
- Application for v4 bootloader (ds30Loader.exe)
Note that Bus Pirate v2go and v3 now use the same bootloader and firmware. Do not use this upgrade with v2a, v1a, or va.
Step 2. Load the bootloader upgrader

Please do not upgrade unless you can restore the old bootloader with a PIC programmer!!!
Upload ‘ BPv3-blupdater-v4.hex’ to the PIC with the existing v2 bootloader. The v2 bootloader is programmed in every Bus Pirate ever sold by Seeed, Fundamental Logic, Sparkfun, and eBay sellers. Use your normal upgrade procedure for the v2 bootloader (Windows, Linux, OSX).
Step 3. Run the updater

Please do not upgrade unless you can restore the old bootloader with a PIC programmer!!!
Run the upgrader to program the new bootloader to the correct parts of the PIC flash memory.
- Remove any jumper between the PGD and PGC pins used for the previous step and plug in the Bus Pirate.
- Open a terminal and press <enter> to see the updater greeting. Type ‘yes’ to start the upgrade, any other key cancels and repeats the updater greeting.
- The update will only take a fraction of a second, but be sure the Bus Pirate doesn’t lose power or it could be bricked.
The upgrader will erase and write a few memory locations. When the update is complete, the MODE LED will blink and the upgrader will prompt you to upload a v4+ firmware with ds30 Loader.
Step 4. Upload v4+ firmware with ds30 Loader

To complete the upgrade, install a v4+ firmware with the ds30 Loader application. Only firmware v4+ is compiled to work with the v4 bootloader.
- Unplug the Bus Pirate (if connected), place a jumper between the PGC and PGD pins, and plug it in. The MODE LED should be on.
- Start the ds30 Loader application, it should work on Windows, as well as Linux and Mac with Mono. It will start preconfigured for the Bus Pirate based on the default settings in settings.xml.
- Set the correct serial (COM) port for your Bus Pirate. The available ports on your system may be auto-detected.
- Select ‘BPv3-Firmware-v4.hex’ with the ‘Hex-file’ dialog box.
- Press the ‘Download’ button to flash the new firmware to the Bus Pirate. The update should only take a few seconds.
- When the update is complete, remove the programming jumper and reset the Bus Pirate (unplug and plug it in again).
The upgrade is complete. For future firmware upgrades, repeat this step.
V2go note: after the upgrade to bootloader v4, placing the upgrade jumper between PGC and GND will also activate the bootloader.
Step 5. Verify the upgrade

If the upgrade went without errors, connect with a terminal and verify that the upgrade was successful. The version string should report v4+.Please let us know if you attempted the upgrade.
Tags: bootloader, upgrade
-
Upgrade done, BPv3a SEP 2009 (from Seeed Studio).
Self test (~) passed.
Zero problems :-)Metis
-
I found a small bug in the upgrader and also changed the dialogs a bit (ian released it quicker then I thought) the new one can be found in the svn at /trunk/bootloader-v4/upgrader/upgradeBL.hex . the bug isn’t very big and should not break anything, also the dialog is a bit enhanced (you need to type ‘Yes’ exactly to reprogram it). I think Ian will update the .zip soon
-
Failed at Step 4. BPv3a.
Step 3 produced the expected text and ended with mode led blinking.
Step 4 failed by timing out looking for the boot loader. the mode led is on.When I plug in the bp, I can see a few brief flashes of the USB activity led.
The bp now seems unresponsive in terminal programs, with or without the jumper fitted.
Fitting a jumper after the bp was powered causes the mode led to light, removing it does not cause it to go out. Sending some serial data with the jumper removed will cause the mode led to go out.
Strange, anything else you’d like to be tried?
-
“Fitting a jumper after the bp was powered causes the mode led to light, removing it does not cause it to go out. Sending some serial data with the jumper removed will cause the mode led to go out.”
I believe that is normal behavior for a blank chip with bootloader. After a few key presses the bootloader reports and error and exits. After putting the jumper on (MODE LED lights), are you able to connect with the bootloader?
-
Hi Ian, hi all!
Same error (timeout in Step4) here… :-(
And no, even after going to bl _after_ insertion (jumper on after power-on), there is no connection possible via P24QP nor via ds30loader!
It seems as if i’ve to lookup my (old) ICD in the Attic this evening ;-)
But nevertheless thank you all for your efforts with BP and the fine firmware!
System was (native) Win XP SP3 albeit I’m working under Linux. (I didn’t wanted to setup Mono here…)
(Or is there anything I could try without ICD? If you prefer you may reach me via PM.)
Salut, Jörg
-
-
-
Hello Ian
I have same problem Ian Barnes have. Running XP SP3. No problem with other procedure updates. I tryed 3 times, with same result. -
It turned out to be a baud rate error on some chips. I’ve tested and verified the fix, can you please try to upgrade again using this update package (also relinked above):
http://code.google.com/p/the-bus-pirate/downloads/detail?name=v2tov4-bootloader-update.vb.zip -
I read the forum.
I tried your link, but mine does not work anyway. Same problem: Time out searching bootloader. -
Yes, I revert to old bootloader and loaded v3.6 firmware. (tested).
Then I used your new package, without succes/changes.
Next coffee break I dump it and post in the forum… -
No Ian, don’t worry! I need a very large cup of coffee!
I downloaded your new package, but loaded your previous bootloader (alpha 0.1).
After the coffe break, I repeat all things and I see “alpha 0.2″ that wrote “I’m stupid” on my face.This time all is working fine.
Thanks!
-
Update succeeded, everything still working ;-)
-
Works for me! Thanks for the fine work, guys.
-
Added protection to the jump instruction if the loader app is misconfigured.
New firmware for v2 to v4 updates:
http://code.google.com/p/the-bus-pirate/downloads/detail?name=v2tov4-bootloader-update.vc.zipIf you’ve already updated, grab the full bootloader firmware and program it with a PICKIT or ICD:
http://code.google.com/p/the-bus-pirate/downloads/detail?name=BusPirate.firmware.v4.0.vc.zip -
When I try to “find bootloader” I get:
Searching for bl . . . . . . . . . . . . . . . .
Found dsPIC30F3011 fw ver. 9.9.9
Wrong pic detected(13)/selected(212), aborting?! (should I flash 4.4 bootloader using pickit?)
-
Hi Ian,
it had 4.3 bootloader on board but when I booted it I was unable to upgrade firmware nor bootloader … I then flashed 4.4 bootloader using pickit and uploaded firmware v5 using pirate-loader.exe as ds30\ Loader\ GUI.exe did not want to perform (but it did recognise the bootloader after I flashed the 4.4 in). So – problem solved :) now I’m out to play with it to see what it can do :)


31 comments
Comments feed for this article