toolchain installation directory relative to VSCode workspaceFolder?

HI!

We want to use different toolchains folder per VSCode projects, but it seems, that the nrf-connect setting "nrf-connect.toolchainManager.installDirectory" is not capable of working with ${workspaceFolder} Variable nor with a pur relative path like "..".

On the other hand, it seems, that it must point to a folder where a folder "toolchains" exists in, in which a toolchains.json file lives. ....
Is this correct? IMHO, it would be more nice to just point to a folder, where the toolchains.json is and not to a hardcoded toolchains folder.

Anyway, it would be nice if there is more docu to the installDirectory setting and how to setup custom folder installation with this setting.

Is it anyhow possible, to use not absolute paths with this setting?

Cheers
Thilo

  • Nope ... it was just me :).

    Setting the installDirectory in the code-workspace under "settings": does the trick!

    {
    	"settings": {
    		"nrf-connect.toolchainManager.installDirectory": "${workspaceFolder}/.."
    	}
    }



    But still it needs to point to a folder, where a folder "toolchains" exists, inside which the toolchains.json resides.

  • But now, when I build via nrf-connect for VS Code, it will not recognize the build configuration after a successful build.
    Under Build and Actions the "Pristine Build" button appears after each build, although, the build worked as it should.

    In the nrf Connect output I can find:

    [08:36:37] west build --build-dir ..../build ..... --pristine --board .... -- -DNCS_TOOLCHAIN_VERSION=NONE -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y
    [08:36:56] Success.


    But it still shows:

  • Hi Thilo,

    To help me understand what you're trying to achieve, could you please provide more background or motivation for why you want to change the toolchain install directory? The extension now has you select both the SDK and the toolchain to use in the build configuration, so it seems like it should already do what you want. Are VSCode projects in this context West workspaces?

    Cheers,

    Vidar

  • Hi Vidar!

    We want to be able to use a specific Toolchain and specific SDK from custom paths per project.

    And yes, I selected the Toolchain and the SDK which where found correctly by in the Build Configuration Dialog.
    And the first build right after the BuildConfiguration Dialog succeeds. As the nrf connect output log I posted states.

    But after this, the BUILD and ACTIONS parts of nrf connect for VS Code still shows pristine build buttons.

    Cheers,
    Thilo

  • Hi Thilo, 

    The extension team requested the "support information" to investigate this. Could you please generate this report and post it here?

    Cheers,

    Vidar

Related