Bus Pirate firmware auto build: main branch

Here’s a fresh compile from ‘main’: “1-wire PIO program fixed on all hardware (yeah!). Includes port of Pico SDK 1-wire program (not working)”

ci-buspirate-main-e824122.zip

Build time: 105.51 seconds

Git pull log @e824122:
Updating 1041c67…e824122
Fast-forward
.clang-format | 16 +++++
CMakeLists.txt | 3 +
binmode/logicanalyzer.c | 20 ++±–
binmode/logicanalyzer.h | 3 ±
commands/global/logic.c | 35 ++++++++±-
mode/hw1wire.c | 31 ++++++++±
pirate/hw1wire.pio | 10 ±-
pirate/onewire_library.c | 147 +++++++++++++++++++++++++++++++++++++++++++++
pirate/onewire_library.h | 16 +++++
pirate/onewire_library.pio | 96 +++++++++++++++++++++++++++++
10 files changed, 356 insertions(+), 21 deletions(-)
create mode 100644 .clang-format
create mode 100644 pirate/onewire_library.c
create mode 100644 pirate/onewire_library.h
create mode 100644 pirate/onewire_library.pio

1 Like

Here’s a fresh compile from ‘main’: “add -a flag to bug command to check all IO pins for E9 errata”

ci-buspirate-main-c496cf4.zip

Build time: 102.11 seconds

Git pull log @c496cf4:
Updating e824122…c496cf4
Fast-forward
CMakeLists.txt | 3 ±
commands/global/bug.c | 80 +++++++++++++++++++++++++++++++++++++++++±--------
lib/pio_pwm/pwm.pio | 33 +++++++++++++++++++++
3 files changed, 101 insertions(+), 15 deletions(-)
create mode 100644 lib/pio_pwm/pwm.pio

Here’s a fresh compile from ‘main’: "updating to address pip changes

now using the default cmake instead of the python one to align to the
operting system’s preferred directions. this shouldn’t really be an
issue as there’s nothing extremely fancy going on in cmake

also moving the docker compose to my personal repo for now, need to talk
with the bp team if they’re fine with me actually pushing a real org for
them."

ci-buspirate-main-2c25f65.zip

Build time: 102.96 seconds

Git pull log @2c25f65:
Updating c496cf4…2c25f65
Fast-forward
.devcontainer/devcontainer.json | 6 ++++++
docker-compose.yml | 4 +±-
docker/Dockerfile | 24 +++++++++++++++++±-----
docker/entrypoint.sh | 0
readme.md | 4 +±-
5 files changed, 28 insertions(+), 10 deletions(-)
create mode 100644 .devcontainer/devcontainer.json
mode change 100644 => 100755 docker/entrypoint.sh

Here’s a fresh compile from ‘main’: “Add legacy mode for third parties flashrom avrdude”

ci-buspirate-main-5bbaed7.zip

Build time: 101.83 seconds

Git pull log @5bbaed7:
Updating 2c25f65…5bbaed7
Fast-forward
CMakeLists.txt | 1 +
binmode/binmodes.c | 8 +
binmode/binmodes.h | 1 +
binmode/legacy4third.c | 849 +++++++++++++++++++++++++++++++++++++++++++++++++
binmode/legacy4third.h | 3 +
5 files changed, 862 insertions(+)
create mode 100644 binmode/legacy4third.c
create mode 100644 binmode/legacy4third.h

2 Likes

Here’s a fresh compile from ‘main’: "Update build.yaml

Do not fail fast … try to complete all builds even if one fails.

Temporarily remove windows-latest due to continued build failures."

ci-buspirate-main-c3b3110.zip

Build time: 111.86 seconds

Git pull log @c3b3110:
Updating 5bbaed7…c3b3110
Fast-forward
.github/workflows/build.yaml | 3 +±
1 file changed, 2 insertions(+), 1 deletion(-)

Here’s a fresh compile from ‘main’: “trim whitespace at line ends.”

ci-buspirate-main-dd378d1.zip

Build time: 115.54 seconds

Git pull log @dd378d1:
Updating c3b3110…dd378d1
Fast-forward
commands/uart/bridge.c | 11 ++++±–
mode/hwuart.c | 76 +++++++++++++++++++++++++++++++++++++++±---------
mode/hwuart.h | 4 +±
pirate.h | 4 ±-
translation/base.h | 8 ++++++
translation/bs-ba.h | 12 +++++±-
translation/en-us.h | 52 ++++++++++++++++++±--------------
translation/en-us.json | 12 +++++±-
translation/it-it.h | 12 +++++±-
translation/pl-pl.h | 12 +++++±-
translation/zh-cn.h | 12 +++++±-
11 files changed, 161 insertions(+), 54 deletions(-)

Here’s a fresh compile from ‘main’: "en-us.h

  • Translation selection should be in language it represents

json2h.py

  • Prevent accidental translation of language selection text using regex (to avoid constant need to update this script).
  • Explicitly require Python 3.7 or higher
  • Warn about non-compliant identifiers
  • Tabs to spaces in generated .h files
  • Use functions to logically separate code portions
  • Provide progress output
  • output fixed-width key (also helps highlight overlong identifiers)

*.json

  • Remove unused key/value pairs. Generated .h files were unchanged, confirming non-use"

ci-buspirate-main-67afc30.zip

Build time: 114.05 seconds

Git pull log @67afc30:
Updating dd378d1…67afc30
Fast-forward
translation/base.h | 898 +++++++++++++++++++++++±------------------------
translation/bs-ba.h | 890 +++++++++++++++++++++++±-----------------------
translation/bs-ba.json | 14 -
translation/en-us.h | 14 ±
translation/en-us.json | 878 ++++++++++++++++++++++±-----------------------
translation/it-it.h | 890 +++++++++++++++++++++++±-----------------------
translation/it-it.json | 5 -
translation/json2h.py | 260 +++++++±-----
translation/pl-pl.h | 890 +++++++++++++++++++++++±-----------------------
translation/pl-pl.json | 14 -
translation/zh-cn.h | 890 +++++++++++++++++++++++±-----------------------
translation/zh-cn.json | 14 -
12 files changed, 2840 insertions(+), 2817 deletions(-)

Here’s a fresh compile from ‘main’: "PR to fix some problems with the storage (#106)

  • Add intermediate states to the sense output during insert/eject
  • expose insert_usbmsdrive
  • Add a mutex to protect the Dhara layer from concurrent access"

ci-buspirate-main-1a493ec.zip

Build time: 111.05 seconds

Git pull log @1a493ec:
Updating 67afc30…1a493ec
Fast-forward
fatfs/ff.c | 7 ±
msc_disk.c | 190 ++++++++++++++++++++++++++++++++++±-------------
msc_disk.h | 11 ±-
nand/nand_ftl_diskio.c | 16 ++±-
pirate.c | 4 ±
5 files changed, 157 insertions(+), 71 deletions(-)

Here’s a fresh compile from ‘main’: "Fix a deadlock issue introduced by the diskio_mutex (#109)

  • Fix a deadlock introduced with the diskio_mutex
  • Also fix minor PR review issues/comments"

ci-buspirate-main-9c0bfa4.zip

Build time: 115.21 seconds

Git pull log @9c0bfa4:
Updating 1a493ec…9c0bfa4
Fast-forward
msc_disk.c | 24 ++++++++++++++++++++±–
nand/nand_ftl_diskio.c | 11 +++++++±–
2 files changed, 29 insertions(+), 6 deletions(-)

Here’s a fresh compile from ‘main’: "sfud: Add M25P128

Add the 16MB SPI-NOR M25P128. This chip doesn’t support SFDP so it needs
to be looked up based on the RDID information.

The memory is organized as:

  • 16777216 bytes (8 bits each)
  • 64 sectors (2 Mbits, 262144 bytes each)
  • 65536 pages (256 bytes each)."

ci-buspirate-main-e06c119.zip

Build time: 109.0 seconds

Git pull log @e06c119:
Updating 9c0bfa4…e06c119
Fast-forward
lib/sfud/inc/sfud_flash_def.h | 1 +
1 file changed, 1 insertion(+)

Here’s a fresh compile from ‘main’: “bitmap file info”

ci-buspirate-main-ceb162e.zip

Build time: 112.66 seconds

Git pull log @ceb162e:
Updating e06c119…ceb162e
Fast-forward
CMakeLists.txt | 1 +
commands.c | 2 +
commands/global/image.c | 265 ++++++++++++++++++++++++++++++++++++++++++++++++
commands/global/image.h | 1 +
platform/bpi-rev10.h | 4 +
platform/bpi-rev8.h | 4 +
platform/bpi-rev9.h | 4 +
platform/bpi5-rev10.h | 4 +
platform/bpi5xl-rev0.h | 4 +
platform/bpi6-rev1.h | 4 +
10 files changed, 293 insertions(+)
create mode 100644 commands/global/image.c
create mode 100644 commands/global/image.h

Here’s a fresh compile from ‘main’: “new image to header script does all pre- and post processing to C header file. Flips image, resize, convert to 565, and reshuffel pixel byte order. New background image header, improved screen draw time and startup time.”

ci-buspirate-main-bf74659.zip

Build time: 111.2 seconds

Git pull log @bf74659:
Updating ceb162e…bf74659
Fast-forward
CMakeLists.txt | 4 ±
{font => display}/background.h | 0
…/background_image_v4-orig.h | 0
display/background_image_v4.h | 334 +++++++++++++++++++++
display/backv2b-2.bmp | Bin 0 → 153666 bytes
display/image.py | 62 ++++
display/robot16.bmp | Bin 0 → 153666 bytes
display/robot16.h | 328 ++++++++++++++++++++
display/robot24.bmp | Bin 0 → 230454 bytes
ui/ui_lcd.c | 16 ±
10 files changed, 735 insertions(+), 9 deletions(-)
rename {font => display}/background.h (100%)
rename font/background_image_v4.h => display/background_image_v4-orig.h (100%)
create mode 100644 display/background_image_v4.h
create mode 100644 display/backv2b-2.bmp
create mode 100644 display/image.py
create mode 100644 display/robot16.bmp
create mode 100644 display/robot16.h
create mode 100644 display/robot24.bmp

Here’s a fresh compile from ‘main’: “flip image if width is less than height”

ci-buspirate-main-72b299b.zip

Build time: 115.45 seconds

Git pull log @72b299b:
Updating bf74659…72b299b
Fast-forward
display/image.py | 7 +++++±
1 file changed, 6 insertions(+), 1 deletion(-)

Here’s a fresh compile from ‘main’: “Use fixed table size for generated translation”

ci-buspirate-main-9ee581a.zip

Build time: 108.61 seconds

Git pull log @9ee581a:
Updating 72b299b…9ee581a
Fast-forward
commands/global/freq.c | 14 +±–
commands/global/i_info.c | 47 ++++++±------
commands/global/l_bitorder.c | 8 ±-
commands/global/p_pullups.c | 8 ±-
commands/global/pause.c | 8 ±-
commands/global/pwm.c | 10 ±-
commands/global/v_adc.c | 4 ±
commands/global/w_psu.c | 12 +±-
commands/hdplxuart/bridge.c | 2 ±
commands/i2c/demos.c | 6 ±
commands/uart/bridge.c | 2 ±
commands/uart/monitor.c | 6 ±
commands/uart/nmea.c | 2 ±
display/scope.c | 2 ±
mode/binloopback.c | 8 ±-
mode/hiz.c | 4 ±
mode/hw1wire.c | 10 ±-
mode/hw2wire.c | 18 ++±–
mode/hwhduart.c | 24 +++±—
mode/hwi2c.c | 22 ++±—
mode/hwled.c | 18 ++±–
mode/hwspi.c | 24 +++±—
mode/hwuart.c | 30 +++±----
modes.c | 16 +±–
nand/spi.c | 2 ±
syntax.c | 24 +++±—
toolbars/logic_bar.c | 2 ±
translation/base.c | 143 ++++++++++++++++++++++++++++++++++±-------
translation/base.h | 18 ++++±
translation/base.ht | 18 ++++±
translation/bs-ba.h | 11 ++±
translation/bs-ba.json | 56 -----------------
translation/en-us.h | 2 +
translation/it-it.h | 11 ++±
translation/it-it.json | 50 ---------------
translation/json2h.py | 67 ++++++++++++++++±–
translation/pl-pl.h | 11 ++±
translation/pl-pl.json | 50 ---------------
translation/translation.ht | 11 ++±
translation/zh-cn.h | 13 +±-
translation/zh-cn.json | 76 ±---------------------
ui/ui_config.c | 10 ±-
ui/ui_display.c | 6 ±
ui/ui_help.c | 10 ±-
ui/ui_info.c | 2 ±
ui/ui_mode.c | 6 ±
ui/ui_process.c | 8 ±-
ui/ui_prompt.c | 16 +±–
ui/ui_statusbar.c | 2 ±
49 files changed, 453 insertions(+), 477 deletions(-)

Here’s a fresh compile from ‘main’: “Added handling of host lock and release”

ci-buspirate-main-c6fb4a3.zip

Build time: 116.16 seconds

Git pull log @c6fb4a3:
Updating 9ee581a…c6fb4a3
Fast-forward
msc_disk.c | 23 +++++++++++++++++±----
1 file changed, 18 insertions(+), 5 deletions(-)

Here’s a fresh compile from ‘main’: “fix logic analyzer on BP5 hardware by changing to pio0 sm0.”

ci-buspirate-main-bebb8e3.zip

Build time: 119.26 seconds

Git pull log @bebb8e3:
Updating c6fb4a3…bebb8e3
Fast-forward
binmode/logicanalyzer.pio | 2 ±
pirate.h | 4 +±-
2 files changed, 3 insertions(+), 3 deletions(-)

I’ve just installed this on my BP5 and when it reboots, I cannot connect to the UART interface. Well, it connects but it does not respond to any commands.

I had the same problem building from source on both my BP5 and BP6.

I tried both screen and tio to connect.

1 Like

Same problem with this build.

1 Like

This version has an issue where I cannot connect to the serial interface (the text device I normally use with minicom). The storage volume mounts on Linux with no problems in read/write.

When I try minicom, it does connect, but never returns a prompt (I’m expecting the console Y/N prompt).

Here’s the kernel log from when I initially connect:

[266860.042809] usb 3-3.4.3: new full-speed USB device number 54 using xhci_hcd
[266860.136164] usb 3-3.4.3: New USB device found, idVendor=1209, idProduct=7332, bcdDevice= 1.01
[266860.136180] usb 3-3.4.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[266860.136185] usb 3-3.4.3: Product: Bus Pirate 5
[266860.136189] usb 3-3.4.3: Manufacturer: Bus Pirate
[266860.136192] usb 3-3.4.3: SerialNumber: 264235D3012961E4
[266860.159227] cdc_acm 3-3.4.3:1.0: ttyACM0: USB ACM device
[266860.160165] cdc_acm 3-3.4.3:1.2: ttyACM1: USB ACM device
[266860.160809] usb-storage 3-3.4.3:1.4: USB Mass Storage device detected
[266860.161442] scsi host1: usb-storage 3-3.4.3:1.4
[266861.216982] scsi 1:0:0:0: Direct-Access     BP5      Storage          1.0  PQ: 0 ANSI: 2
[266861.217938] sd 1:0:0:0: Attached scsi generic sg1 type 0
[266861.227417] sd 1:0:0:0: [sdb] 47824 2048-byte logical blocks: (97.9 MB/93.4 MiB)
[266861.228201] sd 1:0:0:0: [sdb] Write Protect is off
[266861.228210] sd 1:0:0:0: [sdb] Mode Sense: 03 00 00 00
[266861.229191] sd 1:0:0:0: [sdb] No Caching mode page found
[266861.229204] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[266861.250824]  sdb: sdb1
[266861.251034] sd 1:0:0:0: [sdb] Attached SCSI removable disk
[266864.898960] FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

There are no additional entries when I connect with minicom.

Thanks much!

1 Like

I did a little more experimenting. So, with build c6fb4a3:

  • Plug in USB cable to BP5
    • storage automounts on Linux host in read/write mode
  • Open serial terminal, in my case /dev/ttyACM0 in minicom
    • minicom opens, but BP5 does not accept any input
    • Volume does not remount and is still read/write
  • Manually unmount the BP storage from the host sudo umount /dev/sdb1
    • The serial interface now starts responding in minicom
    • The storage volume automatically remounts itself on the host in read-only mode

It seems we are very close, but on Linux systems (at least mine, a pretty standard Ubuntu 22.04.4) there is a missing something to force removal on serial connection.

Also, it is still remaining mounted read-only after leaving the serial connection.

Logging details

Kernel logs for Initial plug in of BP5:
[278668.115095] usb 3-3.4.3: USB disconnect, device number 59
[278668.137881] FAT-fs (sdb1): unable to read boot sector to mark fs as dirty
[278669.066838] usb 3-3.4.3: new full-speed USB device number 60 using xhci_hcd
[278669.159135] usb 3-3.4.3: New USB device found, idVendor=1209, idProduct=7332, bcdDevice= 1.01
[278669.159156] usb 3-3.4.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[278669.159165] usb 3-3.4.3: Product: Bus Pirate 5
[278669.159170] usb 3-3.4.3: Manufacturer: Bus Pirate
[278669.159175] usb 3-3.4.3: SerialNumber: 264235D3012961E4
[278669.184715] cdc_acm 3-3.4.3:1.0: ttyACM0: USB ACM device
[278669.185943] cdc_acm 3-3.4.3:1.2: ttyACM1: USB ACM device
[278669.186594] usb-storage 3-3.4.3:1.4: USB Mass Storage device detected
[278669.187177] scsi host1: usb-storage 3-3.4.3:1.4
[278670.220897] scsi 1:0:0:0: Direct-Access     BP5      Storage          1.0  PQ: 0 ANSI: 2
[278670.221823] sd 1:0:0:0: Attached scsi generic sg1 type 0
[278670.229914] sd 1:0:0:0: [sdb] 47824 2048-byte logical blocks: (97.9 MB/93.4 MiB)
[278670.230778] sd 1:0:0:0: [sdb] Write Protect is off
[278670.230782] sd 1:0:0:0: [sdb] Mode Sense: 03 00 00 00
[278670.232506] sd 1:0:0:0: [sdb] No Caching mode page found
[278670.232515] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[278670.253154]  sdb: sdb1
[278670.253397] sd 1:0:0:0: [sdb] Attached SCSI removable disk
[278673.607231] FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

Connecting to serial with minicom did not product any new entries in kernel log.

Kernel logs for after manual unmount of storage from host:
[278773.331174] sdb: detected capacity change from 191296 to 0
[278775.386193] sd 1:0:0:0: [sdb] 47824 2048-byte logical blocks: (97.9 MB/93.4 MiB)
[278775.387303] sd 1:0:0:0: [sdb] Write Protect is on
[278775.387310] sd 1:0:0:0: [sdb] Mode Sense: 03 00 80 00
[278775.389396] sdb: detected capacity change from 0 to 191296
[278775.398037]  sdb: sdb1

I hope this detail is helpful!
@Bus-Pirate @phdussud @henrygab @grymoire

1 Like