Compiling for the Raspberry Pico on Arch Linux


The latest microcontroller on the market is the RP2040 in the form of the Raspberry Pico board - a compact SoC with many I/O pin configurations and great documentation – as we’ve come to expect from Raspberry!

Raspberry Pico

Getting compiling for this up and running is simple and I’ve made it even easier for Arch Linux with an AUR package to install the Pico SDK and necessary tools. For more generic instructions see the Raspberry docs.

Install everything

Using yay/packer or similar, install the AUR package:

$ yay -S raspberry-pico-sdk-git

Once this is installed, you’ll need to logout/back in to setup the environment variables.

Compile an example

Checkout the examples repo:

$ git clone -b master https://github.com/raspberrypi/pico-examples.git

And set it up to build with cmake:

$ cd pico-examples
$ mkdir build
$ cd build
$ cmake ..
$ cd blink
$ make -j4

And you should have blink.uf2 ready for copying onto the Pico. Easy!