This project provides a ready-to-use portable development environment for Raspberry Pi Pico using C/C++ based on Visual Studio Code Dev Containers.
The environment is based on containers (Podman to be specific) which provides a easy to start way to run the development tools and libraries required for C/C++ development. The containers will be configured with all necessary dependencies and tools, such as a C/C++ compiler and debugger. The editor comes configured with extensions for C/C++ development, such as language support and debugging tools.
There might be some issues when mounting devices using root-less containers, such as when using Podman. Because of that there is a requirement to pre-configure UDEV rules for openocd
. The repository includes 60-openocd.rules file which needs to be placed in etc/udev/rules.d/
and the Picoprobe reconnected. Please note, that these rules were updated for Fedora OS. The original file can be found in here. devcontainer.json contains custom run arguments with annotations for container runtime, like run.oci.keep_original_groups=1
. It is meant to fix group membership issues and prevent missing permission errors when trying to access devices from container. Correct annotation needs to be used according to the container runtime (oci, crun).
# build binary manually
make build
# flash binary directly using openocd
make flash
There is an option to enable C++ code linting functionality using Clang-tidy. Install the linter using the commands below.
apt update && apt install clang-tidy
- Raspberry Pi Pico SDK
- Raspberry Pi Pico and RP2040 - C/C++ Part 1: Blink and VS Code
- Raspberry Pi Pico and RP2040 - C/C++ Part 2: Debugging with VS Code
- Raspberry Pi Pico and Pico W
- RP2040 Datasheet
- Raspberry Pi Pico SDK
- Picoprobe
- Getting started with Raspberry Pi Pico
- Picoprobe: Using the Raspberry Pi Pico as Debug Probe