Linux Compile Notes

I was able to download and build the firmware under Linux. Some notes which might be useful to others… After downloading the repo, I typed

  cd BusPirate5-firmware
  mkdir build
  cd build
  cmake ..

There were some compile errors - “Illegal Character” in the *.pio files.
These files had <carriage return><line feed> terminations (Windows format).
I solved this by typing

  sudo apt install dos2unix
  dos2unix *.pio
  make

And it compiled with no errors.
I then held down the bootloader button, plugged in my BP, and copied the *.uf2 file, and success. I connected to my BP by typing
screen /dev/ttyACM0 11520
The firmware revision was identical to the zip file the bot posted.
Thumbs Up!

1 Like

Thanks for the info! I’m glad you go it going.

I pushed an update to the line endings in pio files. I’m surprised it didn’t cause issues on the build server - it is ubuntu.

1 Like

Git client can be configured to change line ending between \r\n and \n. Perhaps in CI/CD their client is just properly configured

1 Like

I compiled on 2 Ubuntu PCs and I didn’t have any errors either!!! Thank you @grymoire

1 Like

Hi @grymoire

Do you see something incorrect there?

drake@Marte:~/Sviluppo/Buspirate/BusPirate5-firmware/build$ cmake …
Using PICO_SDK_PATH from environment (‘/home/drake/Sviluppo/pico/pico-sdk’)
PICO_SDK_PATH is /home/drake/Sviluppo/pico/pico-sdk
Defaulting PICO_PLATFORM to rp2040 since not specified.
Defaulting PICO platform compiler to pico_arm_gcc since not specified.
– Defaulting build type to ‘Release’ since not specified.
PICO compiler is pico_arm_gcc
– The C compiler identification is GNU 12.2.1
– The CXX compiler identification is GNU 12.2.1
– The ASM compiler identification is GNU
– Found assembler: /usr/bin/arm-none-eabi-gcc
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: /usr/bin/arm-none-eabi-gcc - skipped
– Detecting C compile features
– Detecting C compile features - done
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: /usr/bin/arm-none-eabi-g++ - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
Build type is Release
PICO target board is pico.
Using board configuration from /home/drake/Sviluppo/pico/pico-sdk/src/boards/include/boards/pico.h
– Found Python3: /usr/bin/python3 (found version “3.11.4”) found components: Interpreter
TinyUSB available at /home/drake/Sviluppo/pico/pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040; enabling build support for USB.
BTstack available at /home/drake/Sviluppo/pico/pico-sdk/lib/btstack
cyw43-driver available at /home/drake/Sviluppo/pico/pico-sdk/lib/cyw43-driver
Pico W Bluetooth build support available.
lwIP available at /home/drake/Sviluppo/pico/pico-sdk/lib/lwip
mbedtls available at /home/drake/Sviluppo/pico/pico-sdk/lib/mbedtls
Using PICO_EXAMPLES_PATH from environment (‘/home/drake/Sviluppo/pico/pico-examples’)
– Configuring done
– Generating done
– Build files have been written to: /home/drake/Sviluppo/Buspirate/BusPirate5-firmware/build

drake@Marte:~/Sviluppo/Buspirate/BusPirate5-firmware/build$ make
[ 1%] Building ASM object pico-sdk/src/rp2_common/boot_stage2/CMakeFiles/bs2_default.dir/compile_time_choice.S.obj
[ 2%] Linking ASM executable bs2_default.elf
[ 2%] Built target bs2_default
[ 2%] Generating bs2_default.bin
[ 3%] Generating bs2_default_padded_checksummed.S
[ 3%] Built target bs2_default_padded_checksummed_asm
[ 4%] Creating directories for ‘PioasmBuild’
[ 5%] No download step for ‘PioasmBuild’
[ 5%] No update step for ‘PioasmBuild’
[ 6%] No patch step for ‘PioasmBuild’
[ 6%] Performing configure step for ‘PioasmBuild’
loading initial cache file /home/drake/Sviluppo/Buspirate/BusPirate5-firmware/build/pico-sdk/src/rp2_common/pico_cyw43_driver/pioasm/tmp/PioasmBuild-cache-Release.cmake
– The CXX compiler identification is GNU 12.3.0
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: /usr/bin/c++ - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
– Configuring done
– Generating done
– Build files have been written to: /home/drake/Sviluppo/Buspirate/BusPirate5-firmware/build/pioasm
[ 7%] Performing build step for ‘PioasmBuild’
[ 10%] Building CXX object CMakeFiles/pioasm.dir/main.cpp.o
[ 20%] Building CXX object CMakeFiles/pioasm.dir/pio_assembler.cpp.o
[ 30%] Building CXX object CMakeFiles/pioasm.dir/pio_disassembler.cpp.o
[ 40%] Building CXX object CMakeFiles/pioasm.dir/gen/lexer.cpp.o
[ 50%] Building CXX object CMakeFiles/pioasm.dir/gen/parser.cpp.o
[ 60%] Building CXX object CMakeFiles/pioasm.dir/c_sdk_output.cpp.o
[ 70%] Building CXX object CMakeFiles/pioasm.dir/python_output.cpp.o
[ 80%] Building CXX object CMakeFiles/pioasm.dir/hex_output.cpp.o
[ 90%] Building CXX object CMakeFiles/pioasm.dir/ada_output.cpp.o
[100%] Linking CXX executable pioasm
[100%] Built target pioasm
[ 7%] No install step for ‘PioasmBuild’
[ 8%] Completed ‘PioasmBuild’
[ 8%] Built target PioasmBuild
[ 9%] Generating i2c.pio.h
[ 9%] Built target bus_pirate_i2c_pio_h
[ 10%] Generating ws2812.pio.h
[ 10%] Built target bus_pirate_ws2812_pio_h
[ 11%] Generating apa102.pio.h
[ 11%] Built target bus_pirate_apa102_pio_h
[ 11%] Generating onewire.pio.h
[ 11%] Built target bus_pirate_onewire_pio_h
[ 11%] Creating directories for ‘ELF2UF2Build’
[ 12%] No download step for ‘ELF2UF2Build’
[ 12%] No update step for ‘ELF2UF2Build’
[ 13%] No patch step for ‘ELF2UF2Build’
[ 13%] Performing configure step for ‘ELF2UF2Build’
– The C compiler identification is GNU 12.3.0
– The CXX compiler identification is GNU 12.3.0
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: /usr/bin/cc - skipped
– Detecting C compile features
– Detecting C compile features - done
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: /usr/bin/c++ - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
– Configuring done
– Generating done
– Build files have been written to: /home/drake/Sviluppo/Buspirate/BusPirate5-firmware/build/elf2uf2
[ 14%] Performing build step for ‘ELF2UF2Build’
[ 50%] Building CXX object CMakeFiles/elf2uf2.dir/main.cpp.o
[100%] Linking CXX executable elf2uf2
[100%] Built target elf2uf2
[ 15%] No install step for ‘ELF2UF2Build’
[ 15%] Completed ‘ELF2UF2Build’
[ 15%] Built target ELF2UF2Build
[ 16%] Building C object CMakeFiles/bus_pirate.dir/pirate.c.obj
[ 17%] Building C object CMakeFiles/bus_pirate.dir/platform/bpi-rev8.c.obj
[ 17%] Building C object CMakeFiles/bus_pirate.dir/commands.c.obj
[ 18%] Building C object CMakeFiles/bus_pirate.dir/ui/ui_lcd.c.obj
[ 18%] Building C object CMakeFiles/bus_pirate.dir/rgb.c.obj
[ 19%] Building C object CMakeFiles/bus_pirate.dir/bio.c.obj
[ 20%] Building C object CMakeFiles/bus_pirate.dir/msc_disk.c.obj
[ 20%] Building C object CMakeFiles/bus_pirate.dir/usb_descriptors.c.obj
[ 21%] Building C object CMakeFiles/bus_pirate.dir/shift.c.obj
[ 22%] Building C object CMakeFiles/bus_pirate.dir/psu.c.obj
[ 22%] Building C object CMakeFiles/bus_pirate.dir/amux.c.obj
[ 23%] Building C object CMakeFiles/bus_pirate.dir/buttons.c.obj
[ 23%] Building C object CMakeFiles/bus_pirate.dir/system_config.c.obj
[ 24%] Building C object CMakeFiles/bus_pirate.dir/modes.c.obj
[ 25%] Building C object CMakeFiles/bus_pirate.dir/auxpinfunc.c.obj
[ 25%] Building C object CMakeFiles/bus_pirate.dir/pwm.c.obj
[ 26%] Building C object CMakeFiles/bus_pirate.dir/freq.c.obj
[ 26%] Building C object CMakeFiles/bus_pirate.dir/adc.c.obj
[ 27%] Building C object CMakeFiles/bus_pirate.dir/pullups.c.obj
[ 28%] Building C object CMakeFiles/bus_pirate.dir/helpers.c.obj
[ 28%] Building C object CMakeFiles/bus_pirate.dir/mode/dummy1.c.obj
[ 29%] Building C object CMakeFiles/bus_pirate.dir/mode/hiz.c.obj
[ 29%] Building C object CMakeFiles/bus_pirate.dir/mode/hwspi.c.obj
[ 30%] Building C object CMakeFiles/bus_pirate.dir/mode/usart.c.obj
[ 31%] Building C object CMakeFiles/bus_pirate.dir/mode/hwi2c.c.obj
[ 31%] Building C object CMakeFiles/bus_pirate.dir/mode/hwled.c.obj
[ 32%] Building C object CMakeFiles/bus_pirate.dir/ui/ui_cmdln.c.obj
[ 33%] Building C object CMakeFiles/bus_pirate.dir/ui/ui_process.c.obj
[ 33%] Building C object CMakeFiles/bus_pirate.dir/mode/hw1wire.c.obj
[ 34%] Building C object CMakeFiles/bus_pirate.dir/mode/onewire.c.obj
[ 34%] Building C object CMakeFiles/bus_pirate.dir/debug.c.obj
[ 35%] Building C object CMakeFiles/bus_pirate.dir/ui/ui_parse.c.obj
[ 36%] Building C object CMakeFiles/bus_pirate.dir/ui/ui_prompt.c.obj
[ 36%] Building C object CMakeFiles/bus_pirate.dir/ui/ui_mode.c.obj
[ 37%] Building C object CMakeFiles/bus_pirate.dir/ui/ui_info.c.obj
[ 37%] Building C object CMakeFiles/bus_pirate.dir/ui/ui_format.c.obj
[ 38%] Building C object CMakeFiles/bus_pirate.dir/ui/ui_init.c.obj
[ 39%] Building C object CMakeFiles/bus_pirate.dir/ui/ui_const.c.obj
[ 39%] Building C object CMakeFiles/bus_pirate.dir/ui/ui_config.c.obj
[ 40%] Building C object CMakeFiles/bus_pirate.dir/translation/base.c.obj
[ 41%] Building C object CMakeFiles/bus_pirate.dir/queue.c.obj
[ 41%] Building C object CMakeFiles/bus_pirate.dir/usb_tx.c.obj
[ 42%] Building C object CMakeFiles/bus_pirate.dir/usb_rx.c.obj
[ 42%] Building C object CMakeFiles/bus_pirate.dir/mcu/rp2040.c.obj
[ 43%] Building C object CMakeFiles/bus_pirate.dir/printf-4.0.0/printf.c.obj
[ 44%] Building C object CMakeFiles/bus_pirate.dir/fatfs/ff.c.obj
[ 44%] Building C object CMakeFiles/bus_pirate.dir/fatfs/ffsystem.c.obj
[ 45%] Building C object CMakeFiles/bus_pirate.dir/fatfs/ffunicode.c.obj
[ 45%] Building C object CMakeFiles/bus_pirate.dir/fatfs/tf_card.c.obj
[ 46%] Building C object CMakeFiles/bus_pirate.dir/pio_i2c.c.obj
[ 47%] Building C object CMakeFiles/bus_pirate.dir/storage.c.obj
[ 47%] Building C object CMakeFiles/bus_pirate.dir/ui/ui_term.c.obj
[ 48%] Building C object CMakeFiles/bus_pirate.dir/ui/ui_statusbar.c.obj
[ 49%] Building C object CMakeFiles/bus_pirate.dir/system_monitor.c.obj
[ 49%] Building C object CMakeFiles/bus_pirate.dir/mjson/mjson.c.obj
[ 50%] Building C object CMakeFiles/bus_pirate.dir/postprocess.c.obj
[ 50%] Building C object CMakeFiles/bus_pirate.dir/syntax.c.obj
[ 51%] Building C object CMakeFiles/bus_pirate.dir/dump.c.obj
[ 52%] Building C object CMakeFiles/bus_pirate.dir/lib/minmea/minmea.c.obj
[ 52%] Building C object CMakeFiles/bus_pirate.dir/lib/minmea/gps.c.obj
[ 53%] Building C object CMakeFiles/bus_pirate.dir/lib/ms5611/ms5611.c.obj
[ 53%] Building C object CMakeFiles/bus_pirate.dir/lib/tsl2561/driver_tsl2561.c.obj
[ 54%] Building C object CMakeFiles/bus_pirate.dir/mode/binio.c.obj
[ 55%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/pico_stdlib/stdlib.c.obj
[ 55%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/hardware_gpio/gpio.c.obj
[ 56%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/pico_platform/platform.c.obj
[ 56%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/hardware_claim/claim.c.obj
[ 57%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/hardware_sync/sync.c.obj
[ 58%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/hardware_irq/irq.c.obj
[ 58%] Building ASM object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/hardware_irq/irq_handler_chain.S.obj
[ 59%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/common/pico_sync/sem.c.obj
[ 60%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/common/pico_sync/lock_core.c.obj
[ 60%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/common/pico_sync/mutex.c.obj
[ 61%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/common/pico_sync/critical_section.c.obj
[ 61%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/common/pico_time/time.c.obj
[ 62%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/common/pico_time/timeout_helper.c.obj
[ 63%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/hardware_timer/timer.c.obj
[ 63%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/common/pico_util/datetime.c.obj
[ 64%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/common/pico_util/pheap.c.obj
[ 64%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/common/pico_util/queue.c.obj
[ 65%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/hardware_uart/uart.c.obj
[ 66%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/hardware_clocks/clocks.c.obj
[ 66%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/hardware_pll/pll.c.obj
[ 67%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/hardware_vreg/vreg.c.obj
[ 68%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/hardware_watchdog/watchdog.c.obj
[ 68%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/hardware_xosc/xosc.c.obj
[ 69%] Building ASM object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/hardware_divider/divider.S.obj
[ 69%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/pico_runtime/runtime.c.obj
[ 70%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/pico_printf/printf.c.obj
[ 71%] Building ASM object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/pico_bit_ops/bit_ops_aeabi.S.obj
[ 71%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/pico_bootrom/bootrom.c.obj
[ 72%] Building ASM object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/pico_divider/divider.S.obj
[ 72%] Building ASM object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/pico_double/double_aeabi.S.obj
[ 73%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/pico_double/double_init_rom.c.obj
[ 74%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/pico_double/double_math.c.obj
[ 74%] Building ASM object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/pico_double/double_v1_rom_shim.S.obj
[ 75%] Building ASM object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/pico_int64_ops/pico_int64_ops_aeabi.S.obj
[ 76%] Building ASM object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/pico_float/float_aeabi.S.obj
[ 76%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/pico_float/float_init_rom.c.obj
[ 77%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/pico_float/float_math.c.obj
[ 77%] Building ASM object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/pico_float/float_v1_rom_shim.S.obj
[ 78%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/pico_malloc/pico_malloc.c.obj
[ 79%] Building ASM object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/pico_mem_ops/mem_ops_aeabi.S.obj
[ 79%] Building ASM object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/pico_standard_link/crt0.S.obj
[ 80%] Building CXX object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/pico_standard_link/new_delete.cpp.obj
[ 80%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/pico_standard_link/binary_info.c.obj
[ 81%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/pico_stdio/stdio.c.obj
[ 82%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/hardware_spi/spi.c.obj
[ 82%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/hardware_i2c/i2c.c.obj
[ 83%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/hardware_dma/dma.c.obj
[ 83%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/hardware_pio/pio.c.obj
[ 84%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/hardware_interp/interp.c.obj
[ 85%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/hardware_adc/adc.c.obj
[ 85%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/pico_multicore/multicore.c.obj
[ 86%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/pico_unique_id/unique_id.c.obj
[ 87%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/hardware_flash/flash.c.obj
[ 87%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040/dcd_rp2040.c.obj
[ 88%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040/rp2040_usb.c.obj
[ 88%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/lib/tinyusb/src/device/usbd.c.obj
[ 89%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/lib/tinyusb/src/device/usbd_control.c.obj
[ 90%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/lib/tinyusb/src/class/audio/audio_device.c.obj
[ 90%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/lib/tinyusb/src/class/cdc/cdc_device.c.obj
[ 91%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/lib/tinyusb/src/class/dfu/dfu_device.c.obj
[ 91%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/lib/tinyusb/src/class/dfu/dfu_rt_device.c.obj
[ 92%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/lib/tinyusb/src/class/hid/hid_device.c.obj
[ 93%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/lib/tinyusb/src/class/midi/midi_device.c.obj
[ 93%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/lib/tinyusb/src/class/msc/msc_device.c.obj
[ 94%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/lib/tinyusb/src/class/net/ecm_rndis_device.c.obj
[ 95%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/lib/tinyusb/src/class/net/ncm_device.c.obj
[ 95%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/lib/tinyusb/src/class/usbtmc/usbtmc_device.c.obj
[ 96%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/lib/tinyusb/src/class/vendor/vendor_device.c.obj
[ 96%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/lib/tinyusb/src/class/video/video_device.c.obj
[ 97%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/lib/tinyusb/src/tusb.c.obj
[ 98%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/lib/tinyusb/src/common/tusb_fifo.c.obj
[ 98%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/src/rp2_common/pico_fix/rp2040_usb_device_enumeration/rp2040_usb_device_enumeration.c.obj
[100%] Building C object CMakeFiles/bus_pirate.dir/home/drake/Sviluppo/pico/pico-sdk/lib/tinyusb/hw/bsp/rp2040/family.c.obj
[100%] Linking CXX executable bus_pirate.elf
[100%] Built target bus_pirate

It looks very similar to my build. I have an older GCC compiler (GNU 10.3.1) and I have a warning you do not have. I haven’t tested a lot yet. are you having trouble using the firmware?

No, no problem, I have updated my BP5 several times by compiling like this and I am enthusiastically testing it step by step.
I was amazed that there were problems that I hadn’t noticed and that the compiler didn’t point out.
I posted the compilation step just to be safe in case someone saw something wrong with it.

I updated from the Git and in build, when I type make, I get

[ 8%] Linking CXX executable bus_pirate5_rev8.elf
/usr/lib/gcc/arm-none-eabi/10.3.1/…/…/…/arm-none-eabi/bin/ld: CMakeFiles/bus_pirate5_rev8.dir/display/scope.c.obj: in function scope_stop.part.0': scope.c:(.text.scope_stop.part.0+0x56): undefined reference to dma_channel_cleanup’

That is a pico function in “hardware/dma.h”, which is included in scope.c.

I pulled main and make clean without errors. Maybe cmake needs to be run again? Also, check cmakelists.txt to ensure hardware_dma is included with the stdlibs.

Hmm. hardware_dma is there. These are the steps (it’s repeatable)

 git pull
 mv build build0
 mkdir build
 cd build
 cmake .. 
 make

And these are the errors and warnings I saw

  [  9%] Building C object CMakeFiles/bus_pirate5_rev8.dir/commands.c.obj
  ./BusPirate5-firmware/commands.c: In function 'nullparse':
  ./BusPirate5-firmware/commands.c:110:5: warning: implicit declaration of function 'busy_wait_at_least_cycles' [-Wimplicit-functi\
on-declaration]
    110 |     busy_wait_at_least_cycles(1);
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~
  -- -
      ./BusPirate5-firmware/display/scope.c: In function 'scope_stop':
  ./BusPirate5-firmware/display/scope.c:364:2: warning: implicit declaration of function 'dma_channel_cleanup'; did you mean 'dma_\
channel_claim'? [-Wimplicit-function-declaration]
    364 |  dma_channel_cleanup(dma_chan);
        |  ^~~~~~~~~~~~~~~~~~~
        |  dma_channel_claim
  -- -
  [ 52%] Linking CXX executable bus_pirate5_rev8.elf
  /usr/lib/gcc/arm-none-eabi/10.3.1/../../../arm-none-eabi/bin/ld: CMakeFiles/bus_pirate5_rev8.dir/display/scope.c.obj: in functio\
n `scope_stop.part.0':
  scope.c:(.text.scope_stop.part.0+0x56): undefined reference to `dma_channel_cleanup'

I get a similar error during make bus_pirate5_rev10

I don’t see the string dma_channel_cleanup anywhere except for the file build/CMakeFiles/bus_pirate5_rev10.dir/display/scope.c.obj
Perhaps it’s a library issue? I’m running Ubuntu 22.04.3 LTS

HI @grymoire grymoire
Are you sure you are in the main branch? Maybe you have some changes made but not released?
Last night I repeated the compilation on my Ubuntu 23.10 PC to verify what you described.
I downloaded the repository again to have a clean project but I didn’t have any problems:

git clone https://github.com/DangerousPrototypes/BusPirate5-firmware.git
cd BusPirate5-firmware
mkdir build
cd build
cmake …
make

No problem

If you’re having errors about busy wait, maybe it’s your SDK or environmental variable pointing to SDK? The build server is also Ubuntu 22 LTS, I don’t recall any tricks to get it going (unlike windows…).

This is what I did, with a fresh clone. I suspect one of my libraries is out of date.

Hmm. I’m using the lastest pico-sdk (1.5.1) from github, and PICO_SDK_PATH
is set to that location.The missing library is there, but it doesn’t seem to be in the BusPirate build.

I think I found the problem… Rebuilding.

1 Like

Great! Please keep us updated.

Fixed. I had thought pico-sdk was installed correctly. My mistake.
I needed to also do (in pico-sdk)
git submodule update --init
to update the tinyusb library.

1 Like

Glad you got it going. Thanks for sharing the solution.