Compile a Raspberry Pi Pico / RP2040 CMake project and flash the resulting .uf2 straight from VS Code.
Works whether VS Code is running natively on Windows or as a Remote-WSL window inside WSL2.
- One-click build & flash from the status bar.
- Builds your project with
cmake --build. - Waits for the Pico to appear as the
RPI-RP2USB drive after you put it in BOOTSEL mode, then copies the firmware over automatically. - Streams build output to a dedicated "Pico Flash" output channel.
- Build-only, flash-only (skip build), and clean-rebuild commands for when you don't need the full pipeline.
- A CMake-based Pico SDK project (a
CMakeLists.txtat the workspace root). cmakeand the ARM toolchain available onPATHin whichever environment the extension is running in (native Windows, or inside WSL2 if using Remote-WSL).- Windows, since the Pico's BOOTSEL drive (
RPI-RP2) is a Windows-visible USB mass storage device.
| Command | Description |
|---|---|
Pico: Build & Flash |
Build the project, then wait for BOOTSEL and flash. |
Pico: Build Only |
Build the project without flashing. |
Pico: Flash (skip build) |
Skip the build and flash whatever .uf2 is already in the build directory. |
Pico: Clean & Rebuild |
Same as Build & Flash, with --clean-first passed to CMake. |
The status bar button (bottom left, $(zap) Build & Flash) runs Pico: Build & Flash.
| Setting | Default | Description |
|---|---|---|
picoFlash.buildDirectory |
"build" |
Relative path to the CMake build output directory. |
picoFlash.uf2Pattern |
"**/*.uf2" |
Glob pattern used to find the .uf2 file in the build directory. |
picoFlash.cmakeArgs |
[] |
Extra arguments appended to cmake --build. |
picoFlash.flashTimeoutSeconds |
30 |
Seconds to wait for the RPI-RP2 drive to appear before timing out. |
Compilation always runs locally in whatever environment the extension host is in. It never shells across the Windows/WSL boundary to build. The Pico's BOOTSEL drive only exists from Windows' point of view, so drive detection and the final firmware copy are the one place that talks to Windows (via powershell.exe, reached directly on native Windows or through WSL interop from a Remote-WSL window).
- Windows only, due to the reliance on the
RPI-RP2BOOTSEL drive. - No debug-probe (SWD) flashing, BOOTSEL drag-and-drop only.