Compiling Central_UART won't work

Current Setup:
nRF Connect for Desktop v4.1.2
Toolchain Manager v1.2.4
nRF Connect for VS Code v2023.2.56

After numerous reinstalling nrfConnect for vscode, nrfConnectDesktop, Toolchain & CMake I can compile and run (with no red warning "#include" squiggles): blinky, helloworld, ICM42605. I'm confident others would work too.

Except Central_UART won't compile...Below is my output. I can see that there are problems, but I am unsure why there are problems and/or how to fix them... I assume it's something specifically related to BLE that I is misconfigured/missing?

UPDATE: I created a new Central_UART as a Workspace Application Type, instead of Freestanding, and it compiled correctly. I attached images below of the Workspace version in case it helps to indicate why the Freestanding version isn't working.

Is there a problem using Workspace instead of Freestanding? Eventually I would like to combine SPI (IMU42605) and BLE (Central_UART) into one application. 

---

* Executing task: nRF Connect: Generate config nrf52840dk_nrf52840 for c:\nordic\myApps\central_uart

Building central_uart
west build --build-dir c:\nordic\myApps\central_uart\build c:\nordic\myApps\central_uart --pristine --board nrf52840dk_nrf52840 -- -DNCS_TOOLCHAIN_VERSION:STRING="NONE"

-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: C:/nordic/myApps/central_uart
-- CMake version: 3.20.5
-- Found Python3: C:/ncs/toolchains/31f4403e35/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
-- Cache files will be written to: C:/ncs/v2.4.1/zephyr/.cache
-- Zephyr version: 3.3.99 (C:/ncs/v2.4.1/zephyr)
-- Found west (found suitable version "1.0.0", minimum required is "0.7.1")
-- Board: nrf52840dk_nrf52840
-- Found host-tools: zephyr 0.16.0 (C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.16.0 (C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
-- Found Dtc: C:/ncs/toolchains/31f4403e35/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found BOARD.dts: C:/ncs/v2.4.1/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
-- Generated zephyr.dts: C:/nordic/myApps/central_uart/build/zephyr/zephyr.dts
-- Generated devicetree_generated.h: C:/nordic/myApps/central_uart/build/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: C:/nordic/myApps/central_uart/build/zephyr/dts.cmake

C:/nordic/myApps/central_uart/prj.conf:21: warning: attempt to assign the value 'y' to the undefined symbol BT_NUS_CLIENT

C:/nordic/myApps/central_uart/prj.conf:22: warning: attempt to assign the value 'y' to the undefined symbol BT_SCAN

C:/nordic/myApps/central_uart/prj.conf:23: warning: attempt to assign the value 'y' to the undefined symbol BT_SCAN_FILTER_ENABLE

C:/nordic/myApps/central_uart/prj.conf:24: warning: attempt to assign the value '1' to the undefined symbol BT_SCAN_UUID_CNT

C:/nordic/myApps/central_uart/prj.conf:25: warning: attempt to assign the value 'y' to the undefined symbol BT_GATT_DM

error: Aborting due to Kconfig warnings

Parsing C:/ncs/v2.4.1/zephyr/Kconfig
Loaded configuration 'C:/ncs/v2.4.1/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig'
Merged configuration 'C:/nordic/myApps/central_uart/prj.conf'
CMake Error at C:/ncs/v2.4.1/zephyr/cmake/modules/kconfig.cmake:339 (message):
command failed with return code: 1
Call Stack (most recent call first):
C:/ncs/v2.4.1/nrf/cmake/modules/kconfig.cmake:29 (include)
C:/ncs/v2.4.1/zephyr/cmake/modules/zephyr_default.cmake:115 (include)
C:/ncs/v2.4.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
C:/ncs/v2.4.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
CMakeLists.txt:8 (find_package)


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: 'c:\ncs\toolchains\31f4403e35\opt\bin\cmake.EXE' -DWEST_PYTHON=c:/ncs/toolchains/31f4403e35/opt/bin/python.exe '-Bc:\nordic\myApps\central_uart\build' -GNinja -DBOARD=nrf52840dk_nrf52840 -DNCS_TOOLCHAIN_VERSION:STRING=NONE '-Sc:\nordic\myApps\central_uart'

* The terminal process terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.

Workspace Version:

Parents Reply Children
  • I would be happy to do that, but I am unfamiliar with West. If there is a command you would like me to run just and you can post it for me I will run it.

    Here is general support info in case it is useful:

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

    {
      "platform": {
        "os": "win32",
        "osVersion": "Windows 10 Home",
        "osKernel": "10.0.22621",
        "vscode": "1.81.1",
        "electron": "22.3.18",
        "node": "v16.17.1"
      },
      "system": {
        "date": "2023-08-31T12:43:06.458Z",
        "vscodeRoot": "c:\\Users\\mej\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app",
        "nrfConnectForDesktopInstalled": true,
        "vscodeUptime": "00:00:10",
        "osUptime": "17:55:53",
        "cpu": {
          "model": "11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz",
          "speed": "2803 MHz",
          "count": 4
        },
        "memory": {
          "total": "15.68 GB",
          "free": "5.73 GB"
        }
      },
      "workspace": {
        "name": "Untitled (Workspace)",
        "workspaceFile": "1693430273146",
        "folders": [
          "c:\\nordic\\myApps\\central_hr"
        ]
      },
      "extensions": {
        "internal": {
          "nordic-semiconductor.nrf-connect": {
            "version": "2023.2.56",
            "path": "c:\\Users\\mej\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2023.2.56-win32-x64",
            "isActive": true
          },
          "nordic-semiconductor.nrf-terminal": {
            "version": "2023.7.47",
            "path": "c:\\Users\\mej\\.vscode\\extensions\\nordic-semiconductor.nrf-terminal-2023.7.47",
            "isActive": true
          },
          "nordic-semiconductor.nrf-devicetree": {
            "version": "2023.7.56",
            "path": "c:\\Users\\mej\\.vscode\\extensions\\nordic-semiconductor.nrf-devicetree-2023.7.56",
            "isActive": true
          },
          "nordic-semiconductor.nrf-kconfig": {
            "version": "2023.6.51",
            "path": "c:\\Users\\mej\\.vscode\\extensions\\nordic-semiconductor.nrf-kconfig-2023.6.51",
            "isActive": true
          }
        },
        "external": {
          "marus25.cortex-debug": "1.12.0",
          "ms-vscode.cpptools": "1.17.5",
          "ms-vscode-remote.remote-wsl-recommender": "0.0.19",
          "ms-vscode.js-debug": "1.81.0",
          "ms-vscode.js-debug-companion": "1.1.2",
          "ms-vscode.vscode-js-profile-table": "1.0.3",
          "cschlosser.doxdocgen": "1.4.0",
          "Dart-Code.dart-code": "3.70.0",
          "Dart-Code.flutter": "3.70.0",
          "emmanuelbeziat.vscode-great-icons": "2.1.97",
          "FernandoKuteken.verbatim-tools": "0.0.1",
          "jeff-hykin.better-cpp-syntax": "1.17.2",
          "mcu-debug.debug-tracker-vscode": "0.0.15",
          "mcu-debug.memory-view": "0.0.23",
          "mcu-debug.peripheral-viewer": "1.4.6",
          "mcu-debug.rtos-views": "0.0.7",
          "mrverdant13.esp32-pm": "0.1.0",
          "ms-dotnettools.csharp": "2.0.436",
          "ms-dotnettools.vscode-dotnet-runtime": "1.7.2",
          "ms-python.isort": "2023.10.1",
          "ms-python.python": "2023.14.0",
          "ms-python.vscode-pylance": "2023.8.50",
          "ms-toolsai.jupyter": "2023.7.1002162226",
          "ms-toolsai.jupyter-keymap": "1.1.2",
          "ms-toolsai.jupyter-renderers": "1.0.17",
          "ms-toolsai.vscode-jupyter-cell-tags": "0.1.8",
          "ms-toolsai.vscode-jupyter-slideshow": "0.1.5",
          "ms-vscode.cpptools-extension-pack": "1.3.0",
          "ms-vscode.cpptools-themes": "2.0.0",
          "ms-vscode.vscode-serial-monitor": "0.10.0",
          "trond-snekvik.gnu-mapfiles": "1.1.0",
          "twxs.cmake": "0.0.17",
          "vsciot-vscode.vscode-arduino": "0.6.0",
          "vscjava.vscode-gradle": "3.12.7"
        }
      },
      "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.88j",
        "C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\nrfjprog.exe": "10.23.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.1",
          "path": "c:\\ncs\\v2.4.1"
        }
      ],
      "toolchains": [
        {
          "version": "2.4.0",
          "path": "c:\\ncs\\toolchains\\31f4403e35"
        }
      ],
      "connectedDevices": [],
      "deviceProviders": [
        "nrfjprog"
      ],
      "config": {
        "nordic-semiconductor.nrf-connect": {
          "topdir": "${nrf-connect.sdk:2.4.1}",
          "toolchain": {
            "path": "${nrf-connect.toolchain:2.4.0}"
          },
          "ozonePath": "",
          "applications": [],
          "applicationOptions": {},
          "kconfig": {
            "interface": "kconfig",
            "executeInDefaultShell": false
          },
          "welcome": {
            "showOnStartup": false
          },
          "west": {
            "env": {
              "$base": "terminal"
            }
          },
          "boardRoots": [],
          "enableTelemetry": false,
          "taskBindings": {},
          "debugging": {
            "backend": "nRF Debug",
            "flash": true,
            "bindings": {}
          },
          "activeAppFollowActiveEditor": true
        },
        "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\\mej",
          "HOMEDRIVE": "C:",
          "HOMEPATH": "\\Users\\mej",
          "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)\\NVIDIA Corporation\\PhysX\\Common;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\Microchip\\xc8\\v2.41\\bin;C:\\Program Files\\Microchip\\xc32\\v4.21\\bin;C:\\Program Files (x86)\\Windows Kits\\8.1\\Windows Performance Toolkit\\;C:\\Program Files\\dotnet\\;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files\\CMake\\bin;C:\\Users\\mej\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\mej\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\mej\\AppData\\Local\\Programs\\Git\\cmd;C:\\Program Files\\CMake\\bin;",
          "ZEPHYR_BASE": "c:\\ncs\\v2.4.1\\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\\mej",
          "HOMEDRIVE": "C:",
          "HOMEPATH": "\\Users\\mej",
          "Path": "C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\Microchip\\xc8\\v2.41\\bin;C:\\Program Files\\Microchip\\xc32\\v4.21\\bin;C:\\Program Files (x86)\\Windows Kits\\8.1\\Windows Performance Toolkit\\;C:\\Program Files\\dotnet\\;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files\\CMake\\bin;C:\\Users\\mej\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\mej\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\mej\\AppData\\Local\\Programs\\Git\\cmd;C:\\Program Files\\CMake\\bin;",
          "PATH": "C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\Microchip\\xc8\\v2.41\\bin;C:\\Program Files\\Microchip\\xc32\\v4.21\\bin;C:\\Program Files (x86)\\Windows Kits\\8.1\\Windows Performance Toolkit\\;C:\\Program Files\\dotnet\\;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files\\CMake\\bin;C:\\Users\\mej\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\mej\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\mej\\AppData\\Local\\Programs\\Git\\cmd;C:\\Program Files\\CMake\\bin;"
        },
        "toolchainPath": "c:\\ncs\\toolchains\\31f4403e35",
        "toolchainBinPath": "c:\\ncs\\toolchains\\31f4403e35\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin",
        "toolchainVersion": "2.4.0"
      },
      "terminal": {
        "defaultProfile": null
      }
    }



  • I think this is what you were looking for?

    PS C:\nordic\myApps\central_uart3> west build -b nrf52dk_nrf52832 -d build1


    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/nordic/myApps/central_uart3
    -- CMake version: 3.20.5
    -- Using NCS Toolchain 2.4.0 for building. (C:/ncs/toolchains/31f4403e35/cmake)
    -- Found Python3: C:/ncs/toolchains/31f4403e35/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
    -- Cache files will be written to: C:/ncs/v2.4.1/zephyr/.cache
    -- Zephyr version: 3.3.99 (C:/ncs/v2.4.1/zephyr)
    -- Found west (found suitable version "1.0.0", minimum required is "0.7.1")
    -- Board: nrf52dk_nrf52832
    -- Found host-tools: zephyr 0.16.0 (C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.0 (C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/31f4403e35/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found BOARD.dts: C:/ncs/v2.4.1/zephyr/boards/arm/nrf52dk_nrf52832/nrf52dk_nrf52832.dts
    -- Generated zephyr.dts: C:/nordic/myApps/central_uart3/build1/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/nordic/myApps/central_uart3/build1/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: C:/nordic/myApps/central_uart3/build1/zephyr/dts.cmake
    Parsing C:/ncs/v2.4.1/zephyr/Kconfig
    Loaded configuration 'C:/ncs/v2.4.1/zephyr/boards/arm/nrf52dk_nrf52832/nrf52dk_nrf52832_defconfig'
    Merged configuration 'C:/nordic/myApps/central_uart3/prj.conf'

    C:/nordic/myApps/central_uart3/prj.conf:21: warning: attempt to assign the value 'y' to the undefined symbol BT_NUS_CLIENT

    C:/nordic/myApps/central_uart3/prj.conf:22: warning: attempt to assign the value 'y' to the undefined symbol BT_SCAN

    C:/nordic/myApps/central_uart3/prj.conf:23: warning: attempt to assign the value 'y' to the undefined symbol BT_SCAN_FILTER_ENABLE

    C:/nordic/myApps/central_uart3/prj.conf:24: warning: attempt to assign the value '1' to the undefined symbol BT_SCAN_UUID_CNT

    C:/nordic/myApps/central_uart3/prj.conf:25: warning: attempt to assign the value 'y' to the undefined symbol BT_GATT_DM

    error: Aborting due to Kconfig warnings

    CMake Error at C:/ncs/v2.4.1/zephyr/cmake/modules/kconfig.cmake:339 (message):
    command failed with return code: 1
    Call Stack (most recent call first):
    C:/ncs/v2.4.1/nrf/cmake/modules/kconfig.cmake:29 (include)
    C:/ncs/v2.4.1/zephyr/cmake/modules/zephyr_default.cmake:115 (include)
    C:/ncs/v2.4.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
    C:/ncs/v2.4.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
    CMakeLists.txt:8 (find_package)


    -- Configuring incomplete, errors occurred!
    ←[91mFATAL ERROR: command exited with status 1: 'c:\ncs\toolchains\31f4403e35\opt\bin\cmake.EXE' -DWEST_PYTHON=c:/ncs/toolchains/31f4403e35/opt/bin/python.exe '-BC:\nordic\myApps\central_uart3\build1' -GNinja -DBOARD=nrf52dk_nrf52832 '-SC:\nordic\myApps\central_uart3'
    ←[0m
    PS C:\nordic\myApps\central_uart3>

Related