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

Parents
  • 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

Reply
  • 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

Children
  • Hi Thilo, 

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

    Cheers,

    Vidar

  • Hi Vidar

    here you go.

    Cheers,
    Thilo

    // IMPORTANT: The following data can contain sensitive or confidential information about your environment.
    // If you do not want others to see this information, make sure to remove it before sharing the data.
    
    // For help and support, visit Nordic Semiconductor's DevZone at https://devzone.nordicsemi.com/.
    
    {
      "platform": {
        "os": "linux",
        "osVersion": "#57-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 12 23:42:21 UTC 2025",
        "osKernel": "6.8.0-55-generic",
        "vscode": "1.98.2",
        "electron": "34.2.0",
        "node": "v20.18.2",
        "name": "Ubuntu",
        "id": "ubuntu",
        "version": "24.04.2 LTS (Noble Numbat)",
        "versionId": "24.04"
      },
      "system": {
        "date": "2025-03-20T15:34:04.991Z",
        "vscodeRoot": "/usr/share/code/resources/app",
        "nrfConnectForDesktopInstalled": "unknown",
        "vscodeUptime": "00:28:06",
        "osUptime": "335:23:56",
        "cpu": "AMD Ryzen 9 5950X 16-Core Processor"
      },
      "workspace": {
        "name": "pan-isn (Workspace)",
        "workspaceFile": "/media/data/projects/pan-ng/PAN-ISN/pan-isn.code-workspace",
        "folders": [
          "/media/data/projects/pan-ng/PAN-ISN",
          "/media/data/projects/pan-ng/ZephyrSDK/zephyr",
          "/media/data/projects/pan-ng/ZephyrSDK/nrf",
          "/media/data/projects/pan-ng/ZephyrSDK/bootloader",
          "/media/data/projects/pan-ng/ZephyrSDK/nrfxlib"
        ]
      },
      "sdks": [
        {
          "version": "v2.6.1",
          "path": "/media/data/projects/pan-ng/ZephyrSDK"
        },
        {
          "version": "v2.6.1",
          "path": "/opt/ncs/v2.6.1"
        },
        {
          "version": "v2.6.1",
          "path": "/media/data/projects/ateam/ZephyrSDK"
        }
      ],
      "activeBuild": "/media/data/projects/pan-ng/PAN-ISN/build",
      "apps": [
        {
          "workspace": "/media/data/projects/pan-ng/PAN-ISN",
          "uri": "/media/data/projects/pan-ng/PAN-ISN",
          "buildConfigurations": [
            {
              "id": "/media/data/projects/pan-ng/PAN-ISN/build",
              "name": "build",
              "boardId": "pan_ng_module_cpuapp",
              "type": "Zephyr",
              "isChild": false,
              "isStale": true,
              "taskBindings": {
                "build": [],
                "pristineBuild": [],
                "flash": [],
                "eraseAndFlash": []
              },
              "sdk": "/media/data/projects/pan-ng/ZephyrSDK"
            }
          ]
        }
      ],
      "toolchains": [
        {
          "version": "2.6.1",
          "path": "/media/data/projects/pan-ng/PAN-ISN/../toolchains/2be090971e"
        },
        {
          "version": "2.6.1",
          "path": "/opt/ncs/toolchains/2be090971e"
        }
      ],
      "connectedDevices": [],
      "tools": {
        "/media/data/projects/pan-ng/Toolchain/2.6.1/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc": "0.16.5",
        "/opt/SEGGER/JLink/JLinkExe": "7.98e",
        "/usr/local/bin/nrfjprog": "10.21.0",
        "/media/data/projects/pan-ng/Toolchain/2.6.1/usr/local/bin/cmake": "3.21.0",
        "/media/data/projects/pan-ng/Toolchain/2.6.1/usr/local/bin/west": "1.2.0",
        "/media/data/projects/pan-ng/Toolchain/2.6.1/usr/local/bin/python3": "3.9.18",
        "/media/data/projects/pan-ng/Toolchain/2.6.1/usr/local/bin/ninja": "1.10.2",
        "/media/data/projects/pan-ng/Toolchain/2.6.1/usr/bin/gperf": "3.1",
        "/media/data/projects/pan-ng/Toolchain/2.6.1/usr/bin/dtc": "1.5.0",
        "/media/data/projects/pan-ng/Toolchain/2.6.1/opt/bin/gn": "2132",
        "/media/data/projects/pan-ng/Toolchain/2.6.1/usr/local/bin/git": "2.37.3",
        "arm-gdbPath": "/media/data/projects/pan-ng/toolchains/2be090971e/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gdb",
        "riscv-gdbPath": "/media/data/projects/pan-ng/Toolchain/2.6.1/opt/zephyr-sdk/riscv64-zephyr-elf/bin/riscv64-zephyr-elf-gdb"
      },
      "nrfutil": {
        "nrfutil-device": {
          "version": "2.7.9",
          "binPath": "/home/cest/.vscode/extensions/nordic-semiconductor.nrf-connect-2025.1.127-linux-x64/platform/nrfutil/bin/nrfutil-device",
          "jlinkInfo": {
            "description": "This version of SEGGER J-Link is different from the J-Link version that was used to test nrfutil device commands",
            "expectedVersion": {
              "version": "JLink_V7.94i",
              "versionFormat": "string"
            },
            "name": "JlinkARM",
            "version": "JLink_V7.98e",
            "versionFormat": "string"
          }
        },
        "nrfutil-toolchain-manager": {
          "version": "0.14.4",
          "binPath": "/home/cest/.vscode/extensions/nordic-semiconductor.nrf-connect-2025.1.127-linux-x64/platform/nrfutil/bin/nrfutil-toolchain-manager"
        }
      },
      "environment": {
        "westEnv": {
          "GIT_EXEC_PATH": "/media/data/projects/pan-ng/Toolchain/2.6.1/usr/local/libexec/git-core",
          "HOME": "/home/cest",
          "PATH": "/media/data/projects/pan-ng/Toolchain/2.6.1/usr/bin:/media/data/projects/pan-ng/Toolchain/2.6.1/usr/bin:/media/data/projects/pan-ng/Toolchain/2.6.1/usr/local/bin:/media/data/projects/pan-ng/Toolchain/2.6.1/opt/bin:/media/data/projects/pan-ng/Toolchain/2.6.1/opt/nanopb/generator-bin:/media/data/projects/pan-ng/Toolchain/2.6.1/opt/zephyr-sdk/aarch64-zephyr-elf/bin:/media/data/projects/pan-ng/Toolchain/2.6.1/opt/zephyr-sdk/x86_64-zephyr-elf/bin:/media/data/projects/pan-ng/Toolchain/2.6.1/opt/zephyr-sdk/arm-zephyr-eabi/bin:/media/data/projects/pan-ng/Toolchain/2.6.1/opt/zephyr-sdk/riscv64-zephyr-elf/bin:/home/cest/bin:/home/cest/.local/bin:/home/cest/.nvm/versions/node/v20.17.0/bin:/home/cest/bin:/home/cest/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/usr/local/bin:/usr/local/cuda/bin:/home/cest/.cargo/bin:/media/data/projects/fzf/bin:/home/cest/bin:/home/cest/.local/bin:/home/cest/.nvm/versions/node/v20.17.0/bin:/home/cest/bin:/home/cest/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/usr/local/bin:/usr/local/cuda/bin:/home/cest/.cargo/bin:/media/data/projects/fzf/bin",
          "ZEPHYR_BASE": "/media/data/projects/pan-ng/ZephyrSDK/zephyr",
          "ZEPHYR_TOOLCHAIN_VARIANT": "zephyr",
          "ZEPHYR_SDK_INSTALL_DIR": "/media/data/projects/pan-ng/Toolchain/2.6.1/opt/zephyr-sdk",
          "PYTHONPATH": "/media/data/projects/pan-ng/Toolchain/2.6.1/usr/local/lib/python3.9:/media/data/projects/pan-ng/Toolchain/2.6.1/usr/local/lib/python3.9/site-packages",
          "USER": "cest"
        },
        "inherited": {
          "ELECTRON_RUN_AS_NODE": "1",
          "HOME": "/home/cest",
          "PATH": "/home/cest/bin:/home/cest/.local/bin:/home/cest/.nvm/versions/node/v20.17.0/bin:/home/cest/bin:/home/cest/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/usr/local/bin:/usr/local/cuda/bin:/home/cest/.cargo/bin:/media/data/projects/fzf/bin",
          "USER": "cest"
        }
      },
      "terminal": {
        "defaultProfile": null
      },
      "config": {
        "nordic-semiconductor.nrf-connect": {
          "topdir": "",
          "toolchain": {
            "path": ""
          },
          "ozonePath": "",
          "applications": [
            "${workspaceFolder}"
          ],
          "applicationOptions": {},
          "kconfig": {
            "interface": "kconfig"
          },
          "west": {
            "env": {
              "$base": "terminal"
            }
          },
          "boardRoots": [
            "${workspaceFolder}/ruag-zephyr-sdk"
          ],
          "taskBindings": {},
          "buildTerminal": {
            "condensedProgress": true
          },
          "debugging": {
            "flash": true,
            "bindings": {},
            "justMyCode": false
          },
          "activeAppFollowActiveEditor": true,
          "flash": {
            "softreset": false,
            "erase": false,
            "recover": false
          },
          "enableTelemetry": null,
          "thirdpartyIntegration": {},
          "toolchainManager": {
            "indexURL": null,
            "installDirectory": "${workspaceFolder}/.."
          },
          "nrfutil": {
            "home": null
          },
          "defaultOpenAction": "ask",
          "terminalProfile": {
            "shell": null
          }
        },
        "nordic-semiconductor.nrf-terminal": {
          "terminalMode": "character"
        },
        "marus25.cortex-debug": {
          "variableUseNaturalFormat": true,
          "liveWatchRefreshRate": "300",
          "armToolchainPath": null,
          "armToolchainPrefix": "arm-none-eabi",
          "gdbPath": null,
          "objdumpPath": null,
          "JLinkGDBServerPath": null,
          "openocdPath": null,
          "pyocdPath": null,
          "PEGDBServerPath": null,
          "stutilPath": null,
          "stlinkPath": null,
          "stm32cubeprogrammer": null,
          "enableTelemetry": true,
          "dbgServerLogfile": null
        }
      },
      "extensions": {
        "internal": {
          "nordic-semiconductor.nrf-connect": {
            "version": "2025.1.127",
            "path": "/home/cest/.vscode/extensions/nordic-semiconductor.nrf-connect-2025.1.127-linux-x64",
            "isActive": true
          },
          "nordic-semiconductor.nrf-terminal": {
            "version": "2024.9.14",
            "path": "/home/cest/.vscode/extensions/nordic-semiconductor.nrf-terminal-2024.9.14",
            "isActive": true
          },
          "nordic-semiconductor.nrf-devicetree": {
            "version": "2024.12.15",
            "path": "/home/cest/.vscode/extensions/nordic-semiconductor.nrf-devicetree-2024.12.15",
            "isActive": true
          },
          "nordic-semiconductor.nrf-kconfig": {
            "version": "2024.12.13",
            "path": "/home/cest/.vscode/extensions/nordic-semiconductor.nrf-kconfig-2024.12.13",
            "isActive": true
          }
        },
        "external": {
          "marus25.cortex-debug": "1.12.1",
          "ms-vscode.cpptools": "1.23.6",
          "ms-vscode.js-debug": "1.97.1",
          "ms-vscode.js-debug-companion": "1.1.3",
          "ms-vscode.vscode-js-profile-table": "1.0.10",
          "augustocdias.tasks-shell-input": "1.17.0",
          "bierner.markdown-mermaid": "1.27.0",
          "cschlosser.doxdocgen": "1.4.0",
          "foxundermoon.shell-format": "7.2.5",
          "gsppvo.vscode-commandbar": "0.3.1",
          "HarryHopkinson.vs-code-runner": "2.2.5",
          "keroc.hex-fmt": "1.0.0",
          "mcu-debug.debug-tracker-vscode": "0.0.15",
          "mcu-debug.memory-view": "0.0.25",
          "mcu-debug.peripheral-viewer": "1.4.6",
          "mcu-debug.rtos-views": "0.0.7",
          "mhutchie.git-graph": "1.30.0",
          "ms-azuretools.vscode-docker": "1.29.4",
          "ms-python.debugpy": "2025.4.1",
          "ms-python.isort": "2023.10.1",
          "ms-python.python": "2025.2.0",
          "ms-python.vscode-pylance": "2025.3.2",
          "ms-vscode-remote.remote-ssh": "0.118.0",
          "ms-vscode-remote.remote-ssh-edit": "0.87.0",
          "ms-vscode.cpptools-extension-pack": "1.3.1",
          "ms-vscode.remote-explorer": "0.4.3",
          "trond-snekvik.gnu-mapfiles": "1.1.0",
          "vscodevim.vim": "1.29.0"
        }
      }
    }
    
    

  • Hi Thilo,

    Thanks for sharing the support information. Unfortunately, we haven't been able to reproduce the issue on our end. Do you have a minimal project that we could use to replicate the problem?

Related