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

Broken Tool Chain - After OS Upgrade

Hi,

I am unable to build code. My Mac has just been updated to Catalina, not sure if that's caused the issue.

I am trying to build the standard "blinky" code but am getting errors.

Watt@Watts-MacBook-Pro-2 blinky % pwd
/Users/Watt/Documents/Switch_That/ZEPHYR_Code/nRF52833/blinky
Watt@Watts-MacBook-Pro-2 blinky % rm -R build
Watt@Watts-MacBook-Pro-2 blinky % mkdir build
Watt@Watts-MacBook-Pro-2 blinky % cd build
Watt@Watts-MacBook-Pro-2 build % cmake -GNinja -DBOARD=nrf52833dk_nrf52833 -DCONF_FILE="prj.conf"  ..
Including boilerplate (Freestanding): /Users/Watt/ncs/zephyr/cmake/app/boilerplate.cmake
-- Application: /Users/Watt/Documents/Switch_That/ZEPHYR_Code/nRF52833/blinky
-- Zephyr version: 2.3.0-rc1 (/Users/Watt/ncs/zephyr)
-- Found Python3: /usr/local/bin/python3.8 (found suitable exact version "3.8.1") found components: Interpreter
-- Board: nrf52833dk_nrf52833
-- Found west: /usr/local/bin/west (found suitable version "0.7.2", minimum required is "0.7.1")
-- Found dtc: /usr/local/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
CMake Error at /Users/Watt/ncs/zephyr/cmake/generic_toolchain.cmake:64 (include):
  include could not find load file:

    /Users/Watt/ncs/zephyr/cmake/toolchain//generic.cmake
Call Stack (most recent call first):
  /Users/Watt/ncs/zephyr/cmake/app/boilerplate.cmake:504 (include)
  /Users/Watt/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
  /Users/Watt/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:102 (include_boilerplate)
  CMakeLists.txt:4 (find_package)


-- Found BOARD.dts: /Users/Watt/ncs/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833.dts
-- Found devicetree overlay: /Users/Watt/Documents/Switch_That/ZEPHYR_Code/nRF52833/blinky/nrf52833dk_nrf52833.overlay
CMake Error at /Users/Watt/ncs/zephyr/cmake/dts.cmake:146 (message):
  command failed with return code: No such file or directory
Call Stack (most recent call first):
  /Users/Watt/ncs/zephyr/cmake/app/boilerplate.cmake:505 (include)
  /Users/Watt/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
  /Users/Watt/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:102 (include_boilerplate)
  CMakeLists.txt:4 (find_package)


-- Configuring incomplete, errors occurred!
Watt@Watts-MacBook-Pro-2 build %

It looked as though something was broken, so I recreated my ncs directory as below.

cd ~

mkdir ncs && cd ncs

west init -m https://github.com/nrfconnect/sdk-nrf --mr v1.3.0

west update

west zephyr-export

pip3 install -r zephyr/scripts/requirements.txt
pip3 install -r nrf/scripts/requirements.txt
pip3 install -r bootloader/mcuboot/scripts/requirements.txt

Still getting the same error.

Would appreciate your thoughts

Regards,

Rod

  • Hi Simon,

    I have compared my PATH on the two terminals and have updated the following

    GNUARMEMB_TOOLCHAIN_PATH=/opt/nordic/ncs/v1.3.1/toolchain

    So, all working now!

    The Toolchain manager has made it a lot easier. 

    Thanks for your help

    Rod

  • I had exactly the same problems as Rod did (broken toolchain manager, installed manually, same cmake error). The error seems to indicate that cmake doesn't "know" about the specific toolchain being used (note the double slash in "ncs/zephyr/cmake/toolchain//generic.cmake").


    I did add GNUARMEMB_TOOLCHAIN_PATH to my environment, but that didn't change anything. 

    [20:22] jwr-macbook-pro:/Users/jwr/nordic/ncs/nrf/samples/bluetooth/peripheral_lbs>west build -b nrf52dk_nrf52832 
    -- west build: generating a build system
    Including boilerplate (Zephyr base): /Users/jwr/nordic/ncs/zephyr/cmake/app/boilerplate.cmake
    -- Application: /Users/jwr/nordic/ncs/nrf/samples/bluetooth/peripheral_lbs
    -- Zephyr version: 2.3.0-rc1 (/Users/jwr/nordic/ncs/zephyr)
    -- Found Python3: /usr/local/bin/python3.8 (found suitable exact version "3.8.6") found components: Interpreter 
    -- Board: nrf52dk_nrf52832
    -- Found west: /usr/local/bin/west (found suitable version "0.8.0", minimum required is "0.7.1")
    -- Found dtc: /usr/local/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
    CMake Error at /Users/jwr/nordic/ncs/zephyr/cmake/generic_toolchain.cmake:64 (include):
      include could not find load file:
    
        /Users/jwr/nordic/ncs/zephyr/cmake/toolchain//generic.cmake
    Call Stack (most recent call first):
      /Users/jwr/nordic/ncs/zephyr/cmake/app/boilerplate.cmake:504 (include)
      /Users/jwr/nordic/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
      /Users/jwr/nordic/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
      CMakeLists.txt:8 (find_package)
    
    
    -- Found BOARD.dts: /Users/jwr/nordic/ncs/zephyr/boards/arm/nrf52dk_nrf52832/nrf52dk_nrf52832.dts
    CMake Error at /Users/jwr/nordic/ncs/zephyr/cmake/dts.cmake:146 (message):
      command failed with return code: No such file or directory
    Call Stack (most recent call first):
      /Users/jwr/nordic/ncs/zephyr/cmake/app/boilerplate.cmake:505 (include)
      /Users/jwr/nordic/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
      /Users/jwr/nordic/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: /usr/local/bin/cmake -B/Users/jwr/nordic/ncs/nrf/samples/bluetooth/peripheral_lbs/build -S/Users/jwr/nordic/ncs/nrf/samples/bluetooth/peripheral_lbs -GNinja -DBOARD=nrf52dk_nrf52832
    [20:22] jwr-macbook-pro:/Users/jwr/nordic/ncs/nrf/samples/bluetooth/peripheral_lbs>
    

  • Replying to myself — what was missing was a "setenv ZEPHYR_TOOLCHAIN_VARIANT gnuarmemb" in my ~/.cshrc.

Related