Issue with toolchain selection in nRF Connect (VS-Code)

Dear Nordic Support

Recently I have the issue that the nrf-connect.toolchain.path, set in the VS-Code workspace file, doesn't correctly resolve if predefined VS-Code variables are used.

Example

For a project having the SDK locally (linked as git submodule) we set nrf-connect.toolchain.path to ${workspaceFolder}\sdk\NordicSemi\toolchains. This used to work just fine, but now nRF Connect falls back to the latest installed toolchain, installed via Toolchain manager (global space):

If I use an absolute path instead, the local toolchain is correctly selected:

What might be the reason for this behavior?

I would also like to understand the toolchain management in general. Is there a comprehensive description that answers questions like:

  • How does nRF Connect plugin manage the selectable toolchains and its paths?
  • Where and how are the variables pointing to toolchains stored? (like ${nrf-connect.toolchain:2.0.2}
  • How can I remove links to local toolchain paths, from the list of selectable toolchains? (command "Uninstall Toolchain" fails)

Thanks a lot for your support.

  • Hello Stefan,

    I am not sure about this myself, but I've forwarded these questions to the R&D team responsible. Could you check that you are using the newest version of the VSC extension though?

    Regards,

    Elfving

  • Hello Elfving

    Thanks for taking up the ticket. NRF Connect for VS Code extension is on version v2024.3.25.

    Actually I uninstalled all related vs-code extensions and re-installed them via Nordics Toolchain Manager (before my initial support request). I also disabled all other, unrelated extensions, to avoid possible interference.

    BR

  • Hello again Stefan,

    According to the R&D team, this is expected, there is no valid use-case that the toolchain should be in VS Code workspace, so that specific setting does not and will not handle VS Code variables.

    The toolchains are installed by nrfutil toolchain-manager and we trust that it keeps it's registry wherever it keeps it's registry. We use our bundled toolchain-manager in the extension, but if a user has nrfutil installed on the command line, they can list/install/search/... outside of VSCode. There's a default location different on all platforms where the toolchains are installed, that can also be changed.

    See here and here.

    Regards,

    Elfving

  • Hi Elfving

    Ok, understood. Thanks for the clarification.

    It's funny that our configuration worked until recently, but is now causing problems. However, I guess we then need to consider to refactor our project to use the nrfutil installled SDK outside our workspace.

    BR, Stefan

Related