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

nRFConnect SDK and VS Code - FATAL ERROR: CMake is not installed or cannot be found; cannot build.

I'm new to the nRF Connect software and I'm following the helpful "nRF Connect for VS Code" video series on YouTube to install it on my Windows 10 PC. Everything was going well until I tried building the "Blinky" example in Visual Studio Code, as shown in the video tutorial "nRF Connect for VS Code, 3: Building an application & Exploring windows" (about two minutes into this video).

Unfortunately I get the following error in the Terminal output window:

FATAL ERROR: CMake is not installed or cannot be found; cannot build.

I've checked the Extensions tab in Visual Studio Code, and CMAKE is clearly installed (see screenshot). I'm not sure where I went wrong in the installation, or how to fix it. Do I need to update the Windows Environment Variables to include a path to CMAKE?

I'm running nRF Connect for Desktop version 3.9.1
nRF Connect SDK version 1.7.1
Visual Studio Code version 1.62.3
The development board I'm working with is nRF9160DK from Nordic Semiconductor

Thanks,

Rob

Parents
  • Hey Rob, 

    I'm sorry to hear that you encountered this issue. Have you installed nRF Connect SDK v1.7.1 via the Toolchain Manager? The CMake extension on VS Code does not install CMake, only CMake language support. When installing via Toolchain Manager, CMake should be included with the toolchain itself. From the VS Code Command Pallette please run nRF Connect: Generate Support Information and copy/paste this information here using "Insert --> Code".

    Thank you!

    Kind regards,
    Øyvind

  • Hi Øyvind,

    Thanks for your prompt reply. I did install nRF Connect SDK v1.7.1 from the Toolchain Manager, exactly as was shown in the video for a Windows installation. I've run the command to generate the support information as you requested, and here is the result:

    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 Enterprise",
        "osKernel": "10.0.17763",
        "vscode": "1.62.3",
        "electron": "13.5.2",
        "node": "v14.16.0"
      },
      "system": {
        "date": "2021-12-06T15:33:57.692Z",
        "vscodeRoot": "c:\\Users\\username\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app",
        "nrfConnectForDesktopInstalled": true,
        "vscodeUptime": "00:02:08",
        "osUptime": "88:37:39",
        "cpu": {
          "model": "Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz",
          "speed": "2808 MHz",
          "count": 4
        },
        "memory": {
          "total": "15.85 GB",
          "free": "7.15 GB"
        }
      },
      "workspace": {
        "name": "Untitled (Workspace)",
        "workspaceFile": "1638676970888",
        "folders": [
          "c:\\nordic\\myapps\\myfirstapp"
        ]
      },
      "extensions": {
        "internal": {
          "nordic-semiconductor.nrf-connect": {
            "version": "2021.11.221",
            "path": "c:\\Users\\username\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2021.11.221",
            "isActive": true
          },
          "nordic-semiconductor.nrf-terminal": {
            "version": "2021.11.7",
            "path": "c:\\Users\\username\\.vscode\\extensions\\nordic-semiconductor.nrf-terminal-2021.11.7",
            "isActive": true
          },
          "nordic-semiconductor.devicetree": null,
          "nordic-semiconductor.kconfig": null
        },
        "external": {
          "marus25.cortex-debug": "0.4.10",
          "ms-vscode.cpptools": "1.7.1",
          "ms-vscode-remote.remote-wsl-recommender": "0.0.12",
          "ms-vscode.js-debug": "1.62.0",
          "ms-vscode.js-debug-companion": "1.0.15",
          "ms-vscode.references-view": "0.0.81",
          "ms-vscode.vscode-js-profile-table": "0.0.18",
          "trond-snekvik.gnu-mapfiles": "1.1.0",
          "twxs.cmake": "0.0.17"
        }
      },
      "tools": {
        "C:\\Program Files\\SEGGER\\JLink\\JLink.exe": "7.58b",
        "nrfjprog": "Not found",
        "cmake": "Not found",
        "west": "Not found",
        "python": "Not found",
        "ninja": "Not found",
        "gperf": "Not found",
        "dtc": "Not found",
        "gnuarmemb": "Not found",
        "gn": "Not found"
      },
      "connectedDevices": [
        {
          "serialNumber": "960055738",
          "pcaNumber": "PCA10090",
          "boardName": "nRF9160 DK"
        }
      ],
      "config": {
        "nordic-semiconductor.nrf-connect": {
          "topdir": "${nrf-connect.sdk:1.7.1}",
          "toolchain": {
            "path": "${nrf-connect.toolchain:1.7.1}"
          },
          "ozonePath": "",
          "applications": [
            "${workspaceFolder}"
          ],
          "jlink": {
            "rtosPlugin": ""
          },
          "kconfig": {
            "interface": null
          },
          "welcome": {
            "showOnStartup": false
          },
          "west": {
            "env": {
              "$base": "terminal"
            }
          },
          "boardRoots": [],
          "enableTelemetry": true
        },
        "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": ""
        },
        "marus25.cortex-debug": {
          "armToolchainPath": null,
          "armToolchainPrefix": "arm-none-eabi",
          "gdbPath": 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
        }
      },
      "environment": {
        "westExe": "c:\\nordic\\v1.7.1\\toolchain\\opt\\bin\\Scripts\\west.exe",
        "westEnv": {
          "ELECTRON_RUN_AS_NODE": "1",
          "HOME": "C:\\Users\\username\\Google Drive\\OrCAD",
          "HOMEDRIVE": "C:",
          "HOMEPATH": "\\Users\\username",
          "Path": "c:\\nordic\\v1.7.1\\toolchain\\mingw64\\bin;c:\\nordic\\v1.7.1\\toolchain\\mingw64\\libexec\\git-core;c:\\nordic\\v1.7.1\\toolchain\\opt\\bin;c:\\nordic\\v1.7.1\\toolchain\\opt\\bin\\Scripts;undefined",
          "PATH": "C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files\\Intel\\iCLS Client\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Skype\\Phone\\;c:\\Program Files (x86)\\Microsoft SQL Server\\110\\Tools\\Binn\\;c:\\Program Files\\Microsoft SQL Server\\110\\Tools\\Binn\\;c:\\Program Files\\Microsoft SQL Server\\110\\DTS\\Binn\\;C:\\Program Files (x86)\\Windows Live\\Shared;C:\\Program Files (x86)\\Windows Kits\\10\\Windows Performance Toolkit\\;C:\\Program Files\\PuTTY\\;C:\\Program Files\\IVI Foundation\\VISA\\Win64\\Bin\\;C:\\Program Files (x86)\\IVI Foundation\\VISA\\WinNT\\Bin\\;C:\\Program Files (x86)\\IVI Foundation\\VISA\\WinNT\\Bin;C:\\Program Files\\dotnet\\;C:\\Program Files\\Microsoft SQL Server\\130\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\170\\Tools\\Binn\\;C:\\Program Files (x86)\\STMicroelectronics\\STM32 ST-LINK Utility\\ST-LINK Utility;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\Git\\cmd;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Cadence\\SPB_16.6\\openaccess\\bin\\win32\\opt;C:\\Cadence\\SPB_16.6\\tools\\capture;C:\\Cadence\\SPB_16.6\\tools\\pspice;C:\\Cadence\\SPB_16.6\\tools\\specctra\\bin;C:\\Cadence\\SPB_16.6\\tools\\fet\\bin;C:\\Cadence\\SPB_16.6\\tools\\libutil\\bin;C:\\Cadence\\SPB_16.6\\tools\\bin;C:\\Cadence\\SPB_16.6\\tools\\pcb\\bin;;C:\\Users\\username\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\username\\AppData\\Local\\Programs\\Microsoft VS Code\\bin",
          "ZEPHYR_BASE": "c:\\nordic\\v1.7.1\\zephyr",
          "GNUARMEMB_TOOLCHAIN_PATH": "c:\\nordic\\v1.7.1\\toolchain\\opt",
          "ZEPHYR_TOOLCHAIN_VARIANT": "gnuarmemb",
          "PYTHONPATH": "c:\\nordic\\v1.7.1\\toolchain\\opt\\bin;c:\\nordic\\v1.7.1\\toolchain\\opt\\bin\\Lib;c:\\nordic\\v1.7.1\\toolchain\\opt\\bin\\Lib\\site-packages",
          "Python3_ROOT": "c:\\nordic\\v1.7.1\\toolchain\\opt\\bin"
        },
        "toolchainPath": "c:\\nordic\\v1.7.1\\toolchain",
        "toolchainBinPath": "c:\\nordic\\v1.7.1\\toolchain\\opt\\bin",
        "toolchainVersion": "1.7.1"
      },
      "terminal": {
        "shell": null,
        "defaultProfile": null
      }
    }

Reply
  • Hi Øyvind,

    Thanks for your prompt reply. I did install nRF Connect SDK v1.7.1 from the Toolchain Manager, exactly as was shown in the video for a Windows installation. I've run the command to generate the support information as you requested, and here is the result:

    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 Enterprise",
        "osKernel": "10.0.17763",
        "vscode": "1.62.3",
        "electron": "13.5.2",
        "node": "v14.16.0"
      },
      "system": {
        "date": "2021-12-06T15:33:57.692Z",
        "vscodeRoot": "c:\\Users\\username\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app",
        "nrfConnectForDesktopInstalled": true,
        "vscodeUptime": "00:02:08",
        "osUptime": "88:37:39",
        "cpu": {
          "model": "Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz",
          "speed": "2808 MHz",
          "count": 4
        },
        "memory": {
          "total": "15.85 GB",
          "free": "7.15 GB"
        }
      },
      "workspace": {
        "name": "Untitled (Workspace)",
        "workspaceFile": "1638676970888",
        "folders": [
          "c:\\nordic\\myapps\\myfirstapp"
        ]
      },
      "extensions": {
        "internal": {
          "nordic-semiconductor.nrf-connect": {
            "version": "2021.11.221",
            "path": "c:\\Users\\username\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2021.11.221",
            "isActive": true
          },
          "nordic-semiconductor.nrf-terminal": {
            "version": "2021.11.7",
            "path": "c:\\Users\\username\\.vscode\\extensions\\nordic-semiconductor.nrf-terminal-2021.11.7",
            "isActive": true
          },
          "nordic-semiconductor.devicetree": null,
          "nordic-semiconductor.kconfig": null
        },
        "external": {
          "marus25.cortex-debug": "0.4.10",
          "ms-vscode.cpptools": "1.7.1",
          "ms-vscode-remote.remote-wsl-recommender": "0.0.12",
          "ms-vscode.js-debug": "1.62.0",
          "ms-vscode.js-debug-companion": "1.0.15",
          "ms-vscode.references-view": "0.0.81",
          "ms-vscode.vscode-js-profile-table": "0.0.18",
          "trond-snekvik.gnu-mapfiles": "1.1.0",
          "twxs.cmake": "0.0.17"
        }
      },
      "tools": {
        "C:\\Program Files\\SEGGER\\JLink\\JLink.exe": "7.58b",
        "nrfjprog": "Not found",
        "cmake": "Not found",
        "west": "Not found",
        "python": "Not found",
        "ninja": "Not found",
        "gperf": "Not found",
        "dtc": "Not found",
        "gnuarmemb": "Not found",
        "gn": "Not found"
      },
      "connectedDevices": [
        {
          "serialNumber": "960055738",
          "pcaNumber": "PCA10090",
          "boardName": "nRF9160 DK"
        }
      ],
      "config": {
        "nordic-semiconductor.nrf-connect": {
          "topdir": "${nrf-connect.sdk:1.7.1}",
          "toolchain": {
            "path": "${nrf-connect.toolchain:1.7.1}"
          },
          "ozonePath": "",
          "applications": [
            "${workspaceFolder}"
          ],
          "jlink": {
            "rtosPlugin": ""
          },
          "kconfig": {
            "interface": null
          },
          "welcome": {
            "showOnStartup": false
          },
          "west": {
            "env": {
              "$base": "terminal"
            }
          },
          "boardRoots": [],
          "enableTelemetry": true
        },
        "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": ""
        },
        "marus25.cortex-debug": {
          "armToolchainPath": null,
          "armToolchainPrefix": "arm-none-eabi",
          "gdbPath": 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
        }
      },
      "environment": {
        "westExe": "c:\\nordic\\v1.7.1\\toolchain\\opt\\bin\\Scripts\\west.exe",
        "westEnv": {
          "ELECTRON_RUN_AS_NODE": "1",
          "HOME": "C:\\Users\\username\\Google Drive\\OrCAD",
          "HOMEDRIVE": "C:",
          "HOMEPATH": "\\Users\\username",
          "Path": "c:\\nordic\\v1.7.1\\toolchain\\mingw64\\bin;c:\\nordic\\v1.7.1\\toolchain\\mingw64\\libexec\\git-core;c:\\nordic\\v1.7.1\\toolchain\\opt\\bin;c:\\nordic\\v1.7.1\\toolchain\\opt\\bin\\Scripts;undefined",
          "PATH": "C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files\\Intel\\iCLS Client\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Skype\\Phone\\;c:\\Program Files (x86)\\Microsoft SQL Server\\110\\Tools\\Binn\\;c:\\Program Files\\Microsoft SQL Server\\110\\Tools\\Binn\\;c:\\Program Files\\Microsoft SQL Server\\110\\DTS\\Binn\\;C:\\Program Files (x86)\\Windows Live\\Shared;C:\\Program Files (x86)\\Windows Kits\\10\\Windows Performance Toolkit\\;C:\\Program Files\\PuTTY\\;C:\\Program Files\\IVI Foundation\\VISA\\Win64\\Bin\\;C:\\Program Files (x86)\\IVI Foundation\\VISA\\WinNT\\Bin\\;C:\\Program Files (x86)\\IVI Foundation\\VISA\\WinNT\\Bin;C:\\Program Files\\dotnet\\;C:\\Program Files\\Microsoft SQL Server\\130\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\170\\Tools\\Binn\\;C:\\Program Files (x86)\\STMicroelectronics\\STM32 ST-LINK Utility\\ST-LINK Utility;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\Git\\cmd;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Cadence\\SPB_16.6\\openaccess\\bin\\win32\\opt;C:\\Cadence\\SPB_16.6\\tools\\capture;C:\\Cadence\\SPB_16.6\\tools\\pspice;C:\\Cadence\\SPB_16.6\\tools\\specctra\\bin;C:\\Cadence\\SPB_16.6\\tools\\fet\\bin;C:\\Cadence\\SPB_16.6\\tools\\libutil\\bin;C:\\Cadence\\SPB_16.6\\tools\\bin;C:\\Cadence\\SPB_16.6\\tools\\pcb\\bin;;C:\\Users\\username\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\username\\AppData\\Local\\Programs\\Microsoft VS Code\\bin",
          "ZEPHYR_BASE": "c:\\nordic\\v1.7.1\\zephyr",
          "GNUARMEMB_TOOLCHAIN_PATH": "c:\\nordic\\v1.7.1\\toolchain\\opt",
          "ZEPHYR_TOOLCHAIN_VARIANT": "gnuarmemb",
          "PYTHONPATH": "c:\\nordic\\v1.7.1\\toolchain\\opt\\bin;c:\\nordic\\v1.7.1\\toolchain\\opt\\bin\\Lib;c:\\nordic\\v1.7.1\\toolchain\\opt\\bin\\Lib\\site-packages",
          "Python3_ROOT": "c:\\nordic\\v1.7.1\\toolchain\\opt\\bin"
        },
        "toolchainPath": "c:\\nordic\\v1.7.1\\toolchain",
        "toolchainBinPath": "c:\\nordic\\v1.7.1\\toolchain\\opt\\bin",
        "toolchainVersion": "1.7.1"
      },
      "terminal": {
        "shell": null,
        "defaultProfile": null
      }
    }

Children
  • Rob, it looks like there is a connection missing between the nRF Conenct SDK from the Toolchain Manager and VS Code:

      "tools": {
        "C:\\Program Files\\SEGGER\\JLink\\JLink.exe": "7.58b",
        "nrfjprog": "Not found",
        "cmake": "Not found",
        "west": "Not found",
        "python": "Not found",
        "ninja": "Not found",
        "gperf": "Not found",
        "dtc": "Not found",
        "gnuarmemb": "Not found",
        "gn": "Not found"
      },

    Are you opening VS Code from the Toolchain Manager? 

Related