Issues building sample code

The auto installed failed, so I had to do a manual install. I followed this tutorial:
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/getting_started/installing.html

After some struggle, it seems that I'm almost there. While trying to compile I get this error:

  • Terminal under Vscode windows

"Building blinky
C:\WINDOWS\system32\cmd.exe /d /s /c "west build --build-dir c:\nordic\myapps\blinky\build c:\nordic\myapps\blinky --pristine --board nrf9160dk_nrf9160_ns -- -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')"

  • Vscode problems tab:

#include errors detected based on information provided by the configurationProvider setting. Squiggles are disabled for this translation unit (C:\nordic\myapps\blinky\src\main.c).

cannot open source file "syscall_list.h" (dependency of "C:\Users\JV\AppData\Local\Programs\Microsoft VS Code\zephyr\kernel.h")

cannot open source file "devicetree_generated.h" (dependency of "C:\Users\JV\AppData\Local\Programs\Microsoft VS Code\zephyr\drivers\gpio.h")

Support Info:

IMPORTANT: The data below could contain sensitive or confidential information about your environment.
If you do not wish this to be seen by others, please make sure to remove it before sharing.

For help and support, visit the Nordic DevZone at https://devzone.nordicsemi.com/.

{
  "platform": {
    "os": "win32",
    "osVersion": "Windows 10 Pro",
    "osKernel": "10.0.19045",
    "vscode": "1.79.1",
    "electron": "22.5.7",
    "node": "v16.17.1"
  },
  "system": {
    "date": "2023-06-14T17:21:10.381Z",
    "vscodeRoot": "c:\\Users\\JV\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app",
    "nrfConnectForDesktopInstalled": true,
    "vscodeUptime": "01:12:03",
    "osUptime": "01:52:35",
    "cpu": {
      "model": "Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz",
      "speed": "2594 MHz",
      "count": 4
    },
    "memory": {
      "total": "31.93 GB",
      "free": "23.42 GB"
    }
  },
  "workspace": {
    "name": "Untitled (Workspace)",
    "workspaceFile": "1686670668724",
    "folders": [
      "c:\\vsCodeNordic\\blinky",
      "c:\\nordic\\myapps\\blinky"
    ]
  },
  "extensions": {
    "internal": {
      "nordic-semiconductor.nrf-connect": {
        "version": "2023.4.179",
        "path": "c:\\Users\\JV\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2023.4.179-win32-x64",
        "isActive": true
      },
      "nordic-semiconductor.nrf-terminal": {
        "version": "2023.4.15",
        "path": "c:\\Users\\JV\\.vscode\\extensions\\nordic-semiconductor.nrf-terminal-2023.4.15",
        "isActive": true
      },
      "nordic-semiconductor.nrf-devicetree": {
        "version": "2023.4.61",
        "path": "c:\\Users\\JV\\.vscode\\extensions\\nordic-semiconductor.nrf-devicetree-2023.4.61",
        "isActive": true
      },
      "nordic-semiconductor.nrf-kconfig": {
        "version": "2023.4.17",
        "path": "c:\\Users\\JV\\.vscode\\extensions\\nordic-semiconductor.nrf-kconfig-2023.4.17",
        "isActive": true
      }
    },
    "external": {
      "marus25.cortex-debug": "1.12.0",
      "ms-vscode.cpptools": "1.16.0",
      "ms-vscode-remote.remote-wsl-recommender": "0.0.19",
      "ms-vscode.js-debug": "1.78.0",
      "ms-vscode.js-debug-companion": "1.0.18",
      "ms-vscode.vscode-js-profile-table": "1.0.3",
      "cschlosser.doxdocgen": "1.4.0",
      "GitHub.vscode-pull-request-github": "0.66.1",
      "jeff-hykin.better-cpp-syntax": "1.17.2",
      "kiteco.kite": "0.147.0",
      "mcu-debug.debug-tracker-vscode": "0.0.15",
      "mcu-debug.memory-view": "0.0.21",
      "mcu-debug.peripheral-viewer": "1.4.6",
      "mcu-debug.rtos-views": "0.0.7",
      "ms-python.isort": "2022.8.0",
      "ms-python.python": "2023.10.1",
      "ms-python.vscode-pylance": "2023.6.10",
      "ms-toolsai.jupyter": "2023.5.1001582324",
      "ms-toolsai.jupyter-keymap": "1.1.2",
      "ms-toolsai.jupyter-renderers": "1.0.15",
      "ms-toolsai.vscode-jupyter-cell-tags": "0.1.8",
      "ms-toolsai.vscode-jupyter-slideshow": "0.1.5",
      "ms-vscode-remote.remote-containers": "0.295.0",
      "ms-vscode-remote.remote-ssh": "0.102.0",
      "ms-vscode-remote.remote-ssh-edit": "0.86.0",
      "ms-vscode-remote.remote-wsl": "0.79.5",
      "ms-vscode.cpptools-extension-pack": "1.3.0",
      "ms-vscode.cpptools-themes": "2.0.0",
      "ms-vscode.remote-explorer": "0.4.0",
      "ms-vsliveshare.vsliveshare": "1.0.5873",
      "trond-snekvik.gnu-mapfiles": "1.1.0",
      "twxs.cmake": "0.0.17",
      "VisualStudioExptTeam.intellicode-api-usage-examples": "0.2.7",
      "VisualStudioExptTeam.vscodeintellicode": "1.2.30",
      "zenor.makefile-creator": "0.0.3"
    }
  },
  "tools": {
    "c:\\ncs\\toolchains\\31f4403e35\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gcc.exe": "0.16.0",
    "C:\\Program Files\\SEGGER\\JLink\\JLink.exe": "7.80c",
    "C:\\Program Files (x86)\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\nrfjprog.exe": "10.19.0",
    "nrfutil": "Not found",
    "c:\\ncs\\toolchains\\31f4403e35\\opt\\bin\\cmake.exe": "3.20.5",
    "c:\\ncs\\toolchains\\31f4403e35\\opt\\bin\\Scripts\\west.exe": "1.0.0",
    "c:\\ncs\\toolchains\\31f4403e35\\opt\\bin\\python.exe": "3.8.2",
    "c:\\ncs\\toolchains\\31f4403e35\\opt\\bin\\ninja.exe": "1.9.0",
    "c:\\ncs\\toolchains\\31f4403e35\\opt\\bin\\gperf.exe": "3.1",
    "c:\\ncs\\toolchains\\31f4403e35\\opt\\bin\\dtc.exe": "1.4.7",
    "c:\\ncs\\toolchains\\31f4403e35\\opt\\bin\\gn.exe": "2105",
    "c:\\ncs\\toolchains\\31f4403e35\\mingw64\\bin\\git.exe": "2.37.3.windows.1",
    "gdbPath": "c:\\ncs\\toolchains\\31f4403e35\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gdb.exe"
  },
  "sdks": [
    {
      "version": "2.4.0",
      "path": "c:\\ncs"
    }
  ],
  "toolchains": [
    {
      "version": "2.4.0",
      "path": "c:\\ncs\\toolchains\\31f4403e35"
    }
  ],
  "connectedDevices": [],
  "deviceProvider": "nrfutil",
  "config": {
    "nordic-semiconductor.nrf-connect": {
      "topdir": "C:\\ncs",
      "toolchain": {
        "path": "${nrf-connect.toolchain:2.4.0}"
      },
      "ozonePath": "",
      "applications": [],
      "applicationOptions": {},
      "kconfig": {
        "interface": "kconfig",
        "executeInDefaultShell": false
      },
      "welcome": {
        "showOnStartup": true
      },
      "west": {
        "env": {
          "$base": "terminal"
        }
      },
      "boardRoots": [],
      "enableTelemetry": true,
      "taskBindings": {},
      "debugging": {
        "backend": "nRF Debug",
        "flash": true,
        "bindings": {}
      },
      "activeAppFollowActiveEditor": true,
      "deviceProvider": "nrfutil"
    },
    "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
    }
  },
  "environment": {
    "westExe": "west",
    "westEnv": {
      "ELECTRON_RUN_AS_NODE": "1",
      "HOME": "C:\\Users\\JV",
      "HOMEDRIVE": "C:",
      "HOMEPATH": "\\Users\\JV",
      "Path": "c:\\ncs\\toolchains\\31f4403e35\\mingw64\\bin;c:\\ncs\\toolchains\\31f4403e35\\mingw64\\libexec\\git-core;c:\\ncs\\toolchains\\31f4403e35\\opt\\bin;c:\\ncs\\toolchains\\31f4403e35\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin;c:\\ncs\\toolchains\\31f4403e35\\arm-zephyr-eabi\\bin;c:\\ncs\\toolchains\\31f4403e35\\opt\\bin\\Scripts;C:\\Program Files (x86)\\Intel\\iCLS Client\\;C:\\Program Files\\Intel\\iCLS Client\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\Common Files\\Oracle\\Java\\javapath;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:\\Program Files (x86)\\Windows Kits\\8.1\\Windows Performance Toolkit\\;C:\\Program Files (x86)\\NoteBook FanControl\\;C:\\Octave\\Octave-5.1.0.0\\mingw64\\bin;C:\\Program Files\\PuTTY\\;C:\\Program Files\\Git\\cmd;C:\\Program Files\\MATLAB\\R2020b\\bin;C:\\Program Files\\dotnet\\;C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\110\\Tools\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\120\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\120\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\120\\DTS\\Binn\\;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C;C:\\Program Files (x86)\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\CMake\\bin;C:\\Users\\JV\\AppData\\Local\\Programs\\Python\\Python37\\Scripts\\;C:\\Users\\JV\\AppData\\Local\\Programs\\Python\\Python37\\;C:\\Users\\JV\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files (x86)\\Nmap;C:\\Program Files (x86)\\Dr. Memory\\bin\\;C:\\Users\\JV\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\JV\\.dotnet\\tools;C:\\Program Files (x86)\\Atmel\\Flip 3.4.7\\bin;C:\\Program Files\\Graphviz\\bin;C:\\Users\\JV\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Program Files\\wget\\bin;C:\\ncs\\toolchains\\31f4403e35;",
      "ZEPHYR_BASE": "c:\\ncs\\zephyr",
      "ZEPHYR_TOOLCHAIN_VARIANT": "zephyr",
      "ZEPHYR_SDK_INSTALL_DIR": "c:\\ncs\\toolchains\\31f4403e35\\opt\\zephyr-sdk",
      "PYTHONPATH": "c:\\ncs\\toolchains\\31f4403e35\\opt\\bin;c:\\ncs\\toolchains\\31f4403e35\\opt\\bin\\Lib;c:\\ncs\\toolchains\\31f4403e35\\opt\\bin\\Lib\\site-packages",
      "Python3_ROOT": "c:\\ncs\\toolchains\\31f4403e35\\opt\\bin"
    },
    "inherited": {
      "ELECTRON_RUN_AS_NODE": "1",
      "HOME": "C:\\Users\\JV",
      "HOMEDRIVE": "C:",
      "HOMEPATH": "\\Users\\JV",
      "Path": "C:\\Program Files (x86)\\Intel\\iCLS Client\\;C:\\Program Files\\Intel\\iCLS Client\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\Common Files\\Oracle\\Java\\javapath;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:\\Program Files (x86)\\Windows Kits\\8.1\\Windows Performance Toolkit\\;C:\\Program Files (x86)\\NoteBook FanControl\\;C:\\Octave\\Octave-5.1.0.0\\mingw64\\bin;C:\\Program Files\\PuTTY\\;C:\\Program Files\\Git\\cmd;C:\\Program Files\\MATLAB\\R2020b\\bin;C:\\Program Files\\dotnet\\;C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\110\\Tools\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\120\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\120\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\120\\DTS\\Binn\\;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C;C:\\Program Files (x86)\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\CMake\\bin;C:\\Users\\JV\\AppData\\Local\\Programs\\Python\\Python37\\Scripts\\;C:\\Users\\JV\\AppData\\Local\\Programs\\Python\\Python37\\;C:\\Users\\JV\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files (x86)\\Nmap;C:\\Program Files (x86)\\Dr. Memory\\bin\\;C:\\Users\\JV\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\JV\\.dotnet\\tools;C:\\Program Files (x86)\\Atmel\\Flip 3.4.7\\bin;C:\\Program Files\\Graphviz\\bin;C:\\Users\\JV\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Program Files\\wget\\bin;C:\\ncs\\toolchains\\31f4403e35;",
      "PATH": "C:\\Program Files (x86)\\Intel\\iCLS Client\\;C:\\Program Files\\Intel\\iCLS Client\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\Common Files\\Oracle\\Java\\javapath;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:\\Program Files (x86)\\Windows Kits\\8.1\\Windows Performance Toolkit\\;C:\\Program Files (x86)\\NoteBook FanControl\\;C:\\Octave\\Octave-5.1.0.0\\mingw64\\bin;C:\\Program Files\\PuTTY\\;C:\\Program Files\\Git\\cmd;C:\\Program Files\\MATLAB\\R2020b\\bin;C:\\Program Files\\dotnet\\;C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\110\\Tools\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\120\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\120\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\120\\DTS\\Binn\\;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C;C:\\Program Files (x86)\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\CMake\\bin;C:\\Users\\JV\\AppData\\Local\\Programs\\Python\\Python37\\Scripts\\;C:\\Users\\JV\\AppData\\Local\\Programs\\Python\\Python37\\;C:\\Users\\JV\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files (x86)\\Nmap;C:\\Program Files (x86)\\Dr. Memory\\bin\\;C:\\Users\\JV\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\JV\\.dotnet\\tools;C:\\Program Files (x86)\\Atmel\\Flip 3.4.7\\bin;C:\\Program Files\\Graphviz\\bin;C:\\Users\\JV\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Program Files\\wget\\bin;C:\\ncs\\toolchains\\31f4403e35;"
    },
    "toolchainPath": "c:\\ncs\\toolchains\\31f4403e35",
    "toolchainBinPath": "c:\\ncs\\toolchains\\31f4403e35\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin",
    "toolchainVersion": "2.4.0"
  },
  "terminal": {
    "shell": null,
    "defaultProfile": null
  }
}

What I'm missing now?

Parents Reply Children
  • Hi Jose,

    It's always best to have an automatic installation. Probably the issue of not downloading the SDK was caused because of a slow or unstable internet connection or maybe some GitHub issues.

    Also, you need the SDK files in the location C:/ncs/v2.4.0. But in your case, the SDK files have been installed directly into C:/ncs and this can cause issues later on, as the .west file can be hidden anywhere in there.

    It would be great if you could install them into C:/ncs/v2.4.0. Also, the errors that you see are because of an incomplete installation, so now if you go to the SDK folder and open a terminal and try west update, it should be fixed.

    -Priyanka

  • Automatic installation may be the way, but I followed the all steps by the letter (both, auto and manual)
    At the company we have two high speed connections,  the back up kicks in when the other goes down.
    I did try the west update from that folder several times.

    Don't worry, just close the case... I will try solething else

  • Hi Jose,

    Did you try storing all the SDK files in the location  C:/ncs/v2.4.0 and then try the west update in there? Please do try this and let me know how it goes.

    -Priyanka

Related