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

Support for custom board files #119

Open shalxmva opened 1 week ago

shalxmva commented 1 week ago

I have a custom board files on a special folder on my project, and added that folder to PICO_BOARD_HEADER_DIRS variable.

I looked into the switchBoard.mts file and in askBoard function, only the sdk board folder is used to look for board files.

Is there any possibility to look into the folders added to that variable, so custom board files could be used without copying them to the sdk's board folder?

shalxmva commented 1 week ago

I created a change, so maybe this will help:

 https://github.com/shalxmva/pico-vscode/tree/develop

Also this change gets the current project_name from CMakeCache.txt file ( my project sets the project name using ${PICO_BOARD} variable )

The project i am working on is https://github.com/Team-Resurgent/Modxo/tree/sdk2_board_files

will-v-pi commented 1 week ago

I don't think your fix will work when PICO_BOARD_HEADER_DIRS is set to a list, or when it includes relative paths - feel free to raise a PR (you closed #120?) if you want to discuss fixes

Also this change gets the current project_name from CMakeCache.txt file ( my project sets the project name using ${PICO_BOARD} variable )

I don't think we want to add this, as once you're using CMake variables for the project name you should probably be using the CMake Tools integration as well, which handles all that and more.

shalxmva commented 1 week ago

PR was closed automatically, i didnt see that i was pulling it to master, and i cant see a develop branch.

I can create the PR to make a discussion about this and i can contribute by doing this enhacement.

Do i make the PR to any particular branch on this repo?

will-v-pi commented 1 week ago

The main branch is fine for a PR - as this software is still under development we haven't created a separate develop branch yet