Including custom boards in a VS Code .code-workspace file ("nrf-connect.boardRoots")

Hi DevZone,

What I am working with:

I am working on a project using nRF Connect SDK with VS Code, and I am also using the nRF Connect extension for it.

My issue:

I am trying to make my VS Code project register my local folder for custom boards so I can use the board when creating a build configuration with the "Add Build Configuration" option in VS Code.

 

 

I can do this with an absolute path as shown below in line 29, and as you can see in the images above, I can select "Custom Boards":

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
"folders": [
{
"path": "myfirstapp"
},
{
"name": "minimalTest",
"path": "minimalTest"
},
{
"name": "ThreadsTest",
"path": "ThreadsTest"
},
{
"name": "HelloWorldTest",
"path": "HelloWorldTest"
},
],
"settings": {
"nrf-connect.topdir": "c:\\nRFConnectSDK\\v1.7.0",
"nrf-connect.toolchain.path": "c:\\nRFConnectSDK\\v1.7.0\\toolchain",
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

However, I want the path in "nrf-connect.boardRoots" to be either relative to the Workspace Folder, or use an environment variable to make the contents of the .code-workspace 

not be dependent on absolute paths of my PC file structure. I can do this with the "nrf-connect.applications" setting as seen below in line 9 with "${workspaceFolder}".

I have added line 17 to show the difference between it and line 16:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
"folders": [
{
"path": ".."
},
],
"settings": {
"nrf-connect.applications": [
"${workspaceFolder}"
],
"nrf-connect.topdir": "c:\\nRFConnectSDK\\v1.7.0",
"nrf-connect.toolchain.path": "c:\\nRFConnectSDK\\v1.7.0\\toolchain",
"nrf-connect.boardRoots": [
"d:\\GIT\\GettingStartedNCS\\myfirstapp"
//"${workspaceFolder}"
],
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Could you tell me if it is possible to make the "nrf-connect.boardRoots" directory either:

 - Relative to the workspace folder

 - Dependent on an environment macro

 - Or something else which allows me to avoid an absolute path for this setting?

Thank you for your help in advance,

Br. Casper