Build folder per board and variant

Open
#174 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
cmake, typescript, vscode

Research direction

Start with src/commands/getPaths.mts at the linked line and inspect how cmake.buildDirectory is handled. Then review tasks.json, where the Ninja build path is hardcoded, and determine how board and variant values should affect both paths. Done means separate build folders can be selected for each board and variant without manual settings or task edits.

Written by the indexing model from the issue text.

Description

enhancement

Is it possible to set a build folder per board and per variant?

Like:
build/picow/rel
build/picow/deb
build/pico2w/rel
build/pico2w/deb

So looking into the source I came across this: https://github.com/raspberrypi/pico-vscode/blob/97c49e827e4da3bdee0b92aecce544d24033b73e/src/commands/getPaths.mts#L213
Sure enough you can already override the build directory from your settings.json by adding something like:

"cmake.buildDirectory": "${workspaceFolder}/build/pico2w/debug",

Now if only we could define this variable from the board and variant.

The build folder is also hardcode in the Ninja task in tasks.json so you will have to replace it with something like:

"args": ["-C", "${workspaceFolder}/build/pico2w/debug"],
Dominant language
TypeScript
Stars
297
Forks
45
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/pico-vscode

All issues in raspberrypi/pico-vscode

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.