Build error in VS code

Hi,

      I am using VS code for my project, which is using bl653 board. While in  build configuration setup in vs code am getting this error. ERROR: source directory - does not exist
FATAL ERROR: refusing to proceed without --force due to above error . May I know the reason even though i followed may tutorials am not able to figure out the issue , i.e. build configuration . Note - am using Windows environment. With nRF connect desktop , VS Code. 

  • Hello, 

    Difficult to tell what is the issue here without a more elaborate description. Can you please provide information about you installation i.e. what version of NCS, what paths you are using, etc. You can run the nRF Connect: Generate support information from the Command Palette of VS Code. Please copy and paste here. 

    Thanks. 

    Kind regards,
    Øyvind

  • hi , thanks for response. that issue got solved. basically toolchain issue which was not installed completely.

  • I have this problem too, but no clear indication of the cause. I have my support information below

    {
      "platform": {
        "os": "win32",
        "osVersion": "Windows 10 Home",
        "osKernel": "10.0.19044",
        "vscode": "1.67.2",
        "electron": "17.4.1",
        "node": "v16.13.0"
      },
      "system": {
        "date": "2022-05-24T19:05:11.126Z",
        "vscodeRoot": "c:\\Users\\Scott\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app",
        "nrfConnectForDesktopInstalled": true,
        "vscodeUptime": "00:07:46",
        "osUptime": "00:22:12",
        "cpu": {
          "model": "11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz",
          "speed": "2803 MHz",
          "count": 4
        },
        "memory": {
          "total": "15.72 GB",
          "free": "9.12 GB"
        }
      },
      "workspace": {
        "name": "Untitled (Workspace)",
        "workspaceFile": "1653335631607",
        "folders": [
          "c:\\Users\\Scott\\Documents\\Visual Studio\\MyBlinky"
        ]
      },
      "extensions": {
        "internal": {
          "nordic-semiconductor.nrf-connect": {
            "version": "2022.4.219",
            "path": "c:\\Users\\Scott\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2022.4.219",
            "isActive": true
          },
          "nordic-semiconductor.nrf-terminal": {
            "version": "2022.4.61",
            "path": "c:\\Users\\Scott\\.vscode\\extensions\\nordic-semiconductor.nrf-terminal-2022.4.61",
            "isActive": true
          },
          "nordic-semiconductor.devicetree": null,
          "nordic-semiconductor.kconfig": null
        },
        "external": {
          "marus25.cortex-debug": "1.4.4",
          "ms-vscode.cpptools": "1.9.8",
          "ms-vscode-remote.remote-wsl-recommender": "0.0.15",
          "ms-vscode.js-debug": "1.67.2",
          "ms-vscode.js-debug-companion": "1.0.18",
          "ms-vscode.references-view": "0.0.89",
          "ms-vscode.vscode-js-profile-table": "1.0.1",
          "trond-snekvik.gnu-mapfiles": "1.1.0",
          "twxs.cmake": "0.0.17"
        }
      },
      "tools": {
        "C:\\Program Files (x86)\\SEGGER\\JLink\\JLink.exe": "7.58b",
        "C:\\Program Files (x86)\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\nrfjprog.exe": "10.15.4",
        "nrfutil": "Not found",
        "c:\\Users\\Scott\\ncs\\v1.9.1\\toolchain\\opt\\bin\\cmake.exe": "3.20.5",
        "c:\\Users\\Scott\\ncs\\v1.9.1\\toolchain\\opt\\bin\\Scripts\\west.exe": "0.12.0",
        "c:\\Users\\Scott\\ncs\\v1.9.1\\toolchain\\opt\\bin\\python.exe": "3.8.2",
        "c:\\Users\\Scott\\ncs\\v1.9.1\\toolchain\\opt\\bin\\ninja.exe": "1.9.0",
        "c:\\Users\\Scott\\ncs\\v1.9.1\\toolchain\\opt\\bin\\gperf.exe": "3.1",
        "c:\\Users\\Scott\\ncs\\v1.9.1\\toolchain\\opt\\bin\\dtc.exe": "1.4.7",
        "c:\\Users\\Scott\\ncs\\v1.9.1\\toolchain\\opt\\bin\\arm-none-eabi-gcc.exe": "9-2019-q4-major",
        "c:\\Users\\Scott\\ncs\\v1.9.1\\toolchain\\opt\\bin\\gn.exe": "1977",
        "c:\\Users\\Scott\\ncs\\v1.9.1\\toolchain\\mingw64\\bin\\git.exe": "2.26.2.windows.1"
      },
      "sdks": [
        {
          "version": "1.9.1",
          "path": "c:\\Users\\Scott\\ncs\\v1.9.1"
        }
      ],
      "toolchains": [
        {
          "version": "1.9.1",
          "path": "c:\\Users\\Scott\\ncs\\v1.9.1\\toolchain"
        }
      ],
      "connectedDevices": [
        {
          "serialNumber": "960024928"
        }
      ],
      "deviceProviders": [
        "nrfjprog"
      ],
      "config": {
        "nordic-semiconductor.nrf-connect": {
          "topdir": "${nrf-connect.sdk:1.9.1}",
          "toolchain": {
            "path": "${nrf-connect.toolchain:1.9.1}"
          },
          "ozonePath": "",
          "applications": [
            "c:\\Users\\Scott\\Documents\\Visual Studio\\MyBlinky"
          ],
          "applicationOptions": {},
          "kconfig": {
            "interface": "kconfig"
          },
          "welcome": {
            "showOnStartup": true
          },
          "west": {
            "env": {
              "$base": "terminal"
            }
          },
          "boardRoots": [],
          "enableTelemetry": false
        },
        "nordic-semiconductor.nrf-terminal": {
          "terminalMode": "character"
        },
        "nordic-semiconductor.devicetree": {
          "modules": [
            "${zephyrBase}",
            "${zephyrBase}/../nrf",
            "."
          ],
          "zephyr": "",
          "ctxFile": "",
          "defaultBoard": ""
        },
        "nordic-semiconductor.kconfig": {
          "root": "",
          "env": {},
          "cfiles": true,
          "disable": false,
          "zephyr": {
            "base": ""
          },
          "python": "",
          "liveValue": true
        },
        "marus25.cortex-debug": {
          "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,
          "flattenAnonymous": false,
          "registerUseNaturalFormat": true,
          "variableUseNaturalFormat": true,
          "dbgServerLogfile": null,
          "showRTOS": false,
          "showDevDebugOutput": "none"
        }
      },
      "environment": {
        "westExe": "c:\\Users\\Scott\\ncs\\v1.9.1\\toolchain\\opt\\bin\\Scripts\\west.exe",
        "westEnv": {
          "ELECTRON_RUN_AS_NODE": "1",
          "HOME": "C:\\Users\\Scott",
          "HOMEDRIVE": "C:",
          "HOMEPATH": "\\Users\\Scott",
          "Path": "c:\\Users\\Scott\\ncs\\v1.9.1\\toolchain\\mingw64\\bin;c:\\Users\\Scott\\ncs\\v1.9.1\\toolchain\\mingw64\\libexec\\git-core;c:\\Users\\Scott\\ncs\\v1.9.1\\toolchain\\opt\\bin;c:\\Users\\Scott\\ncs\\v1.9.1\\toolchain\\opt\\bin\\Scripts;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C;C:\\Program Files (x86)\\STMicroelectronics\\STM32 ST-LINK Utility\\ST-LINK Utility;C:\\Program Files\\PuTTY\\;C:\\Program Files (x86)\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Users\\Scott\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\Scott\\AppData\\Local\\GitHubDesktop\\bin;C:\\Users\\Scott\\AppData\\Local\\Programs\\Microsoft VS Code\\bin",
          "ZEPHYR_BASE": "c:\\Users\\Scott\\ncs\\v1.9.1\\zephyr",
          "GNUARMEMB_TOOLCHAIN_PATH": "c:\\Users\\Scott\\ncs\\v1.9.1\\toolchain\\opt",
          "ZEPHYR_TOOLCHAIN_VARIANT": "gnuarmemb",
          "PYTHONPATH": "c:\\Users\\Scott\\ncs\\v1.9.1\\toolchain\\opt\\bin;c:\\Users\\Scott\\ncs\\v1.9.1\\toolchain\\opt\\bin\\Lib;c:\\Users\\Scott\\ncs\\v1.9.1\\toolchain\\opt\\bin\\Lib\\site-packages",
          "Python3_ROOT": "c:\\Users\\Scott\\ncs\\v1.9.1\\toolchain\\opt\\bin"
        },
        "toolchainPath": "c:\\Users\\Scott\\ncs\\v1.9.1\\toolchain",
        "toolchainBinPath": "c:\\Users\\Scott\\ncs\\v1.9.1\\toolchain\\opt\\bin",
        "toolchainVersion": "1.9.1"
      },
      "terminal": {
        "shell": null,
        "defaultProfile": null
      }
    }

  • I have this problem too, but no clear indication of the cause. I have my support information below

           delete all the build files ,if you have any and check the toolchain and sdk.  Try pristine build 

  • And please try to move your projects to a folder without white space. i.e. "c:\\Users\\Scott\\Documents\\Visual Studio\\MyBlinky"

Related