This project is created to make C++ development in VSCode for Raspberry Pi Pico devices easy. Everything is built in Docker, so it's OS independent. Put your code in app/ folder, Terminal > Run Tasks > Pico Init once to set up the project, then compile binaries with Ctrl+Shift+B. The .uf2 and .elf binaries will be found at /artifacts. Put the pico device in bootloader mode and upload .uf2 to your pico device.
Thanks to this project https://github.com/majbthrd/pico-debug , you can now directly debug your pico without the need for another device. Check down for more info.
GNU Arm Embedded Toolchain, make sure to click the option: Add path to environment variable
Download Openocd and extract it to debug-tools. The cortex-debug.openocdPath in settings.json should point to the right path.
CMake just for highliting the syntax of CMakeLists
Cortex-Debug needed only for debugging
Terminal > Run Tasks > Pico Init
This will build the base Pico docker image and also clone pico-sdk and pico-examples projects. The pico-sdk is to make life easy programming with C++ extension.
Terminal > Run Tasks > Pico Build or (Ctrl+Shift+B)
/app folder will be sent to docker, it will get build using the CMakeLists.txt and the build binaries will be automatically copied from docker container to /artifacts folder.
The first time this task runs it will take a bit to build the images.
Upload debug-tools/pico-debug-gimmecache.uf2 to your pico device. Open app/blink.c file and press F5 to start debugging.