Prepare The Raspberry Pico

Get started with Raspberry Pi Pico and Compile the pico-serprog firmware

I have completed this procedure using Arch Linux. If you're using a Debian-based distribution, the steps may vary slightly, but it shouldn't be a significant issue.

Dependencies

  • cmake

Raspberry Pico SDK

This part is based on this link.

Installation

Get the SDK using YAY package manager

yay -S raspberry-pico-sdk-git

Logoff your OS to automatically enable the environmental variables

Compiling the Firmware

Clone the pico-serprog repository from here

git clone https://codeberg.org/libreboot/pico-serprog.git

Compile it

cd pico-serprog
cmake .
make

At this point you should have the pico-serprog.uf2 file ready for copying into the Raspberry Pico!

Connect the Pico to PC

  • Connect the USB cable to your laptop

  • press and hold the BOOTSEL button on your Pico while you plug it in (this forces it into the bootloader mode)

  • The Pico will be detected as USB flash drive

Copy the Firmware

  • Drag your pico_serprog.uf2 into your Pico.

  • Your Pico will disconnect, that means it is now ready and can be unplugged.

Type the following command

sudo dmesg -wH

Now plug your Raspberry Pico again and you should get the following output

[  +0.092782] usb 3-7.2: New USB device found, idVendor=cafe, idProduct=4001, bcdDevice= 1.00
[  +0.000010] usb 3-7.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  +0.000003] usb 3-7.2: Product: pico-serprog (pico)
[  +0.000003] usb 3-7.2: Manufacturer: libreboot.org
[  +0.000002] usb 3-7.2: SerialNumber: E661410403213F31
[  +0.010021] cdc_acm 3-7.2:1.0: ttyACM0: USB ACM device

Please ensure you take note of the serial port designation (in this instance, ttyACM0) to which your device is connected. This step is crucial as we'll need to verify the readiness of the device for usage following the installation of flashprog.

Now you can unplug the Raspberry Pico

If you want to change the firwmare in the future, you need to press the BOOTSEL button on the board while you plug it in.

Last updated