Bus Pirate - Community Firmware 7.0

Bus Pirate firmware and hardware development.

Re: Bus Pirate - Community Firmware 7.0

Postby USBEprom » Sun Sep 24, 2017 8:49 am

Hi guys.
User megafix has recently fixed the problem while enter in bootloader mode by issuing command "$" on Bus Pirate v3 (viewtopic.php?f=28&t=619#p67037 , viewtopic.php?f=28&t=8498&start=60#p67043 , https://github.com/BusPirate/Bus_Pirate/issues/38 , https://github.com/BusPirate/Bus_Pirate/issues/58).
megafix kindly sent me the hexadecimal file he has obtained by compiling the new v4.5 version of the bootloader that fixes the problem and me by using it I set up a pre configured environment to make it easy to upgrade to the v4.5 bootloader on Bus Pirate v3.
Inside the compressed archive are also provided instructions and documents on how to use the whole package.
I used pirate-loader.exe on Windows for it, pirate-loader.exe is a multi platform tool which works on Linux, Apple and Windows machines, and the thing works without any problem for me.
In the same way it should be working also with ds30_Loader_GUI but I have not tested that even because there is currently a license issue with it (https://github.com/BusPirate/Bus_Pirate/issues/64).
Anyway, in the end I have checked the whole thing with ds30_Loader_GUI and I confirm it works equally the same without any problems.

DISCLAIMER
First to attempt to use this pre configured environment you have to paying much attention to the fact that you might damage your Bus Pirate v3 or whatever!
Users should follow the instructions for bootloader update carefully because in case of failure they would lose access to the device by serial programming.
It should still be possible to fix the matter but it will take specific tools as for instance PICKit programmer/debugger and so much skill, hence be very careful!
For me it works but you use it at your own risk.
Neither I nor anyone else take the responsibility about the possibility of damaging your Bus Pirate v3 or whatever!
Neither I nor anyone else will be held responsible for anything!
I repeat, you use it at your own risk and only under your own responsibility!
It is need follow the instructions for bootloader update carefully and by doing it you must to assume all the responsibility for your action.
For this reason the archive which contains the pre configured environment is password protected.
The password is:

WARNING_UNSAFE_DISCLAIMER

all uppercase.
You have to insert it in order to unpack the content.
By doing it you must to assume all the responsibility for your action.
You use it at your own risk and only under your own responsibility, neither I nor anyone else take the responsibility about the possibility of damaging your Bus Pirate v3 or whatever!


The firmware provided with the archive is the latest release I built, the version SAFE_16072017_1.hex.
If you wish you can replace it with any other release for the Bus Pirate v3, this will not alter the bootloader you have just uploaded.


Thanks a lot to megafix for having built and provided the necessary, thank you Sir!

Please note that the package is a 7z (7zip) archive because the maximum allowed size in the forum is 1 MiB.

Be seeing you.

U.Sb

Improved version with better instructions here:
viewtopic.php?f=28&t=8498&p=67056#p67127
Attachments
BPv3-bootloaderv4xtov45-update-vb.7z
Upgrade package for the Bus Pirate v3 to bootlader 4.5
(807.78 KiB) Downloaded 235 times
Last edited by USBEprom on Tue Oct 31, 2017 2:41 pm, edited 2 times in total.
USBEprom
Full Member
Full Member
 
Posts: 202
Joined: Wed Mar 14, 2012 4:09 pm

Re: Bus Pirate - Community Firmware 7.0

Postby joeblack » Sun Sep 24, 2017 2:53 pm

Thank you both, new bootloader works fine.
--joeblack
joeblack
Newbie
Newbie
 
Posts: 8
Joined: Sat Oct 15, 2016 5:23 pm

Re: Bus Pirate - Community Firmware 7.0

Postby USBEprom » Mon Sep 25, 2017 2:23 pm

Thanks to you joeblack for sharing your result!

Be seeing you.

U.Sb
USBEprom
Full Member
Full Member
 
Posts: 202
Joined: Wed Mar 14, 2012 4:09 pm

Re: Bus Pirate - Community Firmware 7.0

Postby USBEprom » Mon Sep 25, 2017 4:06 pm

Hi guys.
For Windows users here attached is a new pre configured environment that allows anyone to easily upgrade firmware on the Bus Pirate.
It can be use with minimal changes simply by drag and drop the wanted firmware.
Inside the archive are also provided instruction on how to use the whole thing.

Be seeing you.

U.Sb
Attachments
UPGRADE_FW.zip
Tool for easy firmware upgrade for the Bus Pirate
(130.88 KiB) Downloaded 179 times
USBEprom
Full Member
Full Member
 
Posts: 202
Joined: Wed Mar 14, 2012 4:09 pm

Re: Bus Pirate - Community Firmware 7.0

Postby BDMaster » Tue Oct 24, 2017 2:29 am

Hi USBEprom,
I updated my Bus Pirate V3.6 (internal say 3.b and I don't know why) and now I cannot see the Bootloader version (Bootloader V4.5) like before about 4.4 version.
It works both ... Bootloader and Firmware 7.1 (safe verdion) so far but I saw this difference and I am afraid that something is gone wrong during the update.
What do You mean and could suggest to me to do ?
Many thanks to all af You friends for the time and efforts to get live this project ! (Kallist5, Agatti, USBEprom, Marsfan, ecc.)
With regards
BDMaster
Newbie
Newbie
 
Posts: 6
Joined: Tue Oct 24, 2017 2:15 am

Re: Bus Pirate - Community Firmware 7.0

Postby BDMaster » Tue Oct 24, 2017 1:55 pm

Ok ... I tried again using a PICkit3 as described into manual, after I used the pirate-loader.exe to write the
firmware :

1) PICkit3 writes Bootloader v.4.5 (all ok verifing)
2) Pirate-loader.exe writes Firmware v.7.1_1 (SAFE version) gettin Error 50

I got anyway the error 50 on last block as many as tests I have done !

This is the dump from CLI :

Erasing page 41, a400...OK
Writing page 41 row 328, a400...OK
Writing page 41 row 329, a480...OK
Writing page 41 row 330, a500...OK
Writing page 41 row 331, a580...OK
Writing page 41 row 332, a600...OK
Writing page 41 row 333, a680...OK
Writing page 41 row 334, a700...OK
Writing page 41 row 335, a780...OK
Erasing page 42, a800...ERROR [50]

Error updating firmware :(last page ...

Any suggestions ?
Thanks
BDMaster
Newbie
Newbie
 
Posts: 6
Joined: Tue Oct 24, 2017 2:15 am

Re: Bus Pirate - Community Firmware 7.0

Postby USBEprom » Tue Oct 24, 2017 3:20 pm

Hi BDMaster.
I am really sorry for the problem you are facing.
Actually that error message does not mean that something is wrong with the firmware.
More than a matter of bootloader it is a issue with pirate-loader or related tools.
Please read here:

viewtopic.php?f=28&t=8498&start=15

and especially these with careful:

viewtopic.php?f=28&t=8498&start=15#p65317

https://github.com/BusPirate/Bus_Pirate ... -248103673

https://github.com/BusPirate/Bus_Pirate ... -273879409

For what I know firmware 7.0/7.1 are working without issue on hardware Bus Pirate v3b.
About this take a look at what pixeldoc2000 wrote on day December 27, 2017:

https://github.com/BusPirate/Bus_Pirate/issues/7

Here too is discussed about support for Bus Pirate v3b:

https://github.com/BusPirate/Bus_Pirate/issues/48

The new revision v7.x seems to work even with hardware revision Bus Pirate v2go.

However for what I understand the main problem is that you can not retrieve the hardware revision and the bootloader version of your Bus Pirate while performing command "i" from the terminal.
I understand that actually hardware revision of your Bus Pirate is v3.6 but the terminal shows 3.b as well as the bootloader version is no longer displayed.
Can you confirm?
In my case with my Bus Pirate v3.6 and bootloader v4.5 while performing the command "i" the terminal shows what follow .:

i
Bus Pirate v3.5
Community Firmware v7.1 - goo.gl/gCzQnW [HiZ 1-WIRE UART I2C SPI 2WIRE 3WIRE KEYB LCD PIC DIO] Bootloader v4.5
DEVID:0x0447 REVID:0x3046 (24FJ64GA00 2 B8)

http://dangerousprototypes.com
HiZ>

Could you please post the output of your terminal by running the "i" command?
What terminal are you using?
What is the operating system you are working with?
Thanks.
One thing you can try in order to verify the matter is to replace the previous version of the firmware your Bus Pirate had before the update.
Do you remember what version was it?
Another important thing that could be useful to know and evaluate is the silicon revision of the PIC used on your Bus Pirate.
Mine has the B8 [(24FJ64GA00 2 B8)] (https://github.com/BusPirate/Bus_Pirate/issues/39).
That of yours?
Thanks.

Be seeing you.

U.Sb
USBEprom
Full Member
Full Member
 
Posts: 202
Joined: Wed Mar 14, 2012 4:09 pm

Re: Bus Pirate - Community Firmware 7.0

Postby BDMaster » Wed Oct 25, 2017 6:36 am

Hi USBeprom,
I want to thank You for your quickly answer and say that I found very usefull your help !
So i did all procedure using the Firmware v.6.1 always on Bootloader v.4.5 irmware v.7.1.
I programmed using PICkit3 the bootloader v.4.5 and the using the Bootloader programmed
the firmware setting the bootloader mode by terminal and $.
On Firmware v.6.1 all ok without error, but on Firmware v.7.1 I got again Error 50.
Now I can read this while performing command "i" from the terminal :


HiZ>i
Bus Pirate v3.5
Community Firmware v7.1 - goo.gl/gCzQnW [HiZ 1-WIRE UART I2C SPI 2WIRE 3WIRE KEYB LCD PIC DIO] Bootloader v4.5
DEVID:0x0447 REVID:0x3046 (24FJ64GA00 2 B8)
http://dangerousprototypes.com
HiZ>

So It seems that It's Ok ?
Have You some suggestions about how to use to read/write Eeprom chips by Flashrom tool ?
How can I use the BPv3 as JTAG ?
Unfortunately, I didn't find a lot of tutorials on BPv3 and I am doing tests continuosly using Pomona Soic Clip,
but results are strange as files I got are filled zeros alternating a concrete hex data, so I think are broken.
Thanks again for your courtesy and help and I will wait for your reply !
BDMaster
Newbie
Newbie
 
Posts: 6
Joined: Tue Oct 24, 2017 2:15 am

Re: Bus Pirate - Community Firmware 7.0

Postby BDMaster » Wed Oct 25, 2017 2:11 pm

Hi ... a little update ... I made shorters wires and now It seems working well !
I have read an SPI Eeprom MX25L1605D and verified data, so that was the issue, but wires have to
be very short (15 cm) :(
Now I will try to write too on the chip !
Regards
BDMaster
Newbie
Newbie
 
Posts: 6
Joined: Tue Oct 24, 2017 2:15 am

Re: Bus Pirate - Community Firmware 7.0

Postby USBEprom » Wed Oct 25, 2017 3:02 pm

Hi BDMaster.
I am really very glad to read that you have managed to fix it.

BDMaster wrote:but on Firmware v.7.1 I got again Error 50.


Actually "Error 50" it is not a problem at all as it is explained here:

viewtopic.php?f=28&t=8498&start=15#p65317

https://github.com/BusPirate/Bus_Pirate ... -248103673

https://github.com/BusPirate/Bus_Pirate ... -273879409

Erasing page 42, a800...ERROR [50]

Error updating firmware :(


Based on explanation of agatti and others, it is not a real problem!


BDMaster wrote:HiZ>i
Bus Pirate v3.5
Community Firmware v7.1 - goo.gl/gCzQnW [HiZ 1-WIRE UART I2C SPI 2WIRE 3WIRE KEYB LCD PIC DIO] Bootloader v4.5
DEVID:0x0447 REVID:0x3046 (24FJ64GA00 2 B8)
http://dangerousprototypes.com
HiZ>

So It seems that It's Ok ?


That means you have succeeded fully, it is exactly the same as mine I wrote yesterday for my Bus Pirate v3.6, bootloader v4.5.
Congratulations, well done!
I confirm that all it is ok as it is supposed to be.


BDMaster wrote:Have You some suggestions about how to use to read/write Eeprom chips by Flashrom tool ?


For what I know flashrom does only works with SPI flash, but it does that without any problem, just start the program and it does all the hard work.
I use it on Windows without any trouble.

Instead in order to manage I2C Eeprom it is need I2C protocol hence it is possible to use native commands inside the Bus Pirate or by scripting using something like I2CEEPROMWIN (viewtopic.php?f=4&t=8763).
Please read carefully what I wrote about I2CEEPROMWIN just in the case you choose it.
I know little about these things, sorry.


BDMaster wrote:How can I use the BPv3 as JTAG ?


Even this I do not know it very well, sorry.
My only suggestion is to use OPENOCD

viewtopic.php?f=4&t=8629

BDMaster wrote:Unfortunately, I didn't find a lot of tutorials on BPv3 and I am doing tests continuosly using Pomona Soic Clip,
but results are strange as files I got are filled zeros alternating a concrete hex data, so I think are broken.


Pomona Soic Clip are great, as general rule all the Pomona adapters are great value.
Luckily in the end I have read you succeeded also with it, very well!

Be seeing you.

U.Sb
USBEprom
Full Member
Full Member
 
Posts: 202
Joined: Wed Mar 14, 2012 4:09 pm

Re: Bus Pirate - Community Firmware 7.0

Postby USBEprom » Wed Oct 25, 2017 3:34 pm

Hi guys.
Here is an improved version, better instructions, of the package BPv3-bootloaderv4xtov45-update-vb.7z for upgrading to v4.5 the bootloader of the Bus Pirate v3.
This is the final version that covering Linux, Windows and Apple.
Same as the previous (viewtopic.php?f=28&t=8498&start=75) but extended instructions, the archive password is also unchanged.

DISCLAIMER
First to attempt to use this pre configured environment you have to paying much attention to the fact that you might damage your Bus Pirate v3 or whatever!
Users should follow the instructions for bootloader update carefully because in case of failure they would lose access to the device by serial programming.
It should still be possible to fix the matter but it will take specific tools as for instance PICKit programmer/debugger and so much skill, hence be very careful!
For me it works but you use it at your own risk.
Neither I nor anyone else take the responsibility about the possibility of damaging your Bus Pirate v3 or whatever!
Neither I nor anyone else will be held responsible for anything!
I repeat, you use it at your own risk and only under your own responsibility!
It is need follow the instructions for bootloader update carefully and by doing it you must to assume all the responsibility for your action.
For this reason the archive which contains the pre configured environment is password protected.
The password is:

WARNING_UNSAFE_DISCLAIMER

all uppercase.
You have to insert it in order to unpack the content.
By doing it you must to assume all the responsibility for your action.
You use it at your own risk and only under your own responsibility, neither I nor anyone else take the responsibility about the possibility of damaging your Bus Pirate v3 or whatever!


The firmware provided with the archive is still the latest working release I built, the version SAFE_16072017_1.hex.
If you wish you can replace it with any other release for the Bus Pirate v3, this will not alter the bootloader you have just uploaded.

Thanks a lot to megafix for having built and provided the necessary, thank you Sir!

Please note that the package is a 7z (7zip) archive because the maximum allowed size in the forum is 1 MiB.

Be seeing you.

U.Sb
Attachments
BPv3-bootloaderv4xtov45-update-vb_final.7z
Improved final release of the upgrade package for the Bus Pirate v3 to bootlader 4.5
(457.77 KiB) Downloaded 210 times
USBEprom
Full Member
Full Member
 
Posts: 202
Joined: Wed Mar 14, 2012 4:09 pm

Re: Bus Pirate - Community Firmware 7.0

Postby BDMaster » Sat Oct 28, 2017 4:33 am

Hi USBEprom,
You are GREAT !!!
Many thanks for all your efforts to help all of us ...
BDMaster
Newbie
Newbie
 
Posts: 6
Joined: Tue Oct 24, 2017 2:15 am

Re: Bus Pirate - Community Firmware 7.0

Postby BDMaster » Tue Nov 07, 2017 4:03 pm

Hi USBeprom,
I am using new firmware but I got this :

(1)>2
Clutch disengaged!!!
To finish setup, start up the power supplies with command 'W'
Ready
SPI>W
POWER SUPPLIES ON
Clutch engaged!!!
SPI>[0x9f r r r]
/CS ENABLED
WRITE: 0x9F
READ: 0xC2
READ: 0x20
READ: 0x14
\CS ENABLED
SPI>

<i don't know if it's normal the last replay \CS ENABLED (I remember that it would to be /CS DISABLED ???

Following this guide :

here is explained how the Bus Pirate manage its pull-ups.
As stated in the document the pull-ups are only on MOSI, CLOCK, MISO and CS.
Another point is that it is not recommended provide power supply voltage throught a pull-up resistor as you did for the whole chip.
The right connections should be these:

Bus Pirate MX25L6406E
CS<-------------->CS#
MISO<-------------->SO/SIO1
VCC<-------------->WP#
GND<-------------->Vss(GND)
MOSI<-------------->SI/SIO1
CLK<-------------->SCLK
Vcc<-------------->HOLD#
Vcc<-------------->Vcc

Course you need to choose +3,3V like power supply voltage due the fact the chip isn't +5V tolerant.
Better should be provide the Vcc to WP# and HOLD# through limitation resistors (something like 10kohm should be OK) but also connecting them together isn't bad also because of the safety specifications of the Bus Pirate's power supply stage.
About how set the Bus Pirate in my opinion 30kHz is really few, very slow.
I believe even 1MHz is good.
For the parameter "Select output type:" you must to choose "2. Normal (H=3.3V, L=GND)", then you have to issue a "W" command in order to switch on the power supply.
Please don't activate the pull-up resistors (command "P") though.
Here is the sequence:

m
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. 2WIRE
7. 3WIRE
8. LCD
x. exit(without change)

(1)>5
Set speed:
1. 30KHz
2. 125KHz
3. 250KHz
4. 1MHz

(1)>4
Clock polarity:
1. Idle low *default
2. Idle high

(1)>
Output clock edge:
1. Idle to active
2. Active to idle *default

(2)>
Input sample phase:
1. Middle *default
2. End

(1)>
CS:
1. CS
2. /CS *default

(2)>
Select output type:
1. Open drain (H=Hi-Z, L=GND)
2. Normal (H=3.3V, L=GND)

(1)>2
Clutch disengaged!!!
To finish setup, start up the power supplies with command 'W'

Ready
SPI>W
POWER SUPPLIES ON
Clutch engaged!!!
SPI>[0x9f r r r]
/CS ENABLED
WRITE: 0x9F
READ: 0xC2
READ: 0x20
READ: 0x17
/CS DISABLED

Mission accomplished.
Regards,
sre71

Let me know please ...
with regards
BDMaster
Newbie
Newbie
 
Posts: 6
Joined: Tue Oct 24, 2017 2:15 am

Re: Bus Pirate - Community Firmware 7.0

Postby USBEprom » Fri Nov 10, 2017 3:15 pm

Hi BDMaster.
Thanks for reporting this!
I am sorry for the trouble which I guess it is due to something wrong that came out during one of the many cleaning of the repository.
It is only a cosmetic issue because actually, despite the wrong message, everything works as expected.
The last working repository is dated April 10, 2017, changes subsequent to that date create the problem.
By compiling a custom firmware starting from Bus_Pirate-master repository April 10, 2017 everything works as expected.
Please see here below:

i
Bus Pirate v3.5
Community Firmware v7.1 - goo.gl/gCzQnW [HiZ 1-WIRE UART I2C SPI 2WIRE 3WIRE KEYB LCD PIC DIO] Bootloader v4.5
DEVID:0x0447 REVID:0x3046 (24FJ64GA00 2 B8)
http://dangerousprototypes.com
HiZ>m
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. 2WIRE
7. 3WIRE
8. KEYB
9. LCD
10. PIC
11. DIO
x. exit(without change)

(1)>5
Set speed:
1. 30KHz
2. 125KHz
3. 250KHz
4. 1MHz
5. 50KHz
6. 1.3MHz
7. 2MHz
8. 2.6MHz
9. 3.2MHz
10. 4MHz
11. 5.3MHz
12. 8MHz

(1)>4
Clock polarity:
1. Idle low *default
2. Idle high

(1)>
Output clock edge:
1. Idle to active
2. Active to idle *default

(2)>
Input sample phase:
1. Middle *default
2. End

(1)>
CS:
1. CS
2. /CS *default

(2)>
Select output type:
1. Open drain (H=Hi-Z, L=GND)
2. Normal (H=3.3V, L=GND)

(1)>2
Clutch disengaged!!!
To finish setup, start up the power supplies with command 'W'
Ready
SPI>W
POWER SUPPLIES ON
Clutch engaged!!!
SPI>[0x9f r r r]
/CS ENABLED
WRITE: 0x9F
READ: 0xEF
READ: 0x40
READ: 0x15
/CS DISABLED
SPI>

Sadly from last few months I submitted reports about operating defects of the repositories that have gone through but so far there have been no improvements.
For instance starting from repository dated September 25, 2017, while compiling for Bus Pirate v3 there are some errors in MPLAB so that it is not possible to build the UNSAFE version and anyway for the SAFE version the message structure in the menus is totally wrong:

https://github.com/BusPirate/Bus_Pirate ... -331978946

I can not do anything but I expose in GITHUB the problem you wrote hoping somebody fix it because I am not in the position to do it myself, sorry:

https://github.com/BusPirate/Bus_Pirate/issues/74

About the issue you noticed at the moment the only solution I can suggest is to use SAFE_13042017 or UNSAFE_13042017 which do not have it and still have all the features available for the Bus Pirate v3, no exclusion:

viewtopic.php?f=28&t=8498&start=45#p66033

Be seeing you.

U.Sb
USBEprom
Full Member
Full Member
 
Posts: 202
Joined: Wed Mar 14, 2012 4:09 pm

Re: Bus Pirate - Community Firmware 7.0

Postby rom1011 » Mon Nov 13, 2017 8:09 pm

I haven't seen any update on the status of the firmware for the BPv4 in this thread for a long time.
Is there a 7.1 firmware available for the BPv4? Or would you recommend throwing out the v4 and buying a v3?

Thanks
-Roland
rom1011
Newbie
Newbie
 
Posts: 1
Joined: Mon Nov 13, 2017 8:05 pm

PreviousNext

Return to Bus Pirate Development