raspberrypi / pico-vscode

The official VS Code extension for Raspberry Pi Pico development. It includes several features to simplify project creation and deployment.
https://marketplace.visualstudio.com/items?itemName=raspberry-pi.raspberry-pi-pico
Mozilla Public License 2.0
131 stars 16 forks source link

The project isn't relocatable after creation? #29

Closed kiwih closed 3 months ago

kiwih commented 3 months ago

Hello,

After creating a project using the "New Project" button, I can compile etc the new project. But if I move or rename the parent directory, I can't build it anymore, it seems there are hardcoded paths in the build?

This is a little painful!

will-v-pi commented 3 months ago

There are no hardcoded paths in the CMake files the extension generates - however when CMake generates the build directory it uses absolute paths. So you can never move a configured CMake build folder - this isn't limited to this extension, it'a a feature of CMake.

To solve this just delete the build directory, and then open the Raspberry Pi Pico Quick Access bar and click "Configure CMake" to re-run CMake to generate the build directory in the new location Screenshot 2024-08-09 104529