By Nobody 2026-09-15
Introduction
The Raspberry Pi Pico is a nice MCU chip and board for quick projects.
See also Raspberry Pi for more information.
IDEs
- use Visual Studio Code for editor
- use Arduino V2 for quick hacks with existing code for external devices
- the Raspberry Pi Pico SDK with cmake, nija best for low-level development
Arduino V2
Use the boards manager to install “Raspberry Pi Pico/RP2040/RP2350” by Earle F. Philhower, III.
SDK
Official info assumes one uses a Raspberry Pi to develop on, hence it is all about Debian.
For windows, do the following:
First deal with python madness…uv was supposed to fix it, and it does, but there is still madness thanks to Espressif ESP-IDF (and others, potentially) injecting a different .exe version ahead of uv. Python is great when it works, not so great when we lose control. Also if installing nodejs with automatic install of dependencies, yet another python instance may appear somewhere like programdata\chocolatey\bin etc.
If you have uv, see all python installs: uv python list
Anyways…
- Run PowerShell
- Create a venv to run python
Using uv:
cd C:\pico
uv venv --python 3.14.7 .venv
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
.venv\Scripts\Activate.ps1
python --version # now resolves to the uv-managed 3.14.7 inside .venv
Allow local scripts for your user (recommended, persistent) if powershell blocks activate as above.
Using python directly
cd C:\pico
python -m venv .venv
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
.venv\Scripts\Activate.ps1
python --version # now resolves to the Python version inside .venv
Toolchain & Build Tools (winget or installers)
winget install -e --id Arm.GnuArmEmbeddedToolchain
winget install -e --id Kitware.CMake
winget install -e --id Ninja-build.Ninja
``
The first line opened a "Administrator: cmd.exe" window:
C:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\14.2 rel1\bin>
Checks:
(.venv) PS C:\pico> ninja --version
1.13.2
(.venv) PS C:\pico> cmake --version
cmake version 4.3.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
Clone Pico SDK & Submodules
```sh
mkdir C:\pico
cd C:\pico
git clone -b master https://github.com/raspberrypi/pico-sdk.git
cd pico-sdk
git submodule update --init
Submodule Init:
(.venv) PS C:\pico> cd pico-sdk
(.venv) PS C:\pico\pico-sdk> git submodule update --init
Submodule 'lib/btstack' (https://github.com/bluekitchen/btstack.git) registered for path 'lib/btstack'
Submodule 'lib/cyw43-driver' (https://github.com/georgerobotics/cyw43-driver.git) registered for path 'lib/cyw43-driver'
Submodule 'lib/lwip' (https://github.com/lwip-tcpip/lwip.git) registered for path 'lib/lwip'
Submodule 'lib/mbedtls' (https://github.com/Mbed-TLS/mbedtls.git) registered for path 'lib/mbedtls'
Submodule 'tinyusb' (https://github.com/hathach/tinyusb.git) registered for path 'lib/tinyusb'
Set Environment Variable
[System.Environment]::SetEnvironmentVariable('PICO_SDK_PATH', 'C:\pico\pico-sdk', 'User')
Restart your terminal or VS Code, and CMake with Ninja will target the RP2040 natively.
Raspberry pi pico directories
Use this setup.
C:\pico\pico-sdk C:\pico\projects
Clone the examples for the pico chips RP2040 and RP2350:
cd C:\pico
git clone https://github.com/raspberrypi/pico-examples.git
Building with the SDK
Some notes on using these devices and associated tools.
SDK and Examples
These were installed to C:\pico, see @sec-rpi-install.
By default, the Pico SDK targets builds for RP2040 (PICO_PLATFORM=rp2040). To build for RP2350 instead, pass -DPICO_PLATFORM=rp2350 to CMake (or -DPICO_PLATFORM=rp2350-riscv for RISC-V). Alternatively, in many cases, you can rely on the board configuration to set the platform for you. For example, passing -DPICO_BOARD=pico2 will automatically select PICO_PLATFORM=rp2350.
-DPICO_BOARD could be pico, pico2, pico_w and pico2_w
UART vs USB
Note examples with UART often have a duplicate that use the Pico USB connector for communication instead of adding a separate UART to USB VCOM port chip/board.