Getting started with Raspberry Pi Pico
Chapter 7. Using Visual Studio Code
Visual Studio Code (VSCode) is a popular open source editor developed by Microsoft. It is the recommended Integrated
Development Environment (IDE) on the Raspberry Pi 4 if you want a graphical interface to edit and debug your code.
7.1. Installing Visual Studio Code
IMPORTANT
These installation instructions rely on you already having downloaded and installed the command line toolchain (see
Chapter
3), as well as connecting SWD to your board via OpenOCD
debugging
ARM versions of Visual Studio Code for the Raspberry Pi can be downloaded from
Download. If you are using a 32-bit operating system (e.g. the default Raspberry Pi OS) then download the
you are using a 64-bit OS, then download the
follow the instructions to install it.
Install the downloaded
dpkg -i <downloaded file name.deb>
Once the install has completed, install the extensions needed to debug a Raspberry Pi Pico:
code --install-extension marus25.cortex-debug
code --install-extension ms-vscode.cmake-tools
code --install-extension ms-vscode.cpptools
Finally, start Visual Studio Code from a Terminal window:
$ export PICO_SDK_PATH=/home/pi/pico/pico-sdk
$ code
Ensure you set the
NOTE
If
PICO_SDK_PATH
Terminal window before starting vscode, or start vscode from the menus. You may therefore want to add it to your
or
.profile
NOTE
You can configure intellisense for CMake by changing the provider by toggling; View → Command Palette → C/C++:
Change Configuration Provider... → CMake Tools.
7.1. Installing Visual Studio Code
(Chapter
6).
. package from the command line.
.deb
to install.
so that Visual Studio Code can find the SDK.
PICO_SDK_PATH
is not set by default in your shell's environment you will have to set it each time you open a new
file.
.bashrc
(Chapter
file. Once downloaded, double click on the .deb package and
ARM 64 .deb
to the folder where the file was downloaded, then use
cd
5) and setting up GDB for command-line
https://code.visualstudio.com/
ARM .deb
file; if
25
Need help?
Do you have a question about the RP2040 and is the answer not in the manual?