{{keywords>freebsd,unix,rasperry,pi,pico-sdk,pico,sdk,installing,installation,install}} ====== 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 [[https://docs.freebsd.org/en/books/handbook/ports/#pkgng-intro|packages]], or build them from the [[https://docs.freebsd.org/en/books/handbook/ports/#ports-using|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 ===== External Links ===== * [[https://www.raspberrypi.com/documentation/microcontrollers/|Raspberry Pi Microcontrollers Documentation]] * [[https://forums.freebsd.org/threads/raspberry-pi-pico.79394/|FreeBSD Forums: Pico SDK Discussion]] * [[https://forums.raspberrypi.com/viewtopic.php?t=311022|Raspberry Pi Forums: Cross-building for Pico SDK on FreeBSD (PC) host]]