This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NCS Getting Started Assistant Install using Toolchain Manager Tools

Hello,

I recently cloned NCS v1.5.0-rc1 using west init -m https://github.com/nrfconnect/sdk-nrf.git followed by git checkout v1.5.0-rc1 and then west update in the nrf folder. This was following all of the steps in the getting started assistant. 

I also upgraded my west to v0.9.0 as you can see in the command prompt logs below but for some reason when I build it is using the "NCS Toolchain 1.4.0" from my toolchain manager install of NCS v1.4.0 (this is doubly odd because I have newer versions (1.4.99-dev1 and 1.5.0-rc1) of NCS installed through Toolchain Manager and it still using v1.4.0). Because it is doing this, it is finding west v0.7.2 which is incompatible with NCS v1.5.0. I am doing this from a standard command prompt and not the command prompt from Toolchain Manager. I also cloned NCS v1.5.0-rc1 from Toolchain Manager and when opening a command prompt from there to build an example, it works fine.

Here are my environment variables:

C:\Users\Akash>env
!::=::\
!C:=C:\Users\Akash
ACP_HOME=C:\ACP
ALLUSERSPROFILE=C:\ProgramData
ANDROID_HOME=C:\ACP
APPDATA=C:\Users\Akash\AppData\Roaming
asl.log=Destination=file
ChocolateyInstall=C:\ProgramData\chocolatey
ChocolateyLastPathUpdate=132187932526687757
COMMONPROGRAMFILES=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=AKPA
COMSPEC=C:\WINDOWS\system32\cmd.exe
DriverData=C:\Windows\System32\Drivers\DriverData
GNUARMEMB_TOOLCHAIN_PATH=c:\gnuarmemb
GOPATH=C:\Users\Akash\go
GTK_BASEPATH=C:\GTK
HOMEDRIVE=C:
HOMEPATH=\Users\Akash
LOCALAPPDATA=C:\Users\Akash\AppData\Local
LOGONSERVER=\\AKPA
MOSQUITTO_DIR=C:\Program Files\mosquitto
NRFGOSTUDIOPATH=C:\Program Files (x86)\Nordic Semiconductor\nRFgo Studio
NUMBER_OF_PROCESSORS=8
OneDrive=C:\Users\Akash\OneDrive - Nordic Semiconductor
OneDriveCommercial=C:\Users\Akash\OneDrive - Nordic Semiconductor
OneDriveConsumer=C:\Users\Akash\OneDrive
OPENSSL_CONF=C:\OpenSSL-Win32\bin\openssl.cfg
OS=Windows_NT
PANGO_WIN32_NO_UNISCRIBE=anything
PATH=/cygdrive/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/cygdrive/c/Python37/Scripts:/cygdrive/c/Python37:/cygdrive/c/Python27:/cygdrive/c/Python27/Scripts:/cygdrive/c/GTK/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/usr/bin:/cygdrive/c/WINDOWS/System32/OpenSSH:/cygdrive/c/ProgramData/chocolatey/bin:/cygdrive/c/Program Files/Git/cmd:/cygdrive/c/Program Files/doxygen/bin:/cygdrive/c/Program Files/PuTTY:/cygdrive/c/Program Files (x86)/SEGGER/JLink:/cygdrive/c/Program Files/CMake/bin:/cygdrive/c/Users/Akash/Documents/Nordic/pc-ble-driver-master/vcpkg:/cygdrive/c/Program Files/Zerynth/ztc/windows64:/cygdrive/c/MinGW/bin:/cygdrive/c/Program Files/mosquitto:/cygdrive/c/Program Files/nodejs:/cygdrive/c/Program Files/MATLAB/R2020b/bin:/cygdrive/c/Program Files/Intel/WiFi/bin:/cygdrive/c/Program Files/Common Files/Intel/WirelessCommon:/cygdrive/c/Go/bin:/cygdrive/c/Program Files (x86)/Webex/Plugins:/cygdrive/c/Program Files/otii:/cygdrive/c/Program Files/Wireshark:/cygdrive/c/Program Files/Nordic Semiconductor/nrf-command-line-tools/bin:/cygdrive/c/gnuarmemb/bin:/cygdrive/c/Program Files (x86)/GNU Tools ARM Embedded/6 2017-q2-update/bin:/cygdrive/c/Users/Akash/AppData/Local/Microsoft/WindowsApps:/cygdrive/c/Program Files/Intel/WiFi/bin:/cygdrive/c/Program Files/Common Files/Intel/WirelessCommon:/cygdrive/c/Python37:/cygdrive/c/Python37/Scripts:/cygdrive/c/Python27:/cygdrive/c/Python27/Scripts:/cygdrive/c/MinGW/bin:/cygdrive/c/Users/Akash/AppData/Local/GitHubDesktop/bin:/cygdrive/c/Users/Akash/AppData/Roaming/npm:/cygdrive/c/Program Files/nodejs:/cygdrive/c/Users/Akash/AppData/Local/Microsoft/WindowsApps:/cygdrive/c/Users/Akash/Documents/Customer/Google/pc-ble-driver/vcpkg:/cygdrive/c/Users/Akash/go/bin:/cygdrive/c/Users/Akash/AppData/Local/Programs/Microsoft VS Code/bin:/cygdrive/c/Users/Akash/AppData/Local/particle/bin:/cygdrive/c/OpenSSL-Win32/bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 142 Stepping 10, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=8e0a
ProgramData=C:\ProgramData
PROGRAMFILES=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
PUBLIC=C:\Users\Public
RTOOLS40_HOME=C:\rtools40
SESSIONNAME=Console
snow_agent=C:\Program Files\Snow Software\Inventory\Agent
SYSTEMDRIVE=C:
SYSTEMROOT=C:\WINDOWS
TEMP=/cygdrive/c/Users/Akash/AppData/Local/Temp
TMP=/cygdrive/c/Users/Akash/AppData/Local/Temp
UATDATA=C:\WINDOWS\CCM\UATData\D9F8C395-CAB8-491d-B8AC-179A1FE1BE77
USERDOMAIN=AKPA
USERDOMAIN_ROAMINGPROFILE=AKPA
USERNAME=Akash
USERPROFILE=C:\Users\Akash
VBOX_MSI_INSTALL_PATH=C:\Program Files\Oracle\VirtualBox\
VCPKG_ROOT=C:\Users\Akash\Documents\Customer\Google\pc-ble-driver\vcpkg
WINDIR=C:\WINDOWS
ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
TERM=xterm-256color
HOME=/home/Akash

west version and error when trying to build with west:

C:\Nordic_SDK\ncs_1_5_0\ncs\nrf\samples\bluetooth\peripheral_uart>west -V
West version: v0.9.0

C:\Nordic_SDK\ncs_1_5_0\ncs\nrf\samples\bluetooth\peripheral_uart>west build -b nrf52840dk_nrf52840 -p
-- west build: making build dir C:\Nordic_SDK\ncs_1_5_0\ncs\nrf\samples\bluetooth\peripheral_uart\build pristine
-- west build: generating a build system
Including boilerplate (Zephyr base): C:/Nordic_SDK/ncs_1_5_0/ncs/zephyr/cmake/app/boilerplate.cmake
-- Application: C:/Nordic_SDK/ncs_1_5_0/ncs/nrf/samples/bluetooth/peripheral_uart
-- Using NCS Toolchain 1.4.0 for building. (C:/Users/Akash/Downloads/ncs/v1.4.0/toolchain/cmake)
-- Zephyr version: 2.4.99 (C:/Nordic_SDK/ncs_1_5_0/ncs/zephyr)
-- Found Python3: C:/Users/Akash/Downloads/ncs/v1.4.0/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components:  Interpreter
-- Found west (found suitable version "0.7.2", minimum required is "0.7.1")
WARNING: west v0.9 or later is required by the manifest
  West version: v0.7.2
  Manifest file: C:\Nordic_SDK\ncs_1_5_0\ncs\nrf\west.yml
  This should work, but most commands won't.
  To silence this warning, upgrade west.
CMake Error at C:/Nordic_SDK/ncs_1_5_0/ncs/zephyr/cmake/zephyr_module.cmake:61 (message):
  Traceback (most recent call last):

    File "C:\Users\Akash\Downloads\ncs\v1.4.0\toolchain\opt\bin\Lib\site-packages\west\manifest.py", line 386, in __init__
      validate(source_data)
    File "C:\Users\Akash\Downloads\ncs\v1.4.0\toolchain\opt\bin\Lib\site-packages\west\manifest.py", line 114, in validate
      raise ManifestVersionError(min_version)

  west.manifest.ManifestVersionError: 0.9



  The above exception was the direct cause of the following exception:



  Traceback (most recent call last):

    File "C:/Nordic_SDK/ncs_1_5_0/ncs/zephyr/scripts/zephyr_module.py", line 378, in <module>
      main()
    File "C:/Nordic_SDK/ncs_1_5_0/ncs/zephyr/scripts/zephyr_module.py", line 283, in main
      manifest = Manifest.from_file()
    File "C:\Users\Akash\Downloads\ncs\v1.4.0\toolchain\opt\bin\Lib\site-packages\west\manifest.py", line 252, in from_file
      return Manifest(**kwargs)
    File "C:\Users\Akash\Downloads\ncs\v1.4.0\toolchain\opt\bin\Lib\site-packages\west\manifest.py", line 388, in __init__
      raise ManifestVersionError(mv.version, file=source_file) from mv

  west.manifest.ManifestVersionError: 0.9

Call Stack (most recent call first):
  C:/Nordic_SDK/ncs_1_5_0/ncs/zephyr/cmake/app/boilerplate.cmake:183 (include)
  C:/Nordic_SDK/ncs_1_5_0/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
  C:/Nordic_SDK/ncs_1_5_0/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
  CMakeLists.txt:8 (find_package)


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: 'C:\Program Files\CMake\bin\cmake.EXE' '-DWEST_PYTHON=c:\python37\python.exe' '-BC:\Nordic_SDK\ncs_1_5_0\ncs\nrf\samples\bluetooth\peripheral_uart\build' '-SC:\Nordic_SDK\ncs_1_5_0\ncs\nrf\samples\bluetooth\peripheral_uart' -GNinja -DBOARD=nrf52840dk_nrf52840

Let me know if there is any other data or information that I can provide.

Regards,

Akash Patel

Parents Reply Children
  • After discussing this issue with our developers, we have found the issue.

    To make it easier to use the toolchain from the Toolchain Manager (TM), the installed toolchain gets registered in the CMake package registry.

    This will allow you to use the Segger Embedded Studio Nordic Edition (SES-NE) without opening it from the TM, but instead by e.g. pinning it to the taskbar.

    When using SES-NE, you can select the right toolchain when you open a new NCS project.

    If you are using West, you can select the toolchain version by adding an argument to CMake, e.g. west build ... -- -DNCS_TOOLCHAIN_VERSION=1.5.0. You can also set the toolchain version to NONE, if you want to use manually-installed tools.

    If there is a compatible NCS toolchain, the default behavior is that West will use that, rather than manually installed tools.

    This normally works without issues, but with NCS 1.5.0, the requirements to the toolchain has changed. However, the minimum required NCS toolchain version was not updated in the build system. This caused West to believe that an incompatible toolchain would work, which is what caused the error.

    The toolchain requirement has now been updated (PR #4002), but it is not part of the rc1 tag. You should therefore not encounter this build problem when the 1.5.0 release is done.

    There is currently no simple way of changing this default behavior, but we are looking into ways of improving it.

    Currenty. the workarounds are to uninstall the NCS toolchains, or rename the folders.

Related