This repository contains a development environment for building and deploying projects on the RP2040 microcontroller using the Raspberry Pi Pico SDK. It utilizes Docker, Docker Compose, and VS Code Dev Containers to create a consistent and portable development experience.
It creates an Ubuntu image and downloads the pico-sdk, picotool and clangd for a good development experience.
.devcontainer/devcontainer.json
: Contains the dev container configuration files for VS Code..devcontainer/Dockerfile
: The Docker image definition used to create the development environment.src/
: Folder containing your code.build/
: Folder where the build artifacts will be generated.CMakeLists.txt
: CMake configuration file for building your project..clangd
: Include headers for clangd.
Make sure you have the following software installed on your system:
- Docker
- Docker Compose
- Visual Studio Code
- With the extension Remote - Containers
-
Clone the repository
git clone https://github.com/runiorr/pico-sdk-devcontainer.git cd pico-sdk-devcontainer
-
Open the project in Visual Studio Code
open VS Code and navigate to File > Open Folder, then select the root of your project.
-
Reopen in the Dev Container
You should see a prompt suggesting you reopen the project in the dev container. Click on "Reopen in Container." If you don't see the prompt, you can manually select Ctrl+Shift+P and choose Remote-Containers: Reopen in Container.
-
Build the Project
Once inside the dev container, you can build the project using the following commands:
Copy code mkdir -p build cd build cmake .. make
After building your project, you can mount the rp2040 in your computer and just drag and drop the uf2 file generated in the build process into the microcontroller.
Contributions are welcome! Please create a fork of the repository and submit a pull request if you have improvements or bug fixes.