Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test the build on a real v3 board #7

Closed
agatti opened this issue Aug 25, 2016 · 72 comments

Comments

Projects
None yet
10 participants
@agatti
Copy link
Member

commented Aug 25, 2016

Now that the firmware can build for v3, it would be nice to know whether it actually works or not. Unfortunately I only have a v4 board here...

@agatti agatti added the help wanted label Aug 25, 2016

@CoryHenderson

This comment has been minimized.

Copy link

commented Aug 25, 2016

I can test on v3 hardware. I have a v3.5c, date stamped Sep 2011. Is there a specific test procedure, or are you just making sure it works at all?

@CoryHenderson

This comment has been minimized.

Copy link

commented Aug 25, 2016

I can confirm that the latest firmware builds and runs on the v3.5c that I have. Terminal looks like it is working fine. I do have an issue with I2C that I didn't have in 6.1 which I have been using regularly. When reading a register ([0x34 0][0x35 r r]), only the first read comes back correct. The second (and all subsequent) read always comes back 0xFF, but the ACKs are working correctly.

@kallisti5

This comment has been minimized.

Copy link

commented Aug 25, 2016

Hm.. I wonder if the I2C regressions were caused by 3c82068 ?

@CoryHenderson

This comment has been minimized.

Copy link

commented Aug 26, 2016

I can check that tomorrow. I just so happened to be using that when I saw the request for a tester, so it was the first thing I noticed

@agatti

This comment has been minimized.

Copy link
Member Author

commented Aug 26, 2016

@CoryHenderson would it be possible to check whether the board also passes selftest and if the hardware information report makes any sense?

@CoryHenderson

This comment has been minimized.

Copy link

commented Aug 26, 2016

@kallisti5 Wasn't 3c82068. Just tried reverting the commit, same results.

@CoryHenderson

This comment has been minimized.

Copy link

commented Aug 26, 2016

@agatti Self test looks good:

Ctrl
AUX OK
MODE LED OK
PULLUP H OK
PULLUP L OK
VREG OK
ADC and supply
5V(4.79) OK
VPU(4.80) OK
3.3V(3.23) OK
ADC(3.27) 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!
Any key to exit
Found 0 errors.

By hardware information, do you mean just the i command in the terminal? Here's what that gives. Looks good. I think the bootloader info is off because I'm flashing directly with an ICD3.

Bus Pirate v3.5
Community Firmware v7.0 - goo.gl/gCzQnW Bootloader v255.255
DEVID:0x0447 REVID:0x3043 (24FJ64GA002 B5)
http://dangerousprototypes.com

@agatti

This comment has been minimized.

Copy link
Member Author

commented Aug 26, 2016

@CoryHenderson yep, that's all I needed to check - thanks!

For I2C, I'll try to get the last revision off DP's repo to build for v3 and MPLAB X later on today, I hope you can give it a spin when you have the time.

@CoryHenderson

This comment has been minimized.

Copy link

commented Aug 26, 2016

@agatti Sounds good. Today will be the last day I have for a few weeks, but I can hopefully start contributing more starting mid September.

@agatti

This comment has been minimized.

Copy link
Member Author

commented Aug 26, 2016

@CoryHenderson, here's a build from the tree at DangerousPrototypes@10f1ec1 - disabling enough features (OpenOCD, Basic interpreter, JTAG, PC-AT Keyboard) to fit in the available ROM space. Thanks for the help :)

busPirate.X.production.hex.zip

@agatti

This comment has been minimized.

Copy link
Member Author

commented Aug 26, 2016

@kallisti5, do you think it would help to ping Seeed/Sparkfun/Dangerous Prototypes directly and ask for a fully assembled board to support this endeavour? If it's Seeed, I'll be in Shenzhen later this month so I could even pop by and pick it up in person ;)

@CoryHenderson

This comment has been minimized.

Copy link

commented Aug 26, 2016

@agatti v6.3 has the I2C bug as well. I had a version of v6.2 (r1981) laying around from a while back. Tried that, and it works fine. I am attaching text file logs of my I2C read operation from each. As you can see, the version from r1981 has the correct output of 0x8904, which is the device ID of the WM8912 I am reading from. The r2151 build returns 0x89FF
I2CTest-v6.2-r1981.txt
I2CTest-v6.3-r2151.txt

@agatti

This comment has been minimized.

Copy link
Member Author

commented Aug 27, 2016

@CoryHenderson great catch! I'll have a go at it this weekend and see what I can get out of it, although I'll have to first rig something up on an ESP8266 or Arduino to have any I2C bus to read from.

@agatti

This comment has been minimized.

Copy link
Member Author

commented Aug 27, 2016

@CoryHenderson, can you please give this firmware a try when you have the time in a few weeks? All the DP SVN dumps I found so far stop at r2115 - need to find more recent dumps I guess...

BPv3-firmware-v6.3-r2088.hex.zip

@coelner

This comment has been minimized.

Copy link

commented Sep 2, 2016

So far, a sniffing between a BMP280 and ESP8266:

I2C>i
Bus Pirate v3.5
Firmware v6.3-beta1 r2088  Bootloader v4.4
DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8)
http://dangerousprototypes.com
CFG1:0xFFDF CFG2:0xFF7F
*----------*
Pinstates:
1.(BR)  2.(RD)  3.(OR)  4.(YW)  5.(GN)  6.(BL)  7.(PU)  8.(GR)  9.(WT)  0.(Blk)
GND     3.3V    5.0V    ADC     VPU     AUX     SCL     SDA     -       -
P       P       P       I       I       I       I       I       I       I
GND     0.00V   0.00V   0.00V   0.00V   H       L       L       H       H
POWER SUPPLIES OFF, Pull-up resistors OFF, Open drain outputs (H=Hi-Z, L=GND)
MSB set: MOST sig bit first, Number of bits read/write: 8
a/A/@ controls AUX pin
I2C (mod spd)=( 0 1 )
*----------*
I2C>W
POWER SUPPLIES ON
Clutch engaged!!!
I2C>(1)
Searching I2C address space. Found devices at:
0xEC(0x76 W) 0xED(0x76 R)
I2C>[0xEC 0xD0[0xED r
I2C START BIT
WRITE: 0xEC ACK
WRITE: 0xD0 ACK
I2C START BIT
WRITE: 0xED ACK
READ: 0x60
I2C>(2)
Sniffer
Any key to exit
[0xEC+0x89+][0xED+0x6E-[][0xEC+]][0xED+]][0xEC+]][0xED+0xCF+][0xEC+]][0xED+]][0xEC+]][0xED+0x00-[][0xEC+]][0xED+0x65+][0xEC+]][0xED+]][0xEC+0x8E+][0xED+]][0xEC+]][0xED+]][0xEC+0x90+][0xED+0x2F+][0xEC+]][0xED+0x17+][0xEC+]][0xED+0xD0-[][0xEC+]][0xED+0x2D+][0xEC+0x94+][0xED+0x19+][0xEC+]][0xED+0x01+][0xEC+]][0xED+0x2B+][0xEC+]][0xED+]][0xEC+]][0xED+]][0xEC+0x9B+][0xED+0x26-[][0xEC+]][0xED+]][0xEC+]][0xED+]][0xEC+]][0xED+0x15+][0xEC+0x9F+][0xED+0x10-[][0xEC+0x9E+][0xED+0xBD-[][0xEC+]][0xED+0x97+][0xEC+]][0xED+0x03+][0xEC+]][0xED+0xD3+][0xEC+0xE3+][0xED+0x01+][0xEC+0xE4+][0xED+0x29+][0xEC+]][0xED+0x01+][0xEC+0xE6+][0xED+0x01+][0xEC+0xE5+][0xED+0x01+][0xEC+0xE7+][0xED+0x3D+][0xEC+0xF4+0x00+][0xEC+]][0xEC+0xF2+0x01+][0xEC+]][0xEC+0xD0+][0xED+0xC1+][0xEC+]][0xED+0x60-[][0xEC+]][0xED+0x01+][0xEC+]][0xED+0x4F+][0xEC+]][0xED+0x03+][0xEC+0x80+][0xED+]][0xEC+]][0xED+0xA1+][0xEC+]][0xED+]][0xEC+]][0xED+0x65+][0xEC+]][0xED+0x7D-[][0xEC+0x85+][0xED+0x05+][0xEC+0x86+][0xED+0x71+][0xEC+]][0xED+0x0D+][0xEC+]][0xED+]][0xEC+]][0xED+0xDD+][0xEC+]][0xED+]][0xEC+0x8B+][0xED+0xCF+][0xEC+]][0xED+0x65+][0xEC+0x8D+][0xED+0x01+][0xEC+]][0xED+]][0xEC+]][0xED+]][0xEC+]][0xED+0x17-[][0xEC+]][0xED+]][0xEC+]][0xED+]][0xEC+0x93+][0xED+0x0B-[][0xEC+0x94+][0xED+0x0C-[][0xEC+]][0xED+0x2D+][0xEC+0x96+][0xED+0x2B+][0xEC+]][0xED+0x01+][0xEC+0x98+][0xED+]][0xEC+]][0xED+]][0xEC+]][0xED+]][0xEC+]][0xED+0x4D+][0xEC+]][0xED+0x15+][0xEC+]][0xED+]][0xEC+]][0xED+]][0xEC+]][0xED+0x21+][0xEC+0xA0+][0xED+0x01+][0xEC+0xA1+][0xED+0x4B-[][0xEC+0xA2+][0xED+0xD1-[][0xEC+0xA3+][0xED+0x00-[][0xEC+]][0xED+0x01+][0xEC+0xA5+][0xED+0x01+][0xEC+0xA6+][0xED+0x01+][0xEC+0xA7+][0xED+0x01+][0xEC+]][0xED+0x01+][0xEC+]][0xED+0x01+][0xEC+]][0xED+0x01+][0xEC+]][0xED+0x01+][0xEC+]][0xED+0x67+][0xEC+]][0xED+0x01+][0xEC+0xAE+][0xED+0x00-[][0xEC+0xAF+][0xED+0xC0-[][0xEC+]][0xED+0x01+][0xEC+]][0xED+0x54-[][0xEC+]][0xED+0x01+][0xEC+]][0xED+0x01+][0xEC+0xB4+][0xED+0x00-[][0xEC+0xB5+][0xED+0x01+][0xEC+]][0xED+0xC1+][0xEC+]][0xED+0x05+][0xEC+]][0xED+0x01+][0xEC+]][0xED+0x03+][0xEC+0xBA+][0xED+0xFF-[][0xEC+]][0xED+]][0xEC+]][0xED+0x3F+][0xEC+]][0xED+0x9D+][0xEC+]][0xED+0x11+][0xEC+]][0xED+0x01+][0xEC+]][0xED+0x01+][0xEC+]][0xED+0x81+][0xEC+]][0xED+0x4F+][0xEC+]][0xED+0xFF-[][0xEC+]][0xED+0x00-[][0xEC+]][0xED+0x01+][0xEC+0xC6+][0xED+0x01+][0xEC+]][0xED+0x01+][0xEC+]][0xED+0x03+][0xEC+0xC9+][0xED+0x01+][0xEC+0xCA+][0xED+0x01+][0xEC+0xCB+][0xED+0x00-[][0xEC+]][0xED+0x01+][0xEC+]][0xED+0x01+][0xEC+0xCE+][0xED+0x01+][0xEC+]][0xED+0x01+][0xEC+0xD0+][0xED+0x60-[][0xEC+0xD1+][0xED+0x00-[][0xEC+]][0xED+0x01+][0xEC+0xD3+][0xED+0x01+][0xEC+]][0xED+0x01+][0xEC+]][0xED+0x01+][0xEC+]][0xED+0x01+][0xEC+]][0xED+0x00-[][0xEC+]][0xED+0x01+][0xEC+]][0xED+0x01+][0xEC+]][0xED+0x01+][0xEC+]][0xED+0x01+][0xEC+]][0xED+0x01+][0xEC+]][0xED+0x01+][0xEC+0xDE+][0xED+0x00-[][0xEC+0xDF+][0xED+0x01+][0xEC+]][0xED+0x01+][0xEC+]][0xED+0xD3+][0xEC+]][0xED+0x03+][0xEC+]][0xED+0x01+][0xEC+0xE4+][0xED+0x14-[][0xEC+0xE5+][0xED+0x00-[][0xEC+]][0xED+0x01+][0xEC+]][0xED+0x3D+][0xEC+]][0xED+0x67+][0xEC+]][0xED+0x83+][0xEC+0xEA+][0xED+0xFF-[][0xEC+0xEB+][0xED+0xFF-[][0xEC+0xEC+][0xED+]][0xEC+]][0xED+]][0xEC+]][0xED+]][0xEC+0xEF+][0xED+]][0xEC+0xF0+][0xED+0xFF-[][0xEC+0xF1+][0xED+0x01+][0xEC+]][0xED+0x03+][0xEC+]][0xED+0x19+][0xEC+]][0xED+0x4F+][0xEC+]][0xED+0x01+][0xEC+0xF6+][0xED+0x00-[][0xEC+0xF7+][0xED+0xB7+][0xEC+]][0xED+]][0xEC+]][0xED+0x01+][0xEC+]][0xED+]][0xEC+0xFB+][0xED+0x62-[][0xEC+]][0xED+0x01+][0xEC+]][0xED+0xF9+][0xEC+0xFE+][0xED+]][0xEC+]][0xED+]][0xEC+]][0xED+]][0xEC+0xFB+][0xED+0x67-[][0xEC+]][0xED+0x01+][0xEC+]][0xED+]][0xEC+]][0xED+0x67-[][0xEC+]][0xED+0x01+][0xEC+0xF7+][0xED+0xB7+][0xEC+]][0xED+]][0xEC+0xF9+][0xED+0x01+][0xEC+0xF7+][0xED+0xB7+][0xEC+0xF8+][0xED+0xD6-[][0xEC+]][0xED+0x01+][0xEC+0xF7+][0xED+0xB7+][0xEC+]][0xED+0xD6-[][0xEC+]][0xED+0x01+][0xEC+]][0xED+0xF9+][0xEC+0xFE+][0xED+0x0A-[]

The debug output via serial:

Starting BME280... result of .begin(): 0x60
Displaying ID, reset and ctrl regs
ID(0xD0): 0x60
Reset register(0xE0): 0x0
ctrl_meas(0xF4): 0x27
ctrl_hum(0xF2): 0x1


Displaying all regs
0x80:8E 50 89 32 7D 02 38 06 EC 6E E7 67 32 00 9F 8F 
0x90:17 D6 D0 0B 0C 16 15 00 F9 FF AC 26 0A D8 BD 10 
0xA0:00 4B D1 00 00 00 00 00 00 00 00 00 33 00 00 C0 
0xB0:00 54 00 00 00 00 60 02 00 01 FF FF 1F 4E 08 00 
0xC0:00 40 27 FF 00 00 00 00 01 00 00 00 00 00 00 00 
0xD0:60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
0xE0:00 69 01 00 14 00 00 1E 33 41 FF FF FF FF FF FF 
0xF0:FF 00 01 0C 27 00 00 5B D4 00 82 62 00 7C AD 80 


Displaying concatenated calibration words
dig_T1, uint16: 28396
dig_T2, int16: 26599
dig_T3, int16: 50
dig_P1, uint16: 36767
dig_P2, int16: -10729
dig_P3, int16: 3024
dig_P4, int16: 5644
dig_P5, int16: 21
dig_P6, int16: -7
dig_P7, int16: 9900
dig_P8, int16: -10230
dig_P9, int16: 4285
dig_H1, uint8: 75
dig_H2, int16: 361
dig_H3, uint8: 0
dig_H4, int16: 320
dig_H5, int16: 0
dig_H6, uint8: 30

Temperature: 25.30 degrees C
Temperature: 77.54 degrees F
Pressure: 98909.00 Pa
Altitude: 210.03m
Altitude: 689.06ft
%RH: 62.00 %

Temperature: 25.27 degrees C
Temperature: 77.52 degrees F
Pressure: 98910.00 Pa
Altitude: 209.94m
Altitude: 688.77ft
%RH: 64.00 %

The double read seems ok:

I2C>[0xec 0xf2 [0xed r r]
I2C START BIT
WRITE: 0xEC ACK
WRITE: 0xF2 ACK
I2C START BIT
WRITE: 0xED ACK
READ: 0x01
READ:  ACK 0x0C
NACK
I2C STOP BIT
@agatti

This comment has been minimized.

Copy link
Member Author

commented Sep 3, 2016

@coelner thanks for the report! Can you please check if using any newer firmware than r2088 trigger the problem on double read? Maybe if you can capture the signals in something I can open with Saleae Logic would also help if double read fails.

@coelner

This comment has been minimized.

Copy link

commented Sep 3, 2016

I tried this version: BPv3-firmware-v6.3-r2151_by_tayken-spi_fix.hex
So far, it seems to be the same. Unfortunalty I don't have a logic analyser. At least under windows ols and pulsesiew in combination with the buspirate fail.

@agatti agatti added the v3 label Sep 13, 2016

@mikebdp2

This comment has been minimized.

Copy link

commented Sep 18, 2016

@agatti, USBEprom is providing some test reports for BPv3 at DP forum
(BusPirate firmware 7.0 official thread) You may check it if you are curious...
http://dangerousprototypes.eu/forum/viewtopic.php?f=28&t=8498#p65306

@agatti

This comment has been minimized.

Copy link
Member Author

commented Sep 18, 2016

The scripting engine (BASIC interpreter) is disabled by default on v3, I'll see if I can re-enable it without going out of RAM. However the VREG LED not lighting up is sort of weird - I'll quickly look in the source code to see if anything went wrong when cleaning the selftest module up.

However, maybe it'd be helpful if people would post bugs here rather than on different forums, as not everyone has an account on dangerousprototypes' forum :)

@agatti

This comment has been minimized.

Copy link
Member Author

commented Sep 18, 2016

The LED issue has been fixed with 10e9ea1 - but for the BASIC interpreter I'm not sure about enabling it by default. Once enabled, v3 has literally 2% of RAM left, which means that the moment we add anything else we have to switch that one off.

@agatti

This comment has been minimized.

Copy link
Member Author

commented Sep 18, 2016

For the record, the BASIC interpreter can be enabled here:

#undef BP_ENABLE_BASIC_SUPPORT

@mikebdp2

This comment has been minimized.

Copy link

commented Sep 18, 2016

@agatti, wow, sure USBEprom will be happy to hear about this. Thank you!
By the way I wanted to rebuild BPv3-bootloader but noticed it doesn't contain MPLAB X file,
and can't find the sources too. Were they publicly released at some point of time?

@agatti

This comment has been minimized.

Copy link
Member Author

commented Sep 18, 2016

BPv3's bootloader had a troubled history. As you can see in /BPv3-bootloader, there are 5 different bootloaders, and there are different steps to take to upgrade from one version to the other.

If you're not using ICD and updating via the serial port, then http://dangerousprototypes.com/blog/2010/01/18/how-to-bus-pirate-bootloader-v4-upgrade/ is what you need to read first - then migrate firmware-v4.1, firmware-v4.3, firmware-v4.5, upgrader-v2tov4, and upgrader-v4tov4 from MPLAB 8 to MPLAB X.

Now, from the link on dangerousprototypes.com it seems like the user in question is using bootloader v4.4 - which is not available in source form. Chances are it is v4.5 but the bootloader version was not updated in the source code. Considering the elevated risk of bricking the board and have to resort to ICD, I'd be careful in touching this and just keep the bootloader as it is. Plus, it's written in 100% assembler, so you can crank up the optimisation level as high as you want but nothing will change...

@agatti

This comment has been minimized.

Copy link
Member Author

commented Sep 18, 2016

So, v4.4 is in firmware-v4.3. Moreover, here's the diff from v4.3 to v4.5:

agatti@tardigrade ~/src/Bus_Pirate/BPv3-bootloader $ diff firmware-v4.3/src/ firmware-v4.5/src
diff --git a/firmware-v4.3/src/ds30loader.s b/firmware-v4.5/src/ds30loader.s
index 19ff413..81809c0 100644
--- a/firmware-v4.3/src/ds30loader.s
+++ b/firmware-v4.5/src/ds30loader.s
@@ -147,7 +147,7 @@
 ;      .equ    STARTADDR,  ( FLASHSIZE - 2*(PAGESIZE * 2) )        /*place bootloader in 2nd last program page*/
        .equ    STARTADDR,  ( FLASHSIZE - (2* (PAGESIZE)) )         /*place bootloader in last program page*/
        .equ    BLCHECKST,  ( STARTADDR - (ROWSIZE) )           /*precalculate the first row write position that would overwrite the bootloader*/
-       .equ    BLVERSION,  0x0404  ;bootloader version for Bus Pirate firmware (located at last instruction before flash config words)
+       .equ    BLVERSION,  0x0405  ;bootloader version for Bus Pirate firmware (located at last instruction before flash config words)
 ;------------------------------------------------------------------------------
 ; Validate user settings
 ;------------------------------------------------------------------------------
@@ -316,6 +316,8 @@ setup:
        rcall   Receive
        sub     #HELLO, W0          ;check
        bra     z, helloOK      ; prompt
+       sub     #'#', W0            ;check
+       bra     z, exit     ; prompt

        SendL   'B'
        SendL   'L'

Whose only difference would be to not wait for commands if 0xE4 is sent as the first character instead of 0xC1. If the user was able to reflash a custom firmware, he's good to go and he's better off leaving that bootloader alone :)

@mikebdp2

This comment has been minimized.

Copy link

commented Sep 18, 2016

Interesting note about BASIC interpreter: with "s" option it takes just 69% instead of 98% ;)
But yes its optional feature, probably not many people need it, so could be disabled by default

@USBEprom

This comment has been minimized.

Copy link

commented Sep 19, 2016

Hi all.
Hoping not to mess.
I own a Bus Pirate revision 3.6 and normally I write on dangerousprototypes.com.
Here are some thought about the new firmware v7.0 for the Bus Pirate.
First I have to thanks mikebdp2, agatti, kallisti5 and all the guys involved in the project: THANKS!
So said, here you go:

I had a look into this 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.

bpv3_fw7.0_opt0_18092016.hex
bpv3_fw7.0_opt1_18092016.hex
bpv3_fw7.0_opt2_18092016.hex
bpv3_fw7.0_optS_18092016.hex

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:

Writing page 41 row 334, a700...OK
Writing page 41 row 335, a780...OK
Erasing page 42, a800...ERROR [50]

Error updating firmware :(

Based on explanation of mikebdp2 and 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

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.

Based on some bugs listed here viewtopic.php?f=28&t=6097, I have digged more deeply.
So,

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).

I have not an oscilloscope so I can not say if SPI protocol is okay or still has the MOSI problems (viewtopic.php?f=4&t=6667#p58785) fixed by tayken doing correction of typo found by luftek (viewtopic.php?f=4&t=6667&start=15#p59041)

I can not test if the i2c timeout problem has been fixed or not (viewtopic.php?f=4&t=8546).

Last but not least, the software flashrom_v0.9.9_Win does work!


bpv3_fw7.0_opt1_features.hex
bpv3_fw7.0_opt2_features.hex
bpv3_fw7.0_optS_features.hex

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:

Writing page 41 row 334, a700...OK
Writing page 41 row 335, a780...OK
Erasing page 42, a800...ERROR [50]

Error updating firmware :(

Based on explanation of mikebdp2 and 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
Found 0 errors.
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
HiZ(BASIC)>exit (now it is active and working)
Ready
HiZ>$
Are you sure? y
BOOTLOADER

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.

Based on some bugs listed here viewtopic.php?f=28&t=6097, I have digged more deeply.
So,

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)

I have not an oscilloscope so I can not say if SPI protocol is okay or still has the MOSI problems (viewtopic.php?f=4&t=6667#p58785) fixed by tayken doing correction of typo found by luftek (viewtopic.php?f=4&t=6667&start=15#p59041)

I can not test if the i2c timeout problem has been fixed or not (viewtopic.php?f=4&t=8546)

Last but not least, the software flashrom_v0.9.9_Win does work!

Hoping those are useful.
Thank you friends!

Be seeing you.

U.Sb

@agatti

This comment has been minimized.

Copy link
Member Author

commented Sep 20, 2016

@USBEprom I limited the buffer size on v3 to 127 characters due to memory constraints when trying to fit as many module as possible:

#define BP_COMMAND_BUFFER_SIZE 128
- that can be easily set back to 255 but I'm not sure if I can still fit the BASIC interpreter in as well.

@agatti agatti referenced this issue Sep 20, 2016

Closed

DIO does not work #16

@tbox1911

This comment has been minimized.

Copy link

commented Nov 7, 2016

@USBEprom ,
Glad to ear that good news,
is it possible to have a copy of your firmware , the Golden One !
( don't see any link, to download it)

I want to test this version
Big thanks

@USBEprom

This comment has been minimized.

Copy link

commented Nov 7, 2016

Hi tbox1911.
All the firmwares I built I put them on the forum of dangerousprototypes.
However here you go what you are looking for:

http://dangerousprototypes.com/forum/viewtopic.php?f=28&t=8498&start=45#p65498
http://dangerousprototypes.com/forum/viewtopic.php?f=28&t=8498&start=45#p65500

Please note that the firmware compressed with option "1" in the first link have to be converted uppercase for its use because I forgot to did it when I made the archive.
If you can not do the conversion simply jump on the second link where is the same firmware already converted and ready to use.
All the firmware that I have compiled are the work of agatti and others that I thank for the hard work and skills.
Enjoy!

@USBEprom

This comment has been minimized.

Copy link

commented Nov 10, 2016

@agatti

Hi sir.
You are the greatest and incredibly fast!
For me your changes work really fine.
Actually I do not use DIO mode in too complicated ways.
For me it was more of a cosmetic issue.
Now it works well for me, but of course I intend to deepen further.
I do not think, however, that problems will arise.
Here you go a snapshot of my terminal:

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)>11
Clutch disengaged!!!
To finish setup, start up the power supplies with command 'W'

Ready
DIO>(0)
ERROR: command has no effect here

Syntax error at char 3
DIO><0>

  1. <>
  2. <>
  3. <>
    DIO>|0b100110
    0x64 = 100 = 0b01100100
    DIO>=0x7E
    0x7E = 126 = 0b01111110
    DIO>

Repeat, for me it is solved.
Now it behaves just as I had in mind.
Thank you agatti!!!

http://dangerousprototypes.com/forum/viewtopic.php?f=28&t=8498&p=65518#p65518

@USBEprom

This comment has been minimized.

Copy link

commented Nov 12, 2016

Hi guys.
Today I am trying to build a new firmware release starting from the very latest cleaned up repository.
Because I want to compile for the Bus Pirate revision 3 a fimware version that allows to simultaneously have 256 characters for the command line and BASIC scripting capabilities I need to change basic.h putting #define PGMSIZE 512 instead of the standard #define PGMSIZE 1024 that there is.
It should be in line 105 or however somewhere still there in basic.h, but the tag #define PGMSIZE is not present anymore now.
Where is it?
How do I must do change for my purpose?
Thanks.

Then, out as simple curiosity.
In the recent past new speeds in the SPI menu have been added.
It was explained how to change spi.c for the new speeds as also the reason for which they have been ordered in a given way, but where the related messages are in the case someone wanted to order them in another way?
I do not know if something is different now with the new cleaned up repository.
Thanks.

@agatti

This comment has been minimized.

Copy link
Member Author

commented Nov 12, 2016

@USBEprom

This comment has been minimized.

Copy link

commented Nov 12, 2016

@agatti

Thank you sir, I get it now.
So I have changed lines 304-319 into configuration.h for setting the features I want.

#ifdef BUSPIRATEV3
#undef BP_ENABLE_1WIRE_SUPPORT
#undef BP_ENABLE_BASIC_SUPPORT
#undef BP_ENABLE_DIO_SUPPORT
#undef BP_ENABLE_HD44780_SUPPORT
#define BP_ENABLE_I2C_SUPPORT
#define BP_ENABLE_JTAG_SUPPORT
#undef BP_ENABLE_PIC_SUPPORT
#undef BP_ENABLE_PC_AT_KEYBOARD_SUPPORT
#undef BP_ENABLE_RAW_2WIRE_SUPPORT
#undef 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 */

I changed the line 405 too in this way

#define BP_BASIC_PROGRAM_SPACE 512

in order to make room for BASIC scripting.

Finally I changed line 523 from

#define BP_COMMAND_BUFFER_SIZE 128

to

#define BP_COMMAND_BUFFER_SIZE 256

in order to get up 256 characters for the command line.
While compiling I get these messages

"F:\MPLABX\XC16\bin\xc16-gcc.exe" ../spi.c -o build/BusPirate_v3/production/_ext/1472/spi.o -c -mcpu=24FJ64GA002 -MMD -MF "build/BusPirate_v3/production/_ext/1472/spi.o.d" -g -omf=elf -DXPRJ_BusPirate_v3=BusPirate_v3 -no-legacy-libc -mlarge-code -mlarge-data -Os -I"../../microchip/include" -I".." -I"../translations" -msmart-io=1 -Werror -Wall -msfr-warn=off -save-temps
"F:\MPLABX\XC16\bin\xc16-gcc.exe" ../uart.c -o build/BusPirate_v3/production/_ext/1472/uart.o -c -mcpu=24FJ64GA002 -MMD -MF "build/BusPirate_v3/production/_ext/1472/uart.o.d" -g -omf=elf -DXPRJ_BusPirate_v3=BusPirate_v3 -no-legacy-libc -mlarge-code -mlarge-data -Os -I"../../microchip/include" -I".." -I"../translations" -msmart-io=1 -Werror -Wall -msfr-warn=off -save-temps
../openocd.c:11:29: fatal error: bus_pirate_core.h: No such file or directory
compilation terminated.
make[2]: *** [build/BusPirate_v3/production/_ext/1472/openocd.o] Error 255
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
"F:\MPLABX\XC16\bin\xc16-gcc.exe" ../openocd.c -o build/BusPirate_v3/production/_ext/1472/openocd.o -c -mcpu=24FJ64GA002 -MMD -MF "build/BusPirate_v3/production/_ext/1472/openocd.o.d" -g -omf=elf -DXPRJ_BusPirate_v3=BusPirate_v3 -no-legacy-libc -mlarge-code -mlarge-data -Os -I"../../microchip/include" -I".." -I"../translations" -msmart-io=1 -Werror -Wall -msfr-warn=off -save-temps
nbproject/Makefile-BusPirate_v3.mk:464: recipe for target 'build/BusPirate_v3/production/_ext/1472/openocd.o' failed
make[2]: Leaving directory 'F:/MPLAB/Bus_Pirate-master_12112016/Bus_Pirate-master/Firmware/busPirate.X'
nbproject/Makefile-BusPirate_v3.mk:84: recipe for target '.build-conf' failed
make[1]: Leaving directory 'F:/MPLAB/Bus_Pirate-master_12112016/Bus_Pirate-master/Firmware/busPirate.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed

and the operation fails.
What is wrong?
I guess I am doing something bad but I am babo and I do not know what.

Also I know I am boring a lot, but I took a look inside configuration.h and I do not understand where are the messages related to speeds coded into spi.c.
Thanks.

@agatti

This comment has been minimized.

Copy link
Member Author

commented Nov 12, 2016

I fixed the build error with 4f44d08, thanks for noticing.

If you want to reorder the SPI bus speeds, you have to edit the string files in tools/packstrings/bus_pirate_v?_strings.txt, regenerate the messages_v?.h/messages_v?.s running the python script in tools/packstrings, overwrite the message files in the Firmware directory with what you just generated, then you need to reorder the entries in spi_bus_speed inside Firmware/spi.c. If you want to add more, things get a bit more complicated, and there are limits on how many speeds you can add before breaking the binary serial I/O protocol.

@USBEprom

This comment has been minimized.

Copy link

commented Nov 12, 2016

@agatti

Thank you very much sir, now it work!

http://dangerousprototypes.com/forum/viewtopic.php?f=28&t=8498&start=45#p65526

Thanks also for the explanations about what I asked.
These informations are useful to me because I am trying to figure out the matter so I can fend for myself without disturbing anyone.

@USBEprom

This comment has been minimized.

Copy link

commented Nov 13, 2016

#32

@agatti

This comment has been minimized.

Copy link
Member Author

commented Nov 13, 2016

@USBEprom can you please create a new issue for this? I'm going to close this one as it is no longer for "test firmware on v3" anymore.

@USBEprom

This comment has been minimized.

Copy link

commented Nov 13, 2016

@agatti

Sorry sir.
You are right.
I edited my previous post.
I hope I have added the new issue in the proper way.
Apologize for having put it in the wrong place.
Thanks.

@agatti agatti closed this Nov 13, 2016

@elsni

This comment has been minimized.

Copy link

commented Dec 21, 2016

Just bought a new BP 3.6. It has Firmware v5.10 preinstalled, but unfortunately it has no JTAG support, so I need to flash a different one.

After following a bunch of red herring links wasting almost an hour, I finally managed to find pirate-loader and the 7.0 fw hex files for download.

Unfortunately I can't flash the fw. pirate-loader tells me "Checksum does not match, line 4" on every hex file. Converting an hex file to uppercase makes no difference. What am I doing wrong?
Thanks for any advice!

@agatti

This comment has been minimized.

Copy link
Member Author

commented Dec 21, 2016

@elsni can you please let us know which OS you're using and whether you built the pirate-loader binary yourself from this source code repo or if you're using a pre-built version that came with older firmware packages?

@USBEprom

This comment has been minimized.

Copy link

commented Dec 21, 2016

@elsni

Do you mean also the factory ones by writing "on every hex file"?
The factory firmwares should already be in the correct format without any need of having to convert them, then at least those should work without problems.
What do you use to convert the hexadecimal content?
What is the operating system you are using?

@elsni

This comment has been minimized.

Copy link

commented Dec 22, 2016

Hi,
Thank you @agatti and @USBEprom for quick reply!
At first I used Windows 10 and the precompiled binary from /jevinskie/bus-pirate and the hex files in that repository.
I tried again on my kubuntu machine but I compiled pirate-loader from source. That worked, I managed to flash fw 6.3 successfully from a hex file in that repository. I did not convert any binary file to hex by myself.
Unfortunately that version of 6.3 does not have jtag support either. Which one can I use?

@USBEprom

This comment has been minimized.

Copy link

commented Dec 22, 2016

Hi elsni.
It is weird that the firmware you have used (https://github.com/jevinskie/bus-pirate) does not support JTAG.
This because here:

http://dangerousprototypes.com/docs/Bus_Pirate#JTAG

it said that 6.0 and 6.1 firmwares do contain JTAG terminal mode, hence they have the binary JTAG mode.
However take a look at these:

http://dangerousprototypes.com/docs/Bus_Pirate_firmware_change_history

May be you must compile yourself the source in order to build your own firmware.
If for any reason you can not do that, try these that are ready to use:

http://dangerousprototypes.com/forum/viewtopic.php?f=4&t=8637#p65660

I do not know if at least one of them allows for JTAG support because I have not seen their configuration setup.
Unfortunately, for what I have read, these repositories do not use configuration.h but something else to switch active features so I can not build from them new firmwares where the JTAG support is active.

@pixeldoc2000

This comment has been minimized.

Copy link

commented Dec 27, 2016

Hey,
i've tested Community Firmware v7.0 on my BusPirate v3b.

Hardware: BusPirate v3b
Bootloader: v4.3
OS: Windows 7 x64

pirate-loader.exe from https://github.com/mikebdp2/Bus_Pirate/tree/master/BPv3-bootloader/v4xtov43-bootloader-update/utilities/pirate-loader.exe

Firmware Files

bpv3_fw7.0_opt0_18092016.hex
bpv3_fw7.0_opt1_18092016.hex
bpv3_fw7.0_opt2_18092016.hex
bpv3_fw7.0_optS_18092016.hex

I've converted the Firmware Files to uppercase with to_upper.bat to be able to use pirate-loader.exe . Without conversion pirate-loader.exe does not like the Firmware File with lowercase (Checksum does not match, line 4 , Could not load HEX file, result=-1).

D:\BusPirate>pirate-loader.exe --dev=COM16 --hex=bpv3_fw7.0_opt0_18092016_uppercase.hex
+++++++++++++++++++++++++++++++++++++++++++
  Pirate-Loader for BP with Bootloader v4+
  Loader version: 1.0.2  OS: WINDOWS
+++++++++++++++++++++++++++++++++++++++++++

Parsing HEX file [bpv3_fw7.0_opt0_18092016_uppercase.hex]
Found 18579 words (55737 bytes)
Fixing bootloader/userprogram jumps
Opening serial device COM16...OK
Configuring serial port settings...OK
Sending Hello to the Bootloader...OK

Device ID: PIC24FJ64GA002 [d4]
Bootloader version: 1,02
Erasing page 0, 0000...OK
Writing page 0 row 0, 0000...OK
Writing page 0 row 1, 0080...OK
Writing page 0 row 2, 0100...OK
Writing page 0 row 3, 0180...OK
Writing page 0 row 4, 0200...OK
Writing page 0 row 5, 0280...OK
Writing page 0 row 6, 0300...OK
Writing page 0 row 7, 0380...OK
Erasing page 1, 0400...OK
Writing page 1 row 8, 0400...OK
Writing page 1 row 9, 0480...OK
Writing page 1 row 10, 0500...OK
Writing page 1 row 11, 0580...OK
Writing page 1 row 12, 0600...OK
Writing page 1 row 13, 0680...OK
Writing page 1 row 14, 0700...OK
Writing page 1 row 15, 0780...OK
Erasing page 2, 0800...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 :(

All Firmware Versions work, besides the bootloader protection error (ERROR [50]).

Test Results for all Firmware Versions are the same

HiZ>i
Bus Pirate v3.b
Community Firmware v7.0 - goo.gl/gCzQnW [HiZ UART I2C SPI] Bootloader v4.3
DEVID:0x0447 REVID:0x3043 (24FJ64GA002 B5)
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(5.18) OK
VPU(5.17) OK
3.3V(3.40) OK
ADC(3.43) OK
Bus high
MOSI OK
CLK OK
MISO FAIL
CS OK
Bus Hi-Z 0
MOSI FAIL
CLK OK
MISO OK
CS OK
Bus Hi-Z 1
MOSI OK
CLK OK
MISO FAIL
CS OK
MODE and VREG LEDs should be on!     <--- OK
Any key to exit
Found 3 errors.


$ (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"

Why does MISO Test fail ?

EDIT: Looks like i've damaged the PIC24FJ64GA002 MCU of my BPv3 at my last adventure. MOSI is always HIGH and MISO is always LOW no matter what.

@USBEprom

This comment has been minimized.

Copy link

commented Dec 27, 2016

Hi pixeldoc2000.
First thanks for reporting Community Firmware v7.0 on a real BusPirate v3b.
Unfortunately your Bus Pirate could be really broken.
In order to troubleshoot the problem you can chase it doing what it is explain here:

http://dangerousprototypes.com/forum/viewtopic.php?f=4&t=7047

Basically you can test all the pins of your Bus Pirate for short circuit, cold welds or any else fault.

@pixeldoc2000

This comment has been minimized.

Copy link

commented Dec 27, 2016

Hi @USBEprom.
i already did some hardware tests: http://dangerousprototypes.com/docs/Bus_Pirate_self-test_guide

EDIT: Looks like i've damaged the PIC24FJ64GA002 MCU of my BPv3 at my last adventure. MOSI is always HIGH and MISO is always LOW no matter what.

I've bought a BPv4 as a replacement for my broken BPv3 because I really like the BP Conecpt and the new Community Firmware effords.

@ttelford

This comment has been minimized.

Copy link

commented Jan 19, 2017

Update from my testing:

I'm only testing the current set of binaries; I don't have time at the moment to get the dev stack installed to build the latest from it.

I have the BPv3.6 hardware

Each hex ends badly - and identically.

bpv3_fw7.0_opt0_18092016.hex

Erasing page 42, a800...ERROR [50]
Error updating firmware :(

bpv3_fw7.0_opt1_18092016.hex
Erasing page 42, a800...ERROR [50]
Error updating firmware :(

bpv3_fw7.0_opt2_18092016.hex
Erasing page 42, a800...ERROR [50]
Error updating firmware :(

bpv3_fw7.0_optS_18092016.hex
Erasing page 42, a800...ERROR [50]
Error updating firmware :(

Downgrading to 6.1 works - though it doesn't attempt to write page 42.

I haven't updated the boot loader - perhaps that may be involved?

Device ID: PIC24FJ64GA002 [d4]
Bootloader version: 1,02
@USBEprom

This comment has been minimized.

Copy link

commented Jan 19, 2017

@ ttelford

Hi ttelford.
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:

http://dangerousprototypes.com/forum/viewtopic.php?f=28&t=8498&start=15

and especially these with careful:

http://dangerousprototypes.com/forum/viewtopic.php?f=28&t=8498&start=15#p65317

#7 (comment)

If something is not wrong

ttelford wrote:

Bootloader version: 1,02

It is very old.
First you must upgrade it in order to upgrade firmware in the right way.

I guess there is a typo in here.

ttelford wrote:

Device ID: PIC24FJ64GA002 [d4]

Silicon revision d4 does not exist:

http://ww1.microchip.com/downloads/en/DeviceDoc/80000470h.pdf

(follow up: http://dangerousprototypes.com/forum/viewtopic.php?f=4&t=8650#p65737)

@ttelford

This comment has been minimized.

Copy link

commented Jan 19, 2017

Bootloader version: 1,02
Device ID: PIC24FJ64GA002 [d4]

Silicon revision d4 does not exist:

Not a typo in either case. It's a direct copy/paste.

Still, nice to know The path forward.

@USBEprom

This comment has been minimized.

Copy link

commented Jan 20, 2017

@ ttelford

About what you wrote "Bootloader version: 1,02", seems it is the ds30 loader version, not your own version of the bootloader.
Look here:

http://dangerousprototypes.com/forum/viewtopic.php?f=4&t=703&p=6862#p6480

About the silicon revision [d4] (Device ID: PIC24FJ64GA002 [d4]) actually you are right, I did not knew it.

@ttelford

This comment has been minimized.

Copy link

commented Jan 25, 2017

Perhaps a bit more about my hardware (and software) is in order:

I've been using pirate-loader exclusively, on either Linux or OS X (whichever is close to me a the time...) Does ds30 share code with pirate-loader?

I also managed to get a hold of a second, "brand new" (2015 manufacture) Bus Pirate 3.5.

Both of my Bus Pirate 3's currently report the following:

HiZ>i
Bus Pirate v3.5
Firmware v6.1 r1676  Bootloader v4.4
DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8)
http://dangerousprototypes.com

I'm still seeing the exact same error I reported above with the new firmware images.

On a side note: My single Bus Pirate v4 updated to the new release just fine.

@USBEprom

This comment has been minimized.

Copy link

commented Jan 27, 2017

@ ttelford

The message you wrote

ttelford wrote:

HiZ>i
Bus Pirate v3.5
Firmware v6.1 r1676 Bootloader v4.4
DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8)
http://dangerousprototypes.com

is totally right.
As I already wrote you must just ignore the message of error, it is not a real issue.
I do not know if ds30 does share code with pirate-loader, sorry.
I know the issue is not into the bootloader or the firmware for sure.
The issue do not plagues the Bus Pirate revision 4, so what you wrote is just what is expected.
#26 (comment)
So in the end the silicon revision of your devices actually is B8, not D4.

@USBEprom

This comment has been minimized.

Copy link

commented Jan 28, 2017

Some doubts.
as agatti wrote:
#7 (comment)
I was able to build my own version of the firmware for the Bus Pirate v3 where all the features are unlocked, BASIC too (dangerousprototypes.com/forum/download/file.php?id=12196).
In order to reach the goal among the other things I had to switch #define PGMSIZE 1024 to #define PGMSIZE 512.
I do not understand some things.
Today I wanted to verify the exact amount of the space of RAM available in BASIC.
Seems to me that factory firmware v5.10 allows up 65535 lines for BASIC.
I have downloaded the factory firmware v5.10 into my Bus Pirate revision 3, then I switched to BASIC where I put in a simple sequence of REM in order to evaluate how much room should be avalaible to storage scripts in BASIC.
I was able to enter more than 700 program lines occupying 3kB into the RAM, but I could enter other lines apparently without any problem.
So apparently by reserving 1024 bytes for the BASIC should be possible to enter more than that quantity of bytes, that it sounds weird.
Indeed this does not match with the value 1024 that is used into #define PGMSIZE.
I have not gone over and I have updated my Bus Pirate with the firmware v7.0 that I built.
With it I was able to insert up 128 lines of program which are exactly 511 bytes, I could not go further.
This match with the value 512 that I put into #define PGMSIZE.
Now I know that although into both the firmwares v5.10 and the v7.0 that I built from myself BASIC was unlocked and command line up to 256 characters, my v7.0 has many unlocked features than v5.10, but I do not understand such a big gap based on using the value 1024 or its half.
So my question is, is there some way to predict the exact amount of available space for BASIC by evaluating the features unlocked into the firmware before build it?
Honestly I did not expect a real value of 32767 lines (half of 65535 lines), but not even a such big gap:

#define PGMSIZE 1024 (factory firmware v5.10) = over 3kB (over 700 lines of REM), I do not even know exactly what it actually is, I have not verified precisely.

#define PGMSIZE 512 (firmware v7.0 built by myself) = up 511 bytes (exactly 128 lines of REM), not one more.

Thanks.

@agatti

This comment has been minimized.

Copy link
Member Author

commented Feb 2, 2017

Given that we now have users who are trying the firmware on v3 boards, I guess it's time to retire this ticket.

If you have issues related to the community firmware on Bus Pirate v3 boards, please open a new bug if none of the currently open ones match your issue, thank you.

This issue has been closed since months, so please open another issue instead of posting here - it makes management easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.