Skip to content

mwinters-stuff/vscode-devcontainer-raspberrypi-pico

Repository files navigation

vscode-devcontainer-raspberrypi-pico

VSCode Dev Container for the Raspberry PI Pico C SDK

This container includes

  • pico-sdk
  • pico-extras
  • pico-project-generator
  • pico-vga
  • arduino-pico
  • arduino-core
  • openocd - compiled for picoprobe
  • arduino libraries
  • picotool
  • bootterm (for serial monitoring) - see https://github.com/wtarreau/bootterm

Usage

For an existing project

  • Clone or download the repository
  • Copy .devcontainer and it's contents into your project
  • Copy .vscode and it's contents into your project
  • Remove any existing "build" directory.
  • Open the folder in VSCode and allow the container to build.

For a new project

You can use the whole project and modify as required OR

  • Create the folder where you want to create the project.
  • Copy .devcontainer and it's contents into your project
  • Copy .vscode and it's contents into your project
  • Open the folder in VSCode. When prompted reopen the folder in the container.
  • Open a terminal locally (not in vscode) and run the command xhost +SI:localuser:$(id -un)
  • Open a terminal in the dev container and execute the command "pico_project.py --gui". The gui will now appear on your desktop.
  • Change the project name to the name of your folder. Change the location to "/workspaces".
  • Configure the rest of the project as desired but do not select Create VSCode project under the IDE options.
  • Click OK to generate the code.
  • Click Quit to exit the code generator.

Build and debug the project

  • In the left hand pane, select the Run and Debug icon
  • In VSCode, press P and select the command CMake: Select a Kit
  • Select the GCC 13.3.x arm-none-eabi compiler.
  • In VSCode, press P and select the command CMake: Select a Variant
  • Select the Debug variant
  • At the top of the screen in the Run and Debug dropdown select Cortext Debug
  • Click the green arrow. If prompted to select a launch target select your project.
  • The project will build and run in the debugger.

Environment Variables

  • PICO_SDK_PATH=/apps/pico-sdk
  • PICO_EXTRAS_PATH=/apps/pico-extras
  • PICOVGA_PATH=/apps/pico-vga
  • ARDUINO_PICO_PATH=/apps/arduino-pico
  • ARDUINO_CORE_PATH=/apps/arduino-core

To know

  • SDK is installed in /apps/pico-sdk
  • EXTRAS is installed in /apps/pico-extras
  • PICO-PROJECT-GENERATOR is installed in /apps/pico-project-generator
  • PICO-VGA is installed in /apps/pico-vga
  • Arduino pico libraries are available in /apps/arduino-pico
  • Arduino core libraries are available in /apps/arduino-core
  • All USB devices are exported to container - so the picoprobe can be found and used.
  • USB Device /dev/ttyACM0 is exported to container for monitoring

About

VSCode Dev Container for the Raspberry PI Pico C SDK

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published