Bromania Wiki

Scribblings of a Brit in Romania

User Tools

Site Tools


tech:unix:freebsd:pico-sdk

Raspberry Pi Pico SDK on FreeBSD

Environment

  • FreeBSD 14.x
  • Raspberry Pi Pico (or similar board with RP2040 MCU)

Required Ports

  • devel/cmake
  • devel/gcc-arm-embedded
  • devel/gh
  • devel/git
  • devel/gmake
  • devel/ninja
  • devel/pkgconf
  • lang/python39

Overview

Use the following instructions to install the required tools to compile UF2 files for use with the Raspberry Pi Pico and clones. You may also want to install and configure an IDE such as editors/vscode or devel/thonny but this is not covered here.

These instructions may also be adapted to install the SDK system-wide by installing it to a common location, for example somewhere in the /usr/local tree branch, and modifying /etc/profile instead of the individual user's ~/.profile.

Installation

Ports

Install the Required Ports either from packages, or build them from the ports collection.

Pico SDK

Log in as the user who will be using the SDK, and run the following commands:

$ mkdir ~/src
$ chdir ~/src
$ gh repo clone raspberrypi/pico-sdk

Configuration

While still logged in as the standard user, edit ~/.profile and add the following lines:

PICO_TOOLCHAIN_PATH=/usr/local/gcc-arm-embedded; export PICO_TOOLCHAIN_PATH
PICO_SDK_PATH=$HOME/src/pico-sdk; export PICO_SDK_PATH

Finally, either log out and back in / close and re-open the terminal session, so it re-reads ~/.profile with the new variables, or enter the following:

$ export PICO_TOOLCHAIN_PATH=/usr/local/gcc-arm-embedded
$ export PICO_SDK_PATH=$HOME/src/pico-sdk
tech/unix/freebsd/pico-sdk.txt · Last modified: 2024/05/21 10:34 by puisor