Problems building the radio test sample project for nRF5340 and nRF Connect SDK 1.7.1

Hi all,

I'm new to nRF Connect and the associated toolchain, so I apologize in advance if this question is tiresome or has already been answered, but I've not had any luck finding relevant info online.

I'd like to build the radio test sample project for the nRF5340-DK.  I am running VSCode with nRF Connect SDK 1.7.1 under Windows 10. When I've created the project and attempt to build, I get the following in the console. I've highlighted what looks like the central issue to me, but am pasting the entire text in case there are other helpful details here.  Below the transcript from the build attempt, I will also past the output from 'Generate support information.'

Building radio_test2
west build --build-dir c:\nordic\myapps\radio_test2\build c:\nordic\myapps\radio_test2

-- west build: generating a build system
Including boilerplate (Zephyr base (cached)): C:/sandbox/nRF_Connect/v1.7.1/zephyr/cmake/app/boilerplate.cmake
-- Application: C:/nordic/myapps/radio_test2
-- Zephyr version: 2.6.99 (C:/sandbox/nRF_Connect/v1.7.1/zephyr), build: v2.6.99-ncs1-1
-- Found west (found suitable version "0.11.1", minimum required is "0.7.1")
-- Board: nrf5340dk_nrf5340_cpunet
-- Cache files will be written to: C:/sandbox/nRF_Connect/v1.7.1/zephyr/.cache
-- Found dtc: C:/sandbox/nRF_Connect/v1.7.1/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (c:/sandbox/nRF_Connect/v1.7.1/toolchain/opt)
-- Found BOARD.dts: C:/sandbox/nRF_Connect/v1.7.1/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpunet.dts
-- Found devicetree overlay: C:/nordic/myapps/radio_test2/boards/nrf5340dk_nrf5340_cpunet.overlay
-- Generated zephyr.dts: C:/nordic/myapps/radio_test2/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: C:/nordic/myapps/radio_test2/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: C:/nordic/myapps/radio_test2/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: C:/nordic/myapps/radio_test2/build/zephyr/dts.cmake
Parsing C:/nordic/myapps/radio_test2/Kconfig
C:/sandbox/nRF_Connect/v1.7.1/zephyr/scripts/kconfig/kconfig.py: C:\nordic\myapps\radio_test2\Kconfig:10: 'C:/nordic/myapps/radio_test2\../../bluetooth/direct_test_mode/src/fem/Kconfig' not found (in 'rsource "../../bluetooth/direct_test_mode/src/fem/Kconfig"'). Check that environment variables are set correctly (e.g. $srctree, which is set to 'C:/sandbox/nRF_Connect/v1.7.1/zephyr'). Also note that unset environment variables expand to the empty string.
CMake Error at C:\sandbox\nRF_Connect\v1.7.1\zephyr\cmake\kconfig.cmake:268 (message):
command failed with return code: 1
Call Stack (most recent call first):
C:\sandbox\nRF_Connect\v1.7.1\zephyr\cmake\app\boilerplate.cmake:554 (include)
C:\sandbox\nRF_Connect\v1.7.1\zephyr\share\zephyr-package\cmake\ZephyrConfig.cmake:24 (include)
C:\sandbox\nRF_Connect\v1.7.1\zephyr\share\zephyr-package\cmake\ZephyrConfig.cmake:40 (include_boilerplate)
c:\nordic\myapps\radio_test2\build\CMakeLists.txt:9 (find_package)


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: 'c:\sandbox\nRF_Connect\v1.7.1\toolchain\opt\bin\cmake.EXE' '-DWEST_PYTHON=c:\sandbox\nRF_Connect\v1.7.1\toolchain\opt\bin\python.exe' '-Bc:\nordic\myapps\radio_test2\build' '-Sc:\nordic\myapps\radio_test2' -GNinja

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

======================================================================

GENERATE SUPPORT INFORMATION:

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 devzone.nordicsemi.com/.

{
"platform": {
"os": "win32",
"osVersion": "Windows 10 Enterprise",
"osKernel": "10.0.19044",
"vscode": "1.71.0",
"electron": "19.0.12",
"node": "v16.14.2"
},
"system": {
"date": "2022-09-02T20:26:38.979Z",
"vscodeRoot": "c:\\Users\\scase\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app",
"nrfConnectForDesktopInstalled": true,
"vscodeUptime": "00:42:16",
"osUptime": "50:11:43",
"cpu": {
"model": "11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz",
"speed": "2496 MHz",
"count": 8
},
"memory": {
"total": "31.67 GB",
"free": "19.17 GB"
}
},
"workspace": {
"name": "Untitled (Workspace)",
"workspaceFile": "1662147861877",
"folders": [
"c:\\nordic\\myapps\\radio_test2",
"c:\\sandbox\\nRF_Connect\\v1.7.1\\zephyr\\samples\\basic\\blinky"
]
},
"extensions": {
"internal": {
"nordic-semiconductor.nrf-connect": {
"version": "2022.7.242",
"path": "c:\\Users\\scase\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2022.7.242-win32-x64",
"isActive": true
},
"nordic-semiconductor.nrf-terminal": {
"version": "2022.7.21",
"path": "c:\\Users\\scase\\.vscode\\extensions\\nordic-semiconductor.nrf-terminal-2022.7.21",
"isActive": true
},
"nordic-semiconductor.nrf-devicetree": {
"version": "2022.7.36",
"path": "c:\\Users\\scase\\.vscode\\extensions\\nordic-semiconductor.nrf-devicetree-2022.7.36",
"isActive": true
},
"nordic-semiconductor.nrf-kconfig": {
"version": "2022.7.24",
"path": "c:\\Users\\scase\\.vscode\\extensions\\nordic-semiconductor.nrf-kconfig-2022.7.24",
"isActive": true
}
},
"external": {
"marus25.cortex-debug": "1.6.2",
"ms-vscode.cpptools": "1.12.4",
"ms-vscode-remote.remote-wsl-recommender": "0.0.16",
"ms-vscode.js-debug": "1.71.0",
"ms-vscode.js-debug-companion": "1.0.18",
"ms-vscode.vscode-js-profile-table": "1.0.3",
"cschlosser.doxdocgen": "1.4.0",
"franneck94.c-cpp-runner": "4.0.4",
"jeff-hykin.better-cpp-syntax": "1.15.19",
"ms-vscode.cpptools-extension-pack": "1.3.0",
"ms-vscode.cpptools-themes": "1.0.0",
"trond-snekvik.gnu-mapfiles": "1.1.0",
"vadimcn.vscode-lldb": "1.7.4"
}
},
"tools": {
"c:\\sandbox\\nRF_Connect\\v1.7.1\\toolchain\\opt\\bin\\arm-none-eabi-gcc.exe": "9-2019-q4-major",
"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.4",
"nrfutil": "Not found",
"c:\\sandbox\\nRF_Connect\\v1.7.1\\toolchain\\opt\\bin\\cmake.exe": "3.20.5",
"c:\\sandbox\\nRF_Connect\\v1.7.1\\toolchain\\opt\\bin\\Scripts\\west.exe": "0.11.1",
"c:\\sandbox\\nRF_Connect\\v1.7.1\\toolchain\\opt\\bin\\python.exe": "3.8.2",
"c:\\sandbox\\nRF_Connect\\v1.7.1\\toolchain\\opt\\bin\\ninja.exe": "1.9.0",
"c:\\sandbox\\nRF_Connect\\v1.7.1\\toolchain\\opt\\bin\\gperf.exe": "3.1",
"c:\\sandbox\\nRF_Connect\\v1.7.1\\toolchain\\opt\\bin\\dtc.exe": "1.4.7",
"c:\\sandbox\\nRF_Connect\\v1.7.1\\toolchain\\opt\\bin\\gn.exe": "1940",
"c:\\sandbox\\nRF_Connect\\v1.7.1\\toolchain\\mingw64\\bin\\git.exe": "2.26.2.windows.1"
},
"sdks": [
{
"version": "1.7.1",
"path": "c:\\sandbox\\nRF_Connect\\v1.7.1"
},
{
"version": "1.8.0",
"path": "c:\\sandbox\\nRF_Connect\\v1.8.0"
},
{
"version": "1.9.0",
"path": "c:\\sandbox\\nRF_Connect\\v1.9.0"
},
{
"version": "1.9.1",
"path": "c:\\sandbox\\nRF_Connect\\v1.9.1"
}
],
"toolchains": [
{
"version": "1.7.1",
"path": {
"$mid": 1,
"fsPath": "c:\\sandbox\\nRF_Connect\\v1.7.1\\toolchain",
"_sep": 1,
"path": "/C:/sandbox/nRF_Connect/v1.7.1/toolchain",
"scheme": "file"
}
},
{
"version": "1.8.0",
"path": {
"$mid": 1,
"fsPath": "c:\\sandbox\\nRF_Connect\\v1.8.0\\toolchain",
"_sep": 1,
"path": "/C:/sandbox/nRF_Connect/v1.8.0/toolchain",
"scheme": "file"
}
},
{
"version": "1.9.0",
"path": {
"$mid": 1,
"fsPath": "c:\\sandbox\\nRF_Connect\\v1.9.0\\toolchain",
"_sep": 1,
"path": "/C:/sandbox/nRF_Connect/v1.9.0/toolchain",
"scheme": "file"
}
},
{
"version": "1.9.1",
"path": {
"$mid": 1,
"fsPath": "c:\\sandbox\\nRF_Connect\\v1.9.1\\toolchain",
"_sep": 1,
"path": "/C:/sandbox/nRF_Connect/v1.9.1/toolchain",
"scheme": "file"
}
}
],
"connectedDevices": [
{
"serialNumber": "960198321"
}
],
"deviceProviders": [
"nrfjprog"
],
"config": {
"nordic-semiconductor.nrf-connect": {
"topdir": "c:\\sandbox\\nRF_Connect\\v1.7.1",
"toolchain": {
"path": "${nrf-connect.toolchain:1.7.1}"
},
"ozonePath": "",
"applications": [
"c:\\nordic\\myapps\\radio_test2"
],
"applicationOptions": {},
"kconfig": {
"interface": "kconfig"
},
"welcome": {
"showOnStartup": true
},
"west": {
"env": {
"$base": "terminal"
}
},
"boardRoots": [],
"enableTelemetry": false,
"taskBindings": {},
"debugging": {
"backend": "Cortex-Debug"
},
"activeAppFollowActiveEditor": true
},
"nordic-semiconductor.nrf-terminal": {
"terminalMode": "character"
},
"marus25.cortex-debug": {
"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,
"registerUseNaturalFormat": true,
"variableUseNaturalFormat": true,
"dbgServerLogfile": null,
"showRTOS": false,
"showDevDebugOutput": "none"
}
},
"environment": {
"westExe": "west",
"westEnv": {
"ELECTRON_RUN_AS_NODE": "1",
"HOME": "C:\\Users\\scase",
"HOMEDRIVE": "C:",
"HOMEPATH": "\\Users\\scase",
"Path": "c:\\sandbox\\nRF_Connect\\v1.7.1\\toolchain\\mingw64\\bin;c:\\sandbox\\nRF_Connect\\v1.7.1\\toolchain\\mingw64\\libexec\\git-core;c:\\sandbox\\nRF_Connect\\v1.7.1\\toolchain\\opt\\bin;c:\\sandbox\\nRF_Connect\\v1.7.1\\toolchain\\opt\\bin\\Scripts;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files (x86)\\Sennheiser\\SenncomSDK\\;C:\\Program Files (x86)\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files (x86)\\P-CAD 2006 Viewer\\;C:\\Program Files\\PuTTY\\;C:\\Program Files\\Git\\cmd;C:\\Users\\scase\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\scase\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\ProgramData\\SCase\\GitHubDesktop\\bin;C:\\Program Files (x86)\\CVSNT\\;C:\\ProgramData\\scase\\GitHubDesktop\\bin",
"ZEPHYR_BASE": "c:\\sandbox\\nRF_Connect\\v1.7.1\\zephyr",
"GNUARMEMB_TOOLCHAIN_PATH": "c:\\sandbox\\nRF_Connect\\v1.7.1\\toolchain\\opt",
"ZEPHYR_TOOLCHAIN_VARIANT": "gnuarmemb",
"PYTHONPATH": "c:\\sandbox\\nRF_Connect\\v1.7.1\\toolchain\\opt\\bin;c:\\sandbox\\nRF_Connect\\v1.7.1\\toolchain\\opt\\bin\\Lib;c:\\sandbox\\nRF_Connect\\v1.7.1\\toolchain\\opt\\bin\\Lib\\site-packages",
"Python3_ROOT": "c:\\sandbox\\nRF_Connect\\v1.7.1\\toolchain\\opt\\bin"
},
"inherited": {
"ELECTRON_RUN_AS_NODE": "1",
"HOME": "C:\\Users\\scase",
"HOMEDRIVE": "C:",
"HOMEPATH": "\\Users\\scase",
"Path": "C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files (x86)\\Sennheiser\\SenncomSDK\\;C:\\Program Files (x86)\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files (x86)\\P-CAD 2006 Viewer\\;C:\\Program Files\\PuTTY\\;C:\\Program Files\\Git\\cmd;C:\\Users\\scase\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\scase\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\ProgramData\\SCase\\GitHubDesktop\\bin;C:\\Program Files (x86)\\CVSNT\\;C:\\ProgramData\\scase\\GitHubDesktop\\bin",
"PATH": "C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files (x86)\\Sennheiser\\SenncomSDK\\;C:\\Program Files (x86)\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files (x86)\\P-CAD 2006 Viewer\\;C:\\Program Files\\PuTTY\\;C:\\Program Files\\Git\\cmd;C:\\Users\\scase\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\scase\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\ProgramData\\SCase\\GitHubDesktop\\bin;C:\\Program Files (x86)\\CVSNT\\;C:\\ProgramData\\scase\\GitHubDesktop\\bin"
},
"toolchainPath": "c:\\sandbox\\nRF_Connect\\v1.7.1\\toolchain",
"toolchainBinPath": "c:\\sandbox\\nRF_Connect\\v1.7.1\\toolchain\\opt\\bin",
"toolchainVersion": "1.7.1"
},
"terminal": {
"shell": null,
"defaultProfile": null
}
}

Parents
  • I received help from an FAE who was able to identify the source of the problem. It was this:

    I have the nRF Connect SDK in one place, C:\sandbox\nRF_Connect

    My project was located elsewhere, in C:\nordic\MyApps\radio_test4. 

    The problem was that the paths in the sample project were relative to the SDK directory, so trying to build in another folder outside that invalidated these relative path references.

    A quick temporary fix for this was to add the radio test as a new app and walk the SDK through down to its location in the SDK. It took a little fiddling around but using this approach we were able to get a good build.

Reply
  • I received help from an FAE who was able to identify the source of the problem. It was this:

    I have the nRF Connect SDK in one place, C:\sandbox\nRF_Connect

    My project was located elsewhere, in C:\nordic\MyApps\radio_test4. 

    The problem was that the paths in the sample project were relative to the SDK directory, so trying to build in another folder outside that invalidated these relative path references.

    A quick temporary fix for this was to add the radio test as a new app and walk the SDK through down to its location in the SDK. It took a little fiddling around but using this approach we were able to get a good build.

Children
Related