RSS
 
 

BP Firmware Update

Updating the bus Pirate firmware from within Mac OS X

This firmware installation procedure is valid for installing  Bus Pirate firmware up to and including version V5.9 on to the V3x Bus Pirate hardware that utilises the V4.x boot-loader (NOTE!!, if your boot-loader firmware is pre 4.x you MUST update the boot-loader firmware first)

Previously, updating the bus pirate firmware or boot-loader was a bit more technically challenging, however since that time inroads have been made towards providing a  semi-user friendly update utility. (we say semi friendly because it still requires command line use, something many OS X users are not comfortable with)

Ze Plane … Ze Plane*

Please do not hold any fantasies that if your BP is not already working with your computer, attempting a firmware update is suddenly and magically going to solve all your problems.

It is simple…… If you BP will not communicate with your Mac system then please FIX that issue first.

(One exception to this case, is that you blew the update procedure and corrupted the internal firmware)

Requirements

1. A working Bus Pirate (BP) that is currently capable of connecting to your Mac computer via a suitable terminal program.

Visit the following link: Setting up BP under OS X

2. The latest firmware/Boot-loader,  we will get the correct firmware/Boot-loader code later in this written procedure.

3. The ability to fully read and understand the material presented, without rushing into it.

4. Understand and agree with the disclaimer, usually there will only be a problem if you do not follow the procedure.

The update Procedure

1. Ensure your BP is WORKING, connect it to the Mac  and fire up your trusty terminal program (ZTERM in this case).

Issue an ‘i’ {Return}

The result will be similar to the images shown below.

This screen image is for a  V4.2 firmware:
BP_connected_ and_working

The following screen image shows the firmware for version V5.6, interestingly we  see that the {return} key no longer causes Syntax errors.

Version 5.6

IDEANow a VERY handy tip:
Rather than continually trying too write down or memorize this information, just use  the  integral OS X ‘Grab’ utility to grab a section of the screen, then store the result in the  integral OS X Stickies application. (no mess, no fuss,no mistakes!!, plus the Stickies data persists during a crash even without saving it.)

After extracting the version information for the BP boot-loader and firmware we are now in a position to download the correct updates.

The latest Boot-loader/firmware is available at: Bus Pirate Firmware (*Note the firmware location is indicated in the BP manual ‘introduction’ section rather than under firmware)

From our screen captures above we can see  that we require:

BusPirate.firmware.v5.7.zip or later.

firmware_download

The BP firmware enjoys a very active development cycle, as a result the above screen shot will not be current for very long. Therefore a simple rule of thumb would be : if your BP firmware is less than v5.7 then start with and upgrade to version V5.7, you can always upgrade the boot-loader and firmware to a higher level later.

O.K so you have downloaded the BusPirate FIRMWARE package, (I’m not going to waste your time or my time explaining downloading or unzipping)

Dual Bootloader methods.

Firstly which ever method you choose, DO NOT try to update the bootloader Firmware using this procedure.

You can actually get into the boot-loader via two different methods, choose one method get it working then skip ahead to the relevant update section, don’t try to use both methods.

Personally I would go for method 2 ,because if you have a problem during upgrade then method 1 is no longer available and you end up having to use method 2 anyway. However for completeness I will show both methods.

METHOD 1. >Firmware v4.1+

Software_boot-loader

From the yellow  area you can see we enter the ‘$’ command followed by {Return}

The BP replies by either turning the ‘Mode’ LED on and printing the word ‘BOOTLOADER’ in the console window

or asking you to confirm “Are you sure?” (typing ‘y’ will give you the correct ‘ BOOTLOADER’ state)

STOP now go to Ensuring the program mode is functioning correctly section.

METHOD 2. Installing the programmer link (Failed firmware Update)

DISCONNECT THE BP FROM THE MAC , Failure to comply may damage your Mac and/or the BP.

1.  find a suitable Earthed metal surface and touch it during this procedure, it is critical to remove any static charge from your body during this next step.

2.Using a bent paper clip, old electronic component leg, install a TEMPORARY link as seen in the picture below, indicated by the yellow arrow.

note that we link over  PGC & PGD, this is necessary to facilitate programming of the protected boot-loader.

3. Re-connect the BP to the Mac

programmer link

Ensuring the program mode is functioning correctly.

From the following image we can see that both the PWR and the MODE LED’s are active on, the other LED’s should be OFF, this indicates the board has entered the programming mode correctly.

if either the MODE or PWR LED is OFF, then it means the above procedures were not followed correctly, immediately disconnect the BP from the computer and  re-execute the above instructions.

BP_PWR_MODE_LIGHTS

Once the LED’s are lit correctly proceed with the update.

UPDATE

We now have the BP in BOOTLOADER mode and can proceed  with Updating the Firmware

Quit any  ZTERM or other  communications program used to connect to the BP, since these programs lock the communications port they will cause the following update to fail.

Move the Bus pirate firmware update (BusPirate.firmware.vX.X.zip) to your Mac OS X boot volume , then extract at this location.

Inside the extracted folder will be an application called “pirate-loader_mac” , also within a folder called “BPv3&v2go” will be a Firmware file “BPv3-Firmware-xxxx.hex”

Note it says  “Firmware” NOT “Bootloader”.

Move/Copy  “BPv3-Firmware-xxxx.hex” to the SAME location as “pirate-loader_mac”

IDEA Now a second VERY handy tip: To save typing file paths,  if you ‘drag’ a folder/file to the  Terminal window, the full folder path will be inserted at the point of the cursor.

Next open the Terminal.app  Applications->Utilities-> Terminal.app

Set the user to “root” or other user that has execute privileges on the  pirate-loader_mac ,  then  “cd” to the  folder that contains “pirate-loader_mac”

cd /BusPirate.firmware.vx.x  (where x.x is the  version of the extracted firmware E.G  “cd /BusPirate.firmware.v5.7”)

Execute the following statement:

where:

xxxxxxx: is YOUR BP serial number  (in my case it is ‘A100eGIV’)

yyyyyyy: is the  revision of the firmware you want to install  (in my case it is ‘v5.7’)

./pirate-loader_mac –dev=/dev/tty.usbserial-xxxxxxx –hex=/BusPirate.firmware.yyyyyyy/BPv3-Firmware-yyyyyyy.hex

REAL WORKING EXAMPLE:

load_firmware

if you were sucessful you will see lots of update text scrolling by and finally:

final_FW

Now an important note here:

the “use screen” WILL NOT work, because the BP is still in  Boot-loader mode.

First we need to  UNPLUG the BP from the  USB cable and remove the programming link (if we used the method that required a programming link).

When we reconnect the BP the new firmware should be updated and will automatically kick in.

By using ZTERM and issuing the magic ‘i’ command we see the following:

were_ok_update

SUMMARY

That is basically it , we have updated the firmware to the latest revision  using the forgoing procedure.

* With apologies to Tattoo Fantasy island

Leave a Reply

 

*