Hi guys. Following instructions in the wiki I have MPLAB X and MPLAB XC16 correctly installed. I have tried to compile by myself a firmware like those named "bpv3_fw7.0_features" that are here: dangerousprototypes.com/forum/download/file.php?id=12142 I took the whole repository here: https://github.com/BusPirate/Bus_Pirate ... master.zip (I used a Windows XP computer) I want 256 characters for the command line, so even if I am pretty babo, I understand I have to edit configuration.h, lines 496-505, 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 */
By editing I can not compile the source due out of memory error even using option S for compression. So I remove BASIC_SUPPORT by changing configuration.h, lines 304-319, in this way:
This time I can compile the source with options 0,1,2 and S. Firmwares I have got from myself pass self test but some option does not work. My goal is to put 256 characters for the command line in "bpv3_fw7.0_features.zip". How can I do? Is it possible that by providing 256 characters for the command line instead of 128 then the generated code is too big for Bus Pirate revision 3 so that I have to give up BASIC? Maybe I am doing something wrong. I would recompile that same firmware version for obtain 256 characters for the command line. Elsewhere (here: https://github.com/BusPirate/Bus_Pirate ... -248265311) it is argued that the thing should be possible:
it is possible to fit many features for BPv3 (including BASIC) but only for three opt levels: opt0 - not enough program memory opt1 - 84% occupied, opt2 - 94% occupied, faster speed, optS - 77% occupied, slower speed, opt3 - not enough program memory
[quote author="mikeb"]Please don't make artificial limitations for yourself :) It would be great if you try and if something doesn't work - please leave the feedback so that I could improve this instruction[/quote]
Hi mikeb. Actually I do not fear the installation of the compiler or other thing into the computer. I am not making artificial limitations for myself but I have cringe at the idea to where find out what I need to modify and how do the changes. You and others have shown me where were some of the problems that I have given, alone I would never be able to spot them. Compile a ready-made source code it is not so hard following your instructions in the wiki, my problem is how edit the source code in the right way. Thanks.
@mikeb Hi mikeb. I would like compile a new firmware by myself but honestly It is beyond my abilities. I am not a software engineers or something like that, I have no skills in that field. Sorry. Thanks you for the time you spent updating the Dangerous Prototypes wiki and all the useful things you are doing!
@dpropicweb Hi dpropicweb. I guess you are right. Thanks.
Hi mikeb. Thank you very much for the updates that you are releasing! Many thanks to agatti too and kallisti5 and all the guys in the project. I had a look to v7.0 forum but honestly I understood very few things. I am just a hobbyist, not a software engineer. The only thing I can do is perhaps help with debug, perhaps... I am sorry, no more. I tested both the new releases. Here you go.
First I have converted them into uppercase in order to use pirate-loader for the upgrade, then I upgrade my Bus Pirate 3.6 with them all. For each of them I got the error message that I have already written:
Based on your explanation and the one of agatti and of others, seems to not be a problem. So okay.
HiZ>i Bus Pirate v3.5 Community Firmware v7.0 - goo.gl/gCzQnW [HiZ UART I2C SPI] Bootloader v4.4 DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8) http://dangerousprototypes.com HiZ>~ Disconnect any devices Connect (Vpu to +5V) and (ADC to +3.3V) Space to continue Ctrl AUX OK MODE LED OK PULLUP H OK PULLUP L OK VREG OK ADC and supply 5V(4.94) OK VPU(5.03) OK 3.3V(3.31) OK ADC(3.34) OK Bus high MOSI OK CLK OK MISO OK CS OK Bus Hi-Z 0 MOSI OK CLK OK MISO OK CS OK Bus Hi-Z 1 MOSI OK CLK OK MISO OK CS OK MODE and VREG LEDs should be on! [OKAY: VREG DOES LIGHT] Any key to exit Found 0 errors. HiZ># RESET
Bus Pirate v3.5 Community Firmware v7.0 - goo.gl/gCzQnW [HiZ UART I2C SPI] Bootloader v4.4 DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8) http://dangerousprototypes.com HiZ>s Syntax error at char 1 HiZ>$ Are you sure? y BOOTLOADER[/b]
This time for them all the self test works fine and the VREG led glow. Basic still doesn't works but I have understood it is because purposely deactivated in the firmware.
HiZ>b Set serial port speed: (bps) 1. 300 2. 1200 3. 2400 4. 4800 5. 9600 6. 19200 7. 38400 8. 57600 9. 115200 10. BRG raw value
(9)>10 Enter raw value for BRG
(34)>8 Adjust your terminal Space to continue
It works!
For what I know up to 255 characters of syntax may be entered into the Bus Pirate terminal at once. I have tried but with them all the firmwares only 127 characters seems to be accepted, the extra ones are rejected (in the terminal the rejected characters are shown like not ascii).[/color]
First I have converted them into uppercase in order to use pirate-loader for the upgrade, then I upgrade my Bus Pirate 3.6 with them all. For each of them I got the error message that I have already written:
Based on yours explanation and the one of agatti and of others, seems to not be a problem. So okay.
HiZ>i Bus Pirate v3.5 Community Firmware v7.0 - goo.gl/gCzQnW [HiZ 1-WIRE UART I2C SPI 2WIRE 3WIRE DIO] Bootloader v4.4 DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8) http://dangerousprototypes.com HiZ>~ Disconnect any devices Connect (Vpu to +5V) and (ADC to +3.3V) Space to continue Ctrl AUX OK MODE LED OK PULLUP H OK PULLUP L OK VREG OK ADC and supply 5V(4.94) OK VPU(5.03) OK 3.3V(3.31) OK ADC(3.34) OK Bus high MOSI OK CLK OK MISO OK CS OK Bus Hi-Z 0 MOSI OK CLK OK MISO OK CS OK Bus Hi-Z 1 MOSI OK CLK OK MISO OK CS OK MODE and VREG LEDs should be on! [OKAY: VREG DOES LIGHT] Any key to exit[/b] Found 0 errors.[/b] HiZ># RESET
Bus Pirate v3.5 Community Firmware v7.0 - goo.gl/gCzQnW [HiZ 1-WIRE UART I2C SPI 2WIRE 3WIRE DIO] Bootloader v4.4 DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8) http://dangerousprototypes.com HiZ>s[/b] HiZ(BASIC)>exit (now it is active and working)[/b] Ready[/b] HiZ>$ Are you sure? y BOOTLOADER[/b]
This time for them all the self test works fine and the VREG led glow. Basic too now works, I have understood it is because purposely activated in the firmware.
Seems that DIO does not work. Bus Pirate v3.5 Community Firmware v7.0 - goo.gl/gCzQnW [HiZ 1-WIRE UART I2C SPI 2WIRE 3WIRE DIO] Bootloader v4.4 DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8) http://dangerousprototypes.com HiZ>m 1. HiZ 2. 1-WIRE 3. UART 4. I2C 5. SPI 6. 2WIRE 7. 3WIRE 8. DIO x. exit(without change)
(1)>8 ERROR: command has no effect here Clutch disengaged!!! To finish setup, start up the power supplies with command 'W'
Ready Syntax error at char 2 DIO>
But honestly I do not even understand how test it, sorry.
HiZ>b Set serial port speed: (bps) 1. 300 2. 1200 3. 2400 4. 4800 5. 9600 6. 19200 7. 38400 8. 57600 9. 115200 10. BRG raw value
(9)>10 Enter raw value for BRG
(34)>8 Adjust your terminal Space to continue
It works!
MACRO(1) and MACRO(2) in 2WIRE protocol they do not work. For what I can understand MACRO(1) fails due a wrong order in the lsb/MSB of the emitted bytes. Also MACRO(2) fails but I do not know why, perhaps for the same reason of MACRO(1).
For what I know up to 255 characters of syntax may be entered into the Bus Pirate terminal at once. I have tried but with them all the firmwares only 127 characters seems to be accepted, the extra ones are rejected (in the terminal that rejected characters are shown like not ascii)[/color]
Last but not least, the software flashrom_v0.9.9_Win does work!
I have to admit that this "features" release of the revision 7.0 of the firmware for the Bus Pirate is a dream having the full features, in my opinion the best one! My most sincere congratulations for it, I was waiting it for years!
Due your indication as for knowledge I will enter all this informations in the development forum of the v7.0 firmware for the Bus Pirate. Maybe that can help. Hoping those are useful. Thank you friend!
[quote author="mikeb"]I am doing it the same way as this person - viewtopic.php?f=40&t=7527#p62521 Use pirate-loader command, if it doesn't work then click "Normal" and "Reset" buttons a few times randomly, then try again and repeat trying until it works. Usually it takes many tries but eventually does work So if it is indeed a protection, it is not 100% secure ;-) However BPv3 does not have these hardware buttons, so this way could be tried only for BPv4. Still it is much faster to just use a chinese Pickit2 clone since it cost just a fraction of Bus Pirate cost https://www.aliexpress.com/wholesale?mi ... atId=0&g=y[/quote]
Okay, thanks. I get it now. Even if I purchase a Pickit2 then I would not know how to use it, sorry.
[quote author="mikeb"]I never used it at all :) So you know more than me about it[/quote]
Actually I know nothing more, I used it only for testing.
[quote author="mikeb"]Thank you. So it seems that all the builds are producing the same results: 1) 0 errors during the selftest and jumps to bootloaders successfully 2) s command gives "Syntax error at char 1" 3) VREG led does not light at the end of the test[/quote]
Yes, it is so.
[quote author="mikeb"]Please tell, have you tried repeating "s" command after reset?[/quote]
Yes, I did it.
[quote author="mikeb"]Does this "syntax error" problem happens every time you press "s", or only at the first try?[/quote]
For what I saw always, not only at the first time.
[quote author="mikeb"]About VREG: have you seen this LED working at least sometimes?[/quote]
By using v7.0 firmware I have not ever seen it to glow.
[quote author="mikeb"]Just want to exclude a possibility that VREG led is faulty on your board[/quote]
Totally, VREG led on my Bus Pirate is not faulty. It works fine with the spi_fix.hex firmware released by tayken in the forum.
[quote author="mikeb"] Not sure if that is really a bootloader protection, to me it seems more to be just a buggy process of firmware updating: 1) if its a protection it should be failing on the same addresses, but for me it could fail on any address 2) if its a protection it should always "protect" (block). however, if I try about 10 times I "bypass" it XD [/quote]
mikeb, I know nothing but what is here: http://dangerousprototypes.eu/forum/vie ... =3877#p387 Sorry. You wrote that by trying about 10 times you "bypass" it, how? I'm babo, you know. However the message does not seem to hinder the proper functioning.
[quote author="mikeb"] Initially I thought that some non-essential section of bootloader got overwritten (.debug/.comment), but how it determined a location of bootloader if you haven't told it? So most likely it was just a false positive [/quote]
Normally I do not use "ds30 Loader GUI", I used it only for test. Know nothing but into the program is possible to flag "write program" and "write eeprom" hence I expect inside the code a some sort of watchdog.
[quote author="mikeb"] Please could you tell, what exact version of 7.0 you are using, and with what optimization? Sadly I have no ability to test BPv3 (only have BPv4), so I produce BPv3 builds without any testing at all... Optimization is cool, but sometimes it could cause issues like this - https://github.com/BusPirate/Bus_Pirate/issues/10 (endless loop because of incorrect compiler optimization, got fixed here thanks to agatti and LED blinking approach - https://github.com/BusPirate/Bus_Pirate/issues/11 ) After you add this information below you could point to it by adding a link to this issue - https://github.com/BusPirate/Bus_Pirate/issues/7
Thank you for detailed report, hopefully you could join us in the debugging quest ;)[/quote]
HiZ>i Bus Pirate v3.5 Community Firmware v7.0 - goo.gl/gCzQnW [HiZ UART I2C SPI] Bootloader v4.4 DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8) http://dangerousprototypes.com HiZ>~ Disconnect any devices Connect (Vpu to +5V) and (ADC to +3.3V) Space to continue Ctrl AUX OK MODE LED OK PULLUP H OK PULLUP L OK VREG OK ADC and supply 5V(4.94) OK VPU(5.03) OK 3.3V(3.31) OK ADC(3.34) OK Bus high MOSI OK CLK OK MISO OK CS OK Bus Hi-Z 0 MOSI OK CLK OK MISO OK CS OK Bus Hi-Z 1 MOSI OK CLK OK MISO OK CS OK MODE and VREG LEDs should be on! [FAIL: VREG DOES NOT LIGHT] Any key to exit Found 0 errors. HiZ># RESET
Bus Pirate v3.5 Community Firmware v7.0 - goo.gl/gCzQnW [HiZ UART I2C SPI] Bootloader v4.4 DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8) http://dangerousprototypes.com HiZ>s Syntax error at char 1 HiZ>$ Are you sure? y BOOTLOADER[/b]
HiZ>i Bus Pirate v3.5 Community Firmware v7.0 - goo.gl/gCzQnW [HiZ UART I2C SPI] Bootloader v4.4 DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8) http://dangerousprototypes.com HiZ>~ Disconnect any devices Connect (Vpu to +5V) and (ADC to +3.3V) Space to continue Ctrl AUX OK MODE LED OK PULLUP H OK PULLUP L OK VREG OK ADC and supply 5V(4.94) OK VPU(5.03) OK 3.3V(3.31) OK ADC(3.34) OK Bus high MOSI OK CLK OK MISO OK CS OK Bus Hi-Z 0 MOSI OK CLK OK MISO OK CS OK Bus Hi-Z 1 MOSI OK CLK OK MISO OK CS OK MODE and VREG LEDs should be on! [FAIL: VREG DOES NOT LIGHT] Any key to exit Found 0 errors. HiZ># RESET
Bus Pirate v3.5 Community Firmware v7.0 - goo.gl/gCzQnW [HiZ UART I2C SPI] Bootloader v4.4 DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8) http://dangerousprototypes.com HiZ>s Syntax error at char 1 HiZ>$ Are you sure? y BOOTLOADER[/b]
HiZ>i Bus Pirate v3.5 Community Firmware v7.0 - goo.gl/gCzQnW [HiZ UART I2C SPI] Bootloader v4.4 DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8) http://dangerousprototypes.com HiZ>~ Disconnect any devices Connect (Vpu to +5V) and (ADC to +3.3V) Space to continue Ctrl AUX OK MODE LED OK PULLUP H OK PULLUP L OK VREG OK ADC and supply 5V(4.94) OK VPU(5.03) OK 3.3V(3.31) OK ADC(3.34) OK Bus high MOSI OK CLK OK MISO OK CS OK Bus Hi-Z 0 MOSI OK CLK OK MISO OK CS OK Bus Hi-Z 1 MOSI OK CLK OK MISO OK CS OK MODE and VREG LEDs should be on! [FAIL: VREG DOES NOT LIGHT] Any key to exit Found 0 errors. HiZ># RESET
Bus Pirate v3.5 Community Firmware v7.0 - goo.gl/gCzQnW [HiZ UART I2C SPI] Bootloader v4.4 DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8) http://dangerousprototypes.com HiZ>s Syntax error at char 1 HiZ>$ Are you sure? y BOOTLOADER[/b]
HiZ>i Bus Pirate v3.5 Community Firmware v7.0 - goo.gl/gCzQnW [HiZ UART I2C SPI] Bootloader v4.4 DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8) http://dangerousprototypes.com HiZ>~ Disconnect any devices Connect (Vpu to +5V) and (ADC to +3.3V) Space to continue Ctrl AUX OK MODE LED OK PULLUP H OK PULLUP L OK VREG OK ADC and supply 5V(4.94) OK VPU(5.03) OK 3.3V(3.31) OK ADC(3.34) OK Bus high MOSI OK CLK OK MISO OK CS OK Bus Hi-Z 0 MOSI OK CLK OK MISO OK CS OK Bus Hi-Z 1 MOSI OK CLK OK MISO OK CS OK MODE and VREG LEDs should be on! [FAIL: VREG DOES NOT LIGHT] Any key to exit Found 0 errors. HiZ># RESET
Bus Pirate v3.5 Community Firmware v7.0 - goo.gl/gCzQnW [HiZ UART I2C SPI] Bootloader v4.4 DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8) http://dangerousprototypes.com HiZ>s Syntax error at char 1 HiZ>$ Are you sure? y BOOTLOADER[/b]
Hi there. Thank you very much guys, mikeb daebak! Just tried new firmware v7.0 on my Bus Pirate revision 3 (v3.6). Waiting for the new one I left the original bootloader (Bootloader v4.4). Some thought.
First: From cmd in Windows 10 "pirate-loader" gives me this warning +++++++++++++++++++++++++++++++++++++++++++ Pirate-Loader for BP with Bootloader v4+ Loader version: 1.0.2 OS: WINDOWS +++++++++++++++++++++++++++++++++++++++++++
Parsing HEX file [bpv3_fw7.0_optS_16092016.hex] Checksum does not match, line 4 Could not load HEX file, result=-1
This is because the compiled HEX file is lowercase. I fixed the issue by converting it in uppercase. (viewtopic.php?f=28&t=6097#p56816)
Second: By using the uppercase HEX file I have converted I can upgrade my Bus Pirate v3.6 but due old bootloader I get
Third: For what I think is the same reason for the second point, "ds30 Loader GUI" gives to me a warning about the possibility of overwriting the bootloader:
Parsing hex-file... Validating hex-file...ok The hex-file contains code that will overwrite the bootloader Hex-file successfully parsed
18579 program words found in 294 rows 0 eeprom words found 0 config words found
Fourth: By issuing "i" in the terminal I get
Bus Pirate v3.5 Community Firmware v7.0 - goo.gl/gCzQnW [HiZ UART I2C SPI] Bootloader v4.4 DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8) http://dangerousprototypes.com
So by performing the self test (~) I get no errors but when terminal shows that MODE and VREG LEDs should be on, actually the first (MODE) it is and the second (VREG) does not.
$ (Jump to bootloader) command does work
s (Script engine) does not work, it provides a "Syntax error at char 1" message
# (Reset the BP) does work and it shows the message "RESET"
Hi there. kallisti5, that's really terrific! This is certainly a great help for all of BP4 owners who finally can make better use of their device, taking off of here a lot of hassle. Good the idea to support at all costs even BP3 although unfortunately at now it was not possible to compile the firmware for that hardware revision. Maybe next time, I hope, because I have a BP3. An awesome job!
Hi there, I'd like to know how to query SD cards in SD mode. By following some documents on the net I understood how to query them in SPI mode but I couldn't find any example about to do the same thing in SD mode. It exist some flow chart that shows how initialize SD cards in SPI mode but nothing for the SD mode. Actually SPI initialization and query is very simple, not so for SD mode. Is here somebody that can explain how to do it or even merely put a link to a document that explains it?
Hi pyblendnetjs, thanks for the news. OK, I gave a glance at the new documentation taking a chance to compile it myself. Course since I am babo I have not been able to do the job. I have installed Visual Studio 2010 but what exactly do I must install of it? Infact it is composed of many parts, I wonder what it is I need in order to compile. Visual C#? Visual Basic? Visual C++? Visual Web Developer? All together? Sorry but it is really too complex for a babo like I am.
Hi pyblendnetjs, graeat job, daebak! I'm a bit babo though, so I can not find the executable. Where is it? I guess I have to myself compile something in the archive, but exactly what and how?
Hi tayken, thanks alot for the useful informations and priceless support! Actually me too I use Hercules since the day that you taught me how to use it (viewtopic.php?f=4&t=6206#p56812). At present my purpose was to understand how and if even with normal terminal programs was possible to achieve the same result. Now I get it, thank you tayken! Ok, I'm babo. Simply it is only possible to use terminal programs which are able to send binary values instead of only ASCII characters. That's the answer, so thanks!
Hi there! Maybe this has already been written, so sorry. I wonder if bitbang mode can be gained also with simple terminal (Hyperterminal, Teraterm and so on). In mine when I tossed 0x00 20 times nothing happened. What's the trick? Thanks in advance and regards.
Hi macboy, I don't want to hijack this old thread. Could it be possible to have the source of the your changes so that it is possible compile by itself a new firmware? Thanks in advance and regards.
Hi there! I have to ask a question about the support to the family 25VFxxx by SST. From what I know starting from flashrom v0.9.7-r1764 was added support for the SST25VF020 and SST25VF020B chips. I need to work on those chips but sadly I was only able to get flashrom-v0.9.6.1-r1704 that works with Windows systems and it doesn't work with either SST25VF020 and SST25VF020B. Is there somewhere a newer version that work with Windows systems and supports both SST25VF020 and SST25VF020B? Thanks in advance and regards.