Bus Pirate - Community Firmware 7.0

Bus Pirate firmware and hardware development.

Re: Bus Pirate - Community Firmware 7.0

Postby USBEprom » Tue Nov 14, 2017 3:11 pm

Hi Roland.
Firmware v7.x is specifically developed for Bus Pirate v4, Bus Pirate v3 is a secondary branch of it:

https://github.com/BusPirate/Bus_Pirate

Be seeing you.

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

Re: Bus Pirate - Community Firmware 7.0

Postby inac » Wed Jan 10, 2018 6:50 am

Dear All

Is the code of the v7.1 also in git?

There is a TAG for v7.0 but not for v7.1. I downloaded v7.1 (forgot where) and compared it with the 16-07-2017 checkout and it's not the same.

Also is the SAFE_16072017 completely in git (so building commit ... will result in SAFE_16072017)? And is it the v7.1? Or is there no version number for the SAFE_16072017?
inac
Newbie
Newbie
 
Posts: 2
Joined: Wed Jan 10, 2018 6:46 am

Re: Bus Pirate - Community Firmware 7.0

Postby USBEprom » Wed Jan 10, 2018 3:35 pm

Hi inac.
I know nothing about git and what it is, but I know for sure that the firmwares I provided and I provide, in this case specifically SAFE_16072017, are firmware v7.1 for Bus Pirate revision 3.
The early ones I provided are firmwares v7.0 until SAFE_13042017 and UNSAFE_13042017, starting with them and going haead it is v7.1.
Please pay attention to the fact that SAFE_16072017, together with later releases I provided, requires bootloader v4.5 in order to be fully functioning.
Without upgrading to v4.5 it will not be possible to jump into bootloader from terminal using command $, so that instead it will be necessary to use jumper on PGD and PGC.

Be seeing you.

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

Re: Bus Pirate - Community Firmware 7.0

Postby inac » Thu Jan 11, 2018 6:20 am

Hi U.Sb,

Thanks, that clears a lot!

With git I mean. Making a clone of the GitHub repository (https://github.com/BusPirate/Bus_Pirate). Then in de log I see all the many commits made. I expect one of them to be v7.1. But none of the commits is TAGed as v7.1 (only v7.0 is TAGed).

All commits made after the v7.1 commit are (for me) modifications/patches to the v7.1

E.g. To me the commit at SHA-1: 01e9bda (13-08-2016) is the v7.0. All commits after that are patches to v7.0 (so e.g. v7.0.x) and not v7.0 itself. Many commits marked as the same version makes it a bit confusing (at least for me). When trying to reproduce a specific version the right commit to checkout is needed. So reproducing and building v7.0 a checkout of commit SHA-1: 01e9bda should be needed. For v7.1 it's unknown. Otherwise you can have several different firmware with the same version number.

Thanks again for your great help! I will start programming the v4.5 bootloader in my v3.6 BP.
inac
Newbie
Newbie
 
Posts: 2
Joined: Wed Jan 10, 2018 6:46 am

Re: Bus Pirate - Community Firmware 7.0

Postby USBEprom » Sun Feb 18, 2018 11:47 am

Hi guys.
In the beginning of the last January agatti has upgraded some things inside firmware v7.1.
So I was able to build new firmwares v7.1 for the Bus Pirate revision 3 using the repository dated 7 January, 2018 (https://github.com/BusPirate/Bus_Pirate ... master.zip).
I made two versions that i named S-07012018-1.hex and U-07012018-1.hex.
Both of them have all the features enabled, BASIC too, the command line allows up 256 characters.
The first one (S-07012018-1.hex), the so called SAFE version (S=SAFE), is built on the configuration.h changed as follow.
Into configuration.h I changed lines from 316 to 331 in order to enable all the features available, BASIC too.

#ifdef BUSPIRATEV3
#define BP_ENABLE_1WIRE_SUPPORT
#define BP_ENABLE_BASIC_SUPPORT
#define BP_ENABLE_DIO_SUPPORT
#define BP_ENABLE_HD44780_SUPPORT
#define BP_ENABLE_I2C_SUPPORT
#define BP_ENABLE_JTAG_SUPPORT
#define BP_ENABLE_PIC_SUPPORT
#define BP_ENABLE_PC_AT_KEYBOARD_SUPPORT
#define BP_ENABLE_RAW_2WIRE_SUPPORT
#define BP_ENABLE_RAW_3WIRE_SUPPORT

#undef BP_ENABLE_SMPS_SUPPORT
#define BP_ENABLE_SPI_SUPPORT
#define BP_ENABLE_SUMP_SUPPORT
#define BP_ENABLE_UART_SUPPORT
#endif /* BUSPIRATEV3 */


Please, pay attention that since recently the SMPS_SUPPORT for the Bus Pirate v3 has been removed, I left the line number 328 unchanged as #undef.

SMPS_SUPPORT is intended for the management of the SMPS_BOARD which is an abandoned or stalled board.
Exactly it is this:

http://dangerousprototypes.com/blog/200 ... y-6-parts/
http://dangerousprototypes.com/docs/Bus_Pirate_SMPS

Then I changed the line 417 too in this way in order to make room for BASIC scripting:

#define BP_BASIC_PROGRAM_SPACE 512

Finally I had to set line 535 for up 256 characters into the command line by changing it in this way:

/**
* How big the serial command buffer can be, in bytes.
*
* @warning This must be set to a power of two, ie. 256, 128, 64, 32, etc.
*/
#ifdef BUSPIRATEV3
#define BP_COMMAND_BUFFER_SIZE 256
#else
#define BP_COMMAND_BUFFER_SIZE 256
#endif /* BUSPIRATEV3 */


The result that I have achieved I have called it S-07012018-1.hex.
S-07012018-1.hex was obtained by using the compression option "1" of MPLAB so to be in fully accordance with the latest recommendations issued about the compilation of the new repositories using MPLAB in order to build new firmwares for the Bus Pirate v3 and v4.
Compression option "1" assure right timing that option "s" may not ensure.
For me it works great and by the way, it fixes a bug using the Bus Pirate v3 with the I2C protocol (https://github.com/BusPirate/Bus_Pirate ... -356724617).
Thanks a lot to agatti for having fixed and upgraded the repository!

---------------------------------------------------------
---------------------------------------------------------

The second one (U-07012018-1.hex) is the same as S-07012018-1.hex but also it has the HARDWARE mode unlocked for the I2C protocol.
Indeed in the recent past agatti taught how to free the HARDWARE mode inside I2C protocol (https://github.com/BusPirate/Bus_Pirate/issues/39).
Please read the above link carefully!
As agatti wrote:
"Dangerous Prototypes' original firmware did not use hardware I2C due to hardware bugs in PIC24FJ64GA004 chips with revision A3 or A4.
Now that hardware I2C is enabled again and the appropriate workarounds detailed here (http://ww1.microchip.com/downloads/en/D ... 00470j.pdf) have been applied, we need to test those on real hardware.

The catch: the code is experimental and it may or may not mess up with your hardware, just in case."
U-07012018-1.hex, the so called UNSAFE version (U=UNSAFE) is built on the configuration.h changed as follow.
Into configuration.h I changed lines from 316 to 331 in order to enable all the features available, BASIC too.

#ifdef BUSPIRATEV3
#define BP_ENABLE_1WIRE_SUPPORT
#define BP_ENABLE_BASIC_SUPPORT
#define BP_ENABLE_DIO_SUPPORT
#define BP_ENABLE_HD44780_SUPPORT
#define BP_ENABLE_I2C_SUPPORT
#define BP_ENABLE_JTAG_SUPPORT
#define BP_ENABLE_PIC_SUPPORT
#define BP_ENABLE_PC_AT_KEYBOARD_SUPPORT
#define BP_ENABLE_RAW_2WIRE_SUPPORT
#define BP_ENABLE_RAW_3WIRE_SUPPORT

#undef BP_ENABLE_SMPS_SUPPORT
#define BP_ENABLE_SPI_SUPPORT
#define BP_ENABLE_SUMP_SUPPORT
#define BP_ENABLE_UART_SUPPORT
#endif /* BUSPIRATEV3 */


Please, pay attention that since recently the SMPS_SUPPORT for the Bus Pirate v3 has been removed, I left the line number 328 unchanged as #undef.

SMPS_SUPPORT is intended for the management of the SMPS_BOARD which is an abandoned or stalled board.
Exactly it is this:

http://dangerousprototypes.com/blog/200 ... y-6-parts/
http://dangerousprototypes.com/docs/Bus_Pirate_SMPS

Then I changed the line 417 too in this way in order to make room for BASIC scripting:

#define BP_BASIC_PROGRAM_SPACE 512

And then I had to set line 535 for up 256 characters into the command line by changing it in this way:

/**
* How big the serial command buffer can be, in bytes.
*
* @warning This must be set to a power of two, ie. 256, 128, 64, 32, etc.
*/
#ifdef BUSPIRATEV3
#define BP_COMMAND_BUFFER_SIZE 256
#else
#define BP_COMMAND_BUFFER_SIZE 256
#endif /* BUSPIRATEV3 */


Finally I had to put a remark sign ("//") inside line 382 and 391 in order to unlock the HARDWARE mode for the I2C protocol:

382 // #ifdef BUSPIRATEV4

391 // #endif /* BUSPIRATEV4 */

The result that I have achieved I have called it U-07012018-1.hex.
U-07012018-1.hex was obtained by using the compression option "1" of MPLAB so to be in fully accordance with the latest recommendations issued about the compilation of the new repositories using MPLAB in order to build new firmwares for the Bus Pirate v3 and v4.
Compression option "1" assure right timing that option "s" may not ensure.

For me it works great and by the way, it fixes a bug using the Bus Pirate v3 with the I2C protocol (https://github.com/BusPirate/Bus_Pirate ... -356724617), but you use it at your own risk, I do not take any responsibility about the possibility of damaging your Bus Pirate or whatever!

Attention please!
First to attempt to use U-07012018-1.hex (UNSAFE version of the firmware) you have to evaluate what is the silicon revision of the PIC used in your device, paying much attention to the fact that you might damage your device or whatever!
By doing it you must to assume all the responsibility for your action.
You use it at your own risk, I do not take any responsibility about the possibility of damaging your Bus Pirate or whatever!


Thanks a lot to agatti for having fixed and upgraded the repository and freed the HARDWARE mode inside of I2C protocol!

Please note that both S-07012018-1.hex and U-07012018-1.hex require the new bootloader v4.5 in order to work completely (viewtopic.php?f=28&t=8498&start=75#p67056 and viewtopic.php?f=28&t=8498&p=67056#p67127).
Otherwise if do not, enter BOOTLOADER using command "$" will not work (https://github.com/BusPirate/Bus_Pirate/issues/58).
Actually it is not really a problem on the firmware side but rather of the bootloader.
In order to fix the matter it is need to upgrade the bootloader to the new revision v4.5:

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

viewtopic.php?f=28&t=8498&p=67056#p67056


With the firmwares I also provide a pre configured environment that anyone can use with minimal changes to simplify the upgrade of the only firmware or together the bootloader and the firmware in a single step.
The archive also provides further improved instructions on how to use the whole thing under any operative system (Window, Linux and Apple), simply follow them :

"How to use UPGRADE_TO_BL_v4.5.bat.rtf" (specific instructions for Windows users)
"How to update with pirate-loader.rtf" (generic cross-platform instructions for Windows, Linux and Apple users)

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_ENG-f.7z
Pre configured environment to simplify the upgrade of the only firmware or together the bootloader and the firmware in a single step.
Inside are instructions on how to use the whole thing under any operative system (Window, Linux and Apple):
"How to use UPGRADE_TO_BL_v4.5.bat.rtf" (specific instructions for Windows users)
"How to update with pirate-loader.rtf" (generic cross-platform instructions for Windows, Linux and Apple users)
(471.98 KiB) Downloaded 109 times
USBEprom
Full Member
Full Member
 
Posts: 148
Joined: Wed Mar 14, 2012 4:09 pm

Re: Bus Pirate - Community Firmware 7.0

Postby awokd » Wed Mar 21, 2018 7:04 am

USBEprom wrote:Hi guys.
In the beginning of the last January agatti has upgraded some things inside firmware v7.1.
So I was able to build new firmwares v7.1 for the Bus Pirate revision 3 using the repository dated 7 January, 2018


Thank you U.Sb and agatti! Followed the steps in the above documentation and they worked perfectly to upgrade a Buspirate 3.6 with v4.4 bootloader and v5.9 firmware. I was using Debian Stretch x64 so had to "apt install lib32z1" and chmod pirate-loader_lnx to executable before it worked, but no other problems.
awokd
Newbie
Newbie
 
Posts: 2
Joined: Sat Mar 10, 2018 12:23 pm

Re: Bus Pirate - Community Firmware 7.0

Postby DangerByte » Tue Jun 19, 2018 3:11 pm

Yo, its been a while since I was last here. I see there has been some new development on BusPirate firmware. I managed to dig up my dusty BP4 and apparently it's still using firmware 3.6-beta1. I see there is version v7.0 and some even mention v7.1.

Are there v7.1 binaries available for BP4?

See ya!
DangerByte
Newbie
Newbie
 
Posts: 9
Joined: Fri Feb 27, 2015 2:05 pm

Previous

Return to Bus Pirate Development