This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

VS Code custom board bug

Hi,

I am developing for custom boards on VS Code and while the new board search in the workspace path is working, I am having issues with it.

When I add another project to the workspace, the board does populate and I can configure a build option for it, and build it when configuring it. However, if I then try and do a pristine build, it complains that it can't find the board?

Also, if I then close VS Code and reopen it, the build folder does not show up for the second project.

Everything for the first project works fine including the pristine build and the build folder being displayed.

I also find that I cannot see the board for the second project after adding it to the nrf connect applications until I restart VS Code?

Kind regards,

Thomas

  • Hi Priyanka,

    I detailed the west command difference above:

    "-DBOARD_ROOT:STRING="c:/Project1Path;c:/Project2Path"

    vs

    "-DBOARD_ROOT:STRING="c:/Project1Path"

  • west build --build-dir c:\project2\build c:\project2 --pristine --board board2ns -- -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DBOARD_ROOT:STRING="c:/project1;c:/project2" -DOVERLAY_CONFIG:STRING="overlay.conf"

    vs

    west build --build-dir c:\project2\build c:\project2 --pristine --board board2ns -- -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DBOARD_ROOT:STRING="c:/project1" -DCONF_FILE:STRING="c:/project2/prj.conf" -DOVERLAY_CONFIG:STRING="c:/project2/overlay.conf"

  • Hi Thomas,

    in the Ctrl+ (or) File->Preference -> settings, you can search for nRF Connect and you can see the Nrf-connect: Board Roots.

    Here you can edit your settings.json and add the path to your project.

    Could you try adding it here in case you have not done this and also share a picture of your settings.json?

    Kind Regards,

    Priyanka

  • Hi Priyanka,

    I know of this setting, but you cannot set a relative path which is why you added the automatic board root setting recently. But it’s clearly not working correctly for the pristine build.

    Kind regards,

    Thomas

  • Please see this:

    https://devzone.nordicsemi.com/f/nordic-q-a/81090/including-custom-boards-in-a-vs-code-code-workspace-file-nrf-connect-boardroots

    “From the development team:

    Unfortunately, the current version the user has does not support relative path or ${workspaceFolder} reference, so the user must use the absolute path at the moment. We already have updated to automatically add all open workspace folders as potential board roots and the configuration handling is being enhanced too. The next public release will contain these updates.”

    This has been released already but is broken for the pristine build 

Related