Table of Contents
Raspberry Pi Pico SDK on FreeBSD
Environment
- FreeBSD 14.x
- Raspberry Pi Pico (or similar board with RP2040 MCU)
Required Ports
devel/cmakedevel/gcc-arm-embeddeddevel/ghdevel/gitdevel/gmakedevel/ninjadevel/pkgconflang/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
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
