aboutsummaryrefslogtreecommitdiffstats

rpi-pico

This is an overlay voor the Gentoo Linux distribution, it provides an ebuild for the Raspberry Pi Pico SDK.

Why this overlay?

I recently got interested in the Raspberry Pi Pico and the SDK is not in the main portage tree. Usual instructions tell you to install it in your home directory, but in my opinion software like this should be managed by your package manager so i started writing an ebuild. I'm sharing this to help other Gentoo users.

What is in this overlay?

This overlay provides a single package: dev-utils/pico-sdk. It installs the SDK under /opt/pico-sdk-<version> and a symlink /opt/pico-sdk. It has some use flags to control which external parts get included:

  • cyw43: Include the cyw43 driver for the Pico W's wireless hardware
  • examples: Include source code examples
  • lwip: Include the lwip IP Stack
  • tinyusb: Include the tinyusb USB Stack (required for stdio over USB)

You may notice that the ebuild does depend on cross-arm-none-eabi/binutils, cross-arm-none-eabi/gcc and cross-arm-none-eabi/newlib and these packages may not be available on your system. You can use crossdev (sys-devel/crossdev) to create them with the command: crossdev -t arm-none-eabi --init-target.

How to use this overlay?

First you'll have to clone this overlay on a place you like, a common place these days is /var/db/repos. So cd into that directory and use git clone https://code.pa4wdh.nl.eu.org/gentoo/rpi-pico, this will create a directory called rpi-pico with the overlay in it.

Next you have to make portage aware of the repo, for that you'll have to create a config file under /etc/portage/repos.conf. Create a file called rpi-pico.conf and give it these contents:

[rpi-pico]
location = /var/db/repos/rpi-pico
sync-type = git
sync-uri = https://code.pa4wdh.nl.eu.org/gentoo/rpi-pico

If you placed the overlay on a different place than /var/db/repos make sure to adapt the location line to your needs.

What can i do with this?

With the SDK installed you can start developing programs in the C programming language for the Raspberry Pi Pico. See this documentation to learn how to start your own project. To use the SDK set PICO_SDK_PATH to /opt/pico-sdk or include include(/opt/pico-sdk/pico_sdk_init.cmake) in your CMakeLists.txt.

If you have any feedback on this overlay, you're quite likely to find me on the Gentoo forums.

Have fun!