Problem getting started making a build configuration in nrf Connect Extension for VS code

Screenshot of error message

Hello, I've followed the steps required on YouTube for setting up VS code with nrf Connect for desktop and the toolchain manager. It didn't work for me on Windows 10 and I've just updated to a clean install of Windows 11 and it doesn't seem to be working for me here either. I'm getting the following error message as you can see in the screenshot: 

Building blinky
west build --build-dir c:\Users\saulm\ncs\apps\blinky\build c:\Users\saulm\ncs\apps\blinky --pristine --board nrf52840dongle_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 failed to launch (exit code: 2).

Terminal will be reused by tasks, press any key to close it.

Additionally there are some errors VS code has in reading the program as shown here: 

#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (C:\Users\saulm\ncs\v1.8.0\apps-saul\blinky\src\main.c).

cannot open source file "zephyr.h"

cannot open source file "device.h"

cannot open source file "devicetree.h"

cannot open source file "drivers/gpio.h"

The SDK and toolchain are up to date as of 2022-02-07. And I"m using the Nrf52840 dongle which is recognized by VS code. My install  and application directory are visible in the first terminal output message. I would appreciate your help trouble shooting. Perhaps you'd know what commands I could type in the terminal (and which terminal to use) to see if west can be located. Any assistance would be appreciated.

  • As for my other question regarding connecting the nrf52840 dongle to VS code, I realize that it doesn't connect, so I guess VS code connects through the SWD interface somehow on the other boards. I succesfully put the hex file for blinky onto the dongle by using the programmer. You can consider my ticket closed, unless there are any more details you'd like to know.

  • Hi,

    I am glad to hear that 1.8.0 is working in VS Code now!

    saul.magnusson said:
    As for my other question regarding connecting the nrf52840 dongle to VS code, I realize that it doesn't connect, so I guess VS code connects through the SWD interface somehow on the other boards.

    The VS Code extension uses nrfjprog to enumerate devices for the connected devices list. Because of this, Dongle and Thingy are not supported at the moment. Hopefully support for this will be added in the future, but until then the solution is to program the device separately, as you did.

    Best regards,

    Marte

Related