Getting started with Raspberry Pi Pico
Chapter 9. Building on other
platforms
While the main supported platform for developing for the RP2040 is the Raspberry Pi, support for other platforms, such
as Apple macOS and Microsoft Windows, is available.
9.1. Building on Apple macOS
Using macOS to build code for RP2040 is very similar to Linux.
9.1.1. Installing the Toolchain
Installation depends on Homebrew, if you don't have
$ /bin/bash -c "$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Then install the toolchain,
$ brew install cmake
$ brew tap ArmMbed/homebrew-formulae
$ brew install arm-none-eabi-gcc
However after that you can follow the Raspberry Pi instructions to build code for the RP2040. Once the toolchain is
installed there are no differences between macOS and Linux to, so see
there to fetch the SDK and build the "Blink" example.
9.1.2. Using Visual Studio Code
The Visual Studio Code (VSCode) is a cross platform environment and runs on macOS, as well as Linux, and Microsoft
Windows. Go ahead and
Navigate to Applications and click on the icon to start Visual Studio Code.
9.1.3. Building with CMake Tools
After starting Visual Studio Code you then need to install the
left-hand toolbar (or type
on the install button.
We now need to set the
directory and add a file called
at the CMake Tools extension.
{
"cmake.environment": {
9.1. Building on Apple macOS
Homebrew
download the macOS
version, unzip it, and drag it to your Applications Folder.
), and search for "CMake Tools" and click on the entry in the list, and then click
Cmd + Shift + X
environment variable. Navigate to the
PICO_SDK_PATH
to tell CMake Tools to location of the SDK. Additionally point Visual Studio
settings.json
installed you should go ahead and install it,
Section 2.1
and follow the instructions from
CMake Tools
extension. Click on the Extensions icon in the
pico-examples
directory and create a
.vscode
36
Need help?
Do you have a question about the RP2040 and is the answer not in the manual?