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 studio not building samples

Goodday

I thought I would try the webinar 

Desktop️ nRF Connect for VS Code Webinar - Hackster.io

Im getting the following error after I add Build configuration

Building hid3534
west build --build-dir e:\aacrs\02_12\nordic\vs_remote_tutorial\hid\hid3534\build e:\aacrs\02_12\nordic\vs_remote_tutorial\hid\hid3534 --pristine --board nrf52840dk_nrf52840 -- -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING="NONE"

usage: west [-h] [-z ZEPHYR_BASE] [-v] [-V] <command> ...
west: error: argument <command>: invalid choice: 'build' (choose from 'init', 'update', 'list', 'manifest', 'diff', 'status', 'forall', 'help', 'config', 'topdir', 'selfupdate')
The terminal process terminated with exit code: 2.

I have uninstalled and reinstalled both vs code and nRf connect..

My connected 52840 DK does show up in connected devices.

  • Then nrf Connect SDK has loaded the vs Studio tool chains and installed the extensions as per default.

    I cant see why it would not be working

  • Øyvind said:
    From the output I can see that the path is not configured correctly in VS Code. 

    Did you open VS Code from the Toolchain Manager as demonstrated in the Hackster.io webinar? If so, this should configure the VS Code extension with correct settings. 

    From the support information you provided, we can see that none of the tools from the toolchain is configured

     "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.3",
        "cmake": "Not found",
        "west": "Not found",
        "C:\\Users\\meltb\\AppData\\Local\\Microsoft\\WindowsApps\\python.exe": null,
        "ninja": "Not found",
        "gperf": "Not found",
        "dtc": "Not found",
        "gnuarmemb": "Not found",
        "gn": "Not found",
        "C:\\Program Files\\Git\\cmd\\git.exe": "2.27.0.windows.1"
      },

    From my installation is looks like this

     "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.0",
        "c:\\NordicSemi\\v1.9.0\\toolchain\\opt\\bin\\cmake.exe": "3.20.5",
        "c:\\NordicSemi\\v1.9.0\\toolchain\\opt\\bin\\Scripts\\west.exe": "0.12.0",
        "c:\\NordicSemi\\v1.9.0\\toolchain\\opt\\bin\\python.exe": "3.8.2",
        "c:\\NordicSemi\\v1.9.0\\toolchain\\opt\\bin\\ninja.exe": "1.9.0",
        "c:\\NordicSemi\\v1.9.0\\toolchain\\opt\\bin\\gperf.exe": "3.1",
        "c:\\NordicSemi\\v1.9.0\\toolchain\\opt\\bin\\dtc.exe": "1.4.7",
        "c:\\NordicSemi\\v1.9.0\\toolchain\\opt\\bin\\arm-none-eabi-gcc.exe": "9-2019-q4-major",
        "c:\\NordicSemi\\v1.9.0\\toolchain\\opt\\bin\\gn.exe": "1975",
        "c:\\NordicSemi\\v1.9.0\\toolchain\\mingw64\\bin\\git.exe": "2.26.2.windows.1"
      },

    Can you please provide the path of the nRF Connect SDK folder and the content of this folder?

  • That caught my eye as well, the non configured tools. Yes, I did it all from nRf connect SDK, I have done this 3 times uninstall and start with clean installations

    Is the below the connect SDK folder you asking about?

  • After checking the above, I decided to delete the NCS folder completely. I then reinstalled it from nrf connect but this time I did it from the zip file and did it to a custom folder. it looks slightly different

    before it had .vscode and now it has .west.

    After adding a simple example "hello world" the first build started correctly but failed with include files not found. I then restarted VS and get the following error when compiling

  • Can you please run the Generate support information command one more time after reinstalling the nRF Connect SDK? Make sure to start VS code from the Toolchain Manager to verify functionality. 

Related