Note: The extension is currently under development.
This is the official Visual Studio Code extension for Raspberry Pi Pico development. This extension equips you with a suite of tools designed to streamline your Pico projects using Visual Studio Code and the official Pico SDK.
For comprehensive setup instructions, refer to the Getting Started guide PDF.
One-Click Compilation and Debugging: Automatically configure OpenOCD, Ninja, and CMake, allowing you to compile and debug with a single click.
Offline Documentation: Conveniently access Pico SDK documentation directly within the editor, even when offline.
Version Switching: Seamlessly switch between different versions of the Pico SDK and tools.
No Manual Setup Required: The extension handles environment variables, toolchain, SDK, and tool management for you.
One-Click Compilation: Compile projects directly from the status bar with your selected SDK and tools.
Offline Documentation: Access Pico SDK documentation offline.
Quick Project Setup: Quickly create new Pico projects from the Explorer view when no workspace is open.
MicroPython Support: Create MicroPython-based Pico projects with support provided through the MicroPico extension.
Supported Platforms: Raspberry Pi OS (64-bit), Windows 10/11 (x86_64), macOS Sonoma (14.0) and newer, Linux x64 and arm64
No additional requirements are needed.
To meet the requirements for macOS, run the following command in Terminal to install necessary tools:
xcode-select --install
This command installs all of the necessary tools, including but not limited to:
sudo
, for debugging and loadinglibftdi1-2
and libhidapi-hidraw0
packages to use OpenOCDThis extension provides the following settings:
raspberry-pi-pico.cmakePath
: Specify a custom path for CMake.raspberry-pi-pico.python3Path
: Specify a custom path for Python 3 (machine scoped).raspberry-pi-pico.ninjaPath
: Specify a custom path for Ninja.raspberry-pi-pico.gitPath
: Specify a custom path for Git.raspberry-pi-pico.cmakeAutoConfigure
: Provide a GitHub personal access token (classic) with the public_repo
scope. This token is used to check for available versions of the Pico SDK and other tools. Without it, the extension uses the unauthenticated GitHub API, which has a lower rate limit and may lead to restricted functionality if the limit is exceeded. The unauthenticated rate limit is per public IP address, so a token is more necessary if your IP is shared with many users.For more complex projects, such as those with multiple executables or when the project name is defined as a variable, this extension can integrate with the CMake Tools extension to enhance CMake parsing. You can enable CMake Tools integration during project generation under the Advanced Options. Additionally, to manually enable it, adjust the following settings in your settings.json
:
raspberry-pi-pico.cmakeAutoConfigure
: Set from true
to false
.raspberry-pi-pico.useCmakeTools
: Set from false
to true
.For optimal functionality, consider enabling:
cmake.configureOnEdit
: truecmake.automaticReconfigure
: truecmake.configureOnOpen
: trueWhen prompted, select the Pico
kit in CMake Tools, and set your build and launch targets accordingly. Use CMake Tools for compilation, but continue using this extension for debugging, as CMake Tools debugging is not compatible with Pico.
If you work with multiple microcontroller toolchains, consider installing this extension into a VS Code Profile to avoid conflicts with other toolchains. Follow these steps:
Ctrl+Shift+P
(or Cmd+Shift+P
on macOS) and select Profiles: Import Profile
.CMakeLists.txt
like SDK and Toolchain paths. You need to build and configure projects through the extension to use these custom paths.If you encounter issues retrieving available Pico SDK versions, it may be due to GitHub API rate limits. To resolve this, create a personal access token (classic PAT) with the public_repo
scope and set it in the global (User) extension settings to increase your rate limit.
For advanced users who want to build the extension .vsix
file, follow these steps:
npm install -g yarn
npm install -g @vscode/vsce
yarn
in the project directory to install dependencies.vsce package
.This will generate a .vsix
file, which you can install in VS Code using code --install-extension path-to.vsix
or via the GUI: Extensions > three dots > Install from VSIX
.