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
100 stars 12 forks source link

command:raspberry-pi-pico.launchTargetPath does not resolve correctly #48

Closed Artagael closed 3 weeks ago

Artagael commented 1 month ago

I am attempting to compile pshell for the pico. I imported the project successfully, but couldn't get debug to work - getting a message that the executable ${PSHELL}.elf could not be found. It appears that the definition of the executable in launch.json does not properly resolve targets which are defined in terms of environment variables (in this case depending on choice of console. replacing command:raspberry-pi-pico.launchTargetPath with the path to the actual executable works - but breaks the optionality built into the cmakefile.

will-v-pi commented 1 month ago

Yes, this is not supported in the extension by default - only projects where the project name is not a variable, and is the same name as the only executable, will work by default. You can switch the extension to using the CMake Tools extension to fix this - see #37 for more details, and #46 for how we're thinking of integrating this into the import project wizard