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

Parents
  • Adding to the above, when I build using the configurator for the second project, the CMake command has the following input:

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

    However once the build has been generated and I click pristine build, only the first project path is included which would be why it can't find the board:

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

  • Hi Thomas,

    I would like to clear some doubts.

    1. You are able to build normally for the 1st project. And when you try to build the 2nd project normally (without pristine build) it works? And if this works, can you see the build folder even after restarting VS Code?

    2. But when you pristine build the 2nd project, "board not found" occurs and no build folder is generated?

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

    Maybe the build folder doesn't occur because your pristine build goes to an error.

    Kindly let me know the details.

    Regards,

    Priyanka

  • 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 

  • Hi,

    Thank you very much for identifying the potential issue. I have reported to the concerned team and they are working on this. A workaround would be to add the required directories in the "Board Roots" setting in VS Code so that they are applied always. 

Reply Children
No Data
Related