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

install and build asset tracker on Mac OS Catalina

OS: Mac OS Catalina

I installed build tools,nrf connect sdk, sesames, tool chain by following the instructions mentioned in "Getting started assistant" of nRF connect 3.6.0. I am using SDK 1.4.0

I start SES, Open nRF Connect SDK project and select 1.4.0 for SDK (and NONE (use SES settings/environment PATH for tool chain version given that's the only choice I am given)

Projects: asset_tracker

Board name: thingy91_nrf9160ns

Extra Cake build options: -DWEST=/Users/sshenoy105/Library/Python/3.8/bin/west 

Clean build directory is checked..

and I get the following error: "create_nordic_project.py failed(1)

The SES console has the following:
Kconfig header saved to '/Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/zephyr/include/generated/autoconf.h'

-- The C compiler identification is GNU 8.3.1
-- The CXX compiler identification is GNU 8.3.1
-- The ASM compiler identification is GNU
-- Found assembler: /opt/gnuarmemb/bin/arm-none-eabi-gcc
-- Configuring incomplete, errors occurred!
See also "/Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/CMakeFiles/CMakeOutput.log".
See also "/Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/CMakeFiles/CMakeError.log".
Including boilerplate (Zephyr base): /Users/sshenoy105/Documents/code/ncs/zephyr/cmake/app/boilerplate.cmake
thingy91_nrf9160ns.dts.pre.tmp:357.32-361.5: Warning (simple_bus_reg): /soc/cryptocell-sw: missing or empty reg/ranges property
thingy91_nrf9160ns.dts.pre.tmp:56.42-68.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@40000000/flash-controller@39000: duplicate unit-address (also used in node /soc/peripheral@40000000/kmu@39000)
thingy91_nrf9160ns.dts.pre.tmp:305.19-311.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@40000000/clock@5000: duplicate unit-address (also used in node /soc/peripheral@40000000/power@5000)
CMake Error at /Users/sshenoy105/Documents/code/ncs/zephyr/cmake/extensions.cmake:1557 (message):
  Assertion failed: The toolchain is unable to build a dummy C file.  See
  CMakeError.log.
Call Stack (most recent call first):
  /Users/sshenoy105/Documents/code/ncs/zephyr/CMakeLists.txt:42 (assert)

error: cmake failed
create_nordic_project.py failed (1)


CMakeError.log has the following:

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /opt/gnuarmemb/bin/arm-none-eabi-g++
Build flags:
Id flags:

The output was:
1
/opt/gnuarmemb/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /opt/gnuarmemb/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-exit.o): in function `exit':
exit.c:(.text.exit+0x2c): undefined reference to `_exit'
collect2: error: ld returned 1 exit status

I have already tried
  • Run xattr -r -d com.apple.quarantine /path/to/folder where path/to/folder is the path to the enclosing folder where the executables you want to run are located.

  • Open “System Preferences” -> “Security and Privacy” -> “Privacy” and then scroll down to “Developer Tools”. Then unlock the lock to be able to make changes and check the checkbox corresponding to your terminal emulator of choice. This will apply to any executable being launched from such terminal program.

I have been asked to "try" Tool chai manager but it has a not-so-encouraging note right at the top that says "experimental" and I am wondering if getting started can't get me going, will this experimental procesdue do any better..

any help, pointers, will be greatly appreciated

Parents
  • Hi! 

    I'm looking at your case and are trying to test it out here. Will update you on how that goes tomorrow.

    In the meantime, how did you call the xattr command (i.e. which folder did you target). I had to do like this xattr -r -d com.apple.quarantine ~/gnuarmemb/*.

    Best regards,
    Carl Richard

  • good question.. just to be sure I now tried xattr -r -d com.apple.quarantine /opt/gnuarmemb/*  but it made no difference

  • restarting the Mac (shutting down and then starting had no effect on the result

  • Hi!

    I think I've managed to reproduce the issue, and find a fix! Could you run the following command:

    ls -l /usr/local/bin/ninja

    And report the result to me?

    Depending on the result you can the following chain of commands:

    chmod 755 /usr/local/bin/ninja/
    rm -r ~/Library/Caches/zephyr

    And then try to reopen a project in SES, with a clean directory.

    Best regards,
    Carl Richard

  • sshenoy105@MacBook-Pro ncs % ls -l /usr/local/bin/ninja
    lrwxr-xr-x  1 sshenoy105  admin  34 Nov 14 12:21 /usr/local/bin/ninja -> ../Cellar/ninja/1.10.1_3/bin/ninja

    sshenoy105@MacBook-Pro ncs % chmod 755 /usr/local/bin/ninja

    sshenoy105@MacBook-Pro ncs % ls -l /usr/local/bin/ninja    lrwxr-xr-x  1 sshenoy105  admin  34 Nov 14 12:21 /usr/local/bin/ninja -> ../Cellar/ninja/1.10.1_3/bin/ninja

    sshenoy105@MacBook-Pro ncs % rm -r ~/Library/Caches/zephyr

    result after opening the project.. I am assuming you meant "check the box for Clean Build directory" when you said clean directory.. If not, please clarify

    Merged configuration '/Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/spm/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to '/Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/spm/zephyr/.config'
    Kconfig header saved to '/Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/spm/zephyr/include/generated/autoconf.h'
    -- Configuring incomplete, errors occurred!
    See also "/Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/spm/CMakeFiles/CMakeOutput.log".
    -- Configuring incomplete, errors occurred!
    See also "/Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/CMakeFiles/CMakeOutput.log".
    See also "/Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/CMakeFiles/CMakeError.log".
    Including boilerplate (Zephyr base): /Users/sshenoy105/Documents/code/ncs/zephyr/cmake/app/boilerplate.cmake
    thingy91_nrf9160ns.dts.pre.tmp:357.32-361.5: Warning (simple_bus_reg): /soc/cryptocell-sw: missing or empty reg/ranges property
    thingy91_nrf9160ns.dts.pre.tmp:56.42-68.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@40000000/flash-controller@39000: duplicate unit-address (also used in node /soc/peripheral@40000000/kmu@39000)
    thingy91_nrf9160ns.dts.pre.tmp:305.19-311.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@40000000/clock@5000: duplicate unit-address (also used in node /soc/peripheral@40000000/power@5000)
    Changed board to secure thingy91_nrf9160 (NOT NS)
    
    === child image spm -  begin ===
    Including boilerplate (Zephyr base): /Users/sshenoy105/Documents/code/ncs/zephyr/cmake/app/boilerplate.cmake
    CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
    CMake Error at ../../cmake/multi_image.cmake:214 (message):
      CMake generation for spm failed, aborting.  Command: 1
    Call Stack (most recent call first):
      ../../cmake/multi_image.cmake:75 (add_child_image_from_source)
      ../../samples/CMakeLists.txt:22 (add_child_image)
    
    
    
    error: cmake failed
    create_nordic_project.py failed (1)
    
  • Hmm, this is indeed weird.

    First, reinstall ninja properly by calling: "brew reinstall ninja".

    Then lets backtrack a little. Could you provide me the output of the following commands:

    echo $ZEPHYR_BASE
    echo $PATH



    Then call "source <ncs_root_directory>/zephyr/zephyr-env.sh" again and provide me the outputs from the same commands again. 

    Then try to build from the command line by calling: 
    west build -b thingy91_nrf9160ns -p


    In the <ncs_root_directory>/nrf/applications/asset_tracker/ directory? And see if you get the same error there?

    We have seen these issues with other customers so you're not the only one.

    Best regards,
    Carl Richard

  • sshenoy105@MacBook-Pro ncs % brew reinstall ninja

    ==> Downloading homebrew.bintray.com/.../ninja-1.10.1_3.catalina.bottle.tar.gz

    Already downloaded: /Users/sshenoy105/Library/Caches/Homebrew/downloads/03c7df7fb4fa24fa1c98fac9b26d711c9959d31c187d924e943cf91c3f6980a4--ninja-1.10.1_3.catalina.bottle.tar.gz

    ==> Reinstalling ninja

    ==> Pouring ninja-1.10.1_3.catalina.bottle.tar.gz

    ==> Caveats

    Bash completion has been installed to:

      /usr/local/etc/bash_completion.d

    zsh completions have been installed to:

      /usr/local/share/zsh/site-functions

    ==> Summary

    Beer  /usr/local/Cellar/ninja/1.10.1_3: 7 files, 291.9KB

     

    sshenoy105@MacBook-Pro ncs % echo $ZEPHYR_BASE 

    Note: This is a problem ?

    sshenoy105@MacBook-Pro ncs % echo $PATH

    /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public

    sshenoy105@MacBook-Pro ncs % source zephyr/zephyr-env.sh

    sshenoy105@MacBook-Pro ncs % cd nrf/applications/asset_tracker

    sshenoy105@MacBook-Pro asset_tracker % west build -b thingy91_nrf9160ns -p

    -- west build: generating a build system

    Including boilerplate (Zephyr base): /Users/sshenoy105/Documents/code/ncs/zephyr/cmake/app/boilerplate.cmake

    -- Application: /Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker

    -- Zephyr version: 2.4.0 (/Users/sshenoy105/Documents/code/ncs/zephyr)

    -- Found Python3: /usr/local/bin/python3.9 (found suitable exact version "3.9.0") found components: Interpreter

    -- Found west (found suitable version "0.8.0", minimum required is "0.7.1")

    -- Board: thingy91_nrf9160ns

    -- Cache files will be written to: /Users/sshenoy105/Library/Caches/zephyr

    -- Found dtc: /usr/local/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")

    CMake Error at /Users/sshenoy105/Documents/code/ncs/zephyr/cmake/generic_toolchain.cmake:65 (include):

      include could not find load file:

        /Users/sshenoy105/Documents/code/ncs/zephyr/cmake/toolchain//generic.cmake

    Call Stack (most recent call first):

      /Users/sshenoy105/Documents/code/ncs/zephyr/cmake/app/boilerplate.cmake:589 (include)

      /Users/sshenoy105/Documents/code/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)

      /Users/sshenoy105/Documents/code/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)

      CMakeLists.txt:20 (find_package)

    -- Found BOARD.dts: /Users/sshenoy105/Documents/code/ncs/nrf/boards/arm/thingy91_nrf9160/thingy91_nrf9160ns.dts

    CMake Error at /Users/sshenoy105/Documents/code/ncs/zephyr/cmake/dts.cmake:164 (message):

      command failed with return code: No such file or directory

    Call Stack (most recent call first):

      /Users/sshenoy105/Documents/code/ncs/zephyr/cmake/app/boilerplate.cmake:590 (include)

      /Users/sshenoy105/Documents/code/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)

      /Users/sshenoy105/Documents/code/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)

      CMakeLists.txt:20 (find_package)

    -- Configuring incomplete, errors occurred!

    FATAL ERROR: command exited with status 1: /usr/local/bin/cmake -DWEST_PYTHON=/usr/local/opt/[email protected]/bin/python3.9 -B/Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/build -S/Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker -GNinja -DBOARD=thingy91_nrf9160ns

    sshenoy105@MacBook-Pro asset_tracker %

     

     

Reply
  • sshenoy105@MacBook-Pro ncs % brew reinstall ninja

    ==> Downloading homebrew.bintray.com/.../ninja-1.10.1_3.catalina.bottle.tar.gz

    Already downloaded: /Users/sshenoy105/Library/Caches/Homebrew/downloads/03c7df7fb4fa24fa1c98fac9b26d711c9959d31c187d924e943cf91c3f6980a4--ninja-1.10.1_3.catalina.bottle.tar.gz

    ==> Reinstalling ninja

    ==> Pouring ninja-1.10.1_3.catalina.bottle.tar.gz

    ==> Caveats

    Bash completion has been installed to:

      /usr/local/etc/bash_completion.d

    zsh completions have been installed to:

      /usr/local/share/zsh/site-functions

    ==> Summary

    Beer  /usr/local/Cellar/ninja/1.10.1_3: 7 files, 291.9KB

     

    sshenoy105@MacBook-Pro ncs % echo $ZEPHYR_BASE 

    Note: This is a problem ?

    sshenoy105@MacBook-Pro ncs % echo $PATH

    /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public

    sshenoy105@MacBook-Pro ncs % source zephyr/zephyr-env.sh

    sshenoy105@MacBook-Pro ncs % cd nrf/applications/asset_tracker

    sshenoy105@MacBook-Pro asset_tracker % west build -b thingy91_nrf9160ns -p

    -- west build: generating a build system

    Including boilerplate (Zephyr base): /Users/sshenoy105/Documents/code/ncs/zephyr/cmake/app/boilerplate.cmake

    -- Application: /Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker

    -- Zephyr version: 2.4.0 (/Users/sshenoy105/Documents/code/ncs/zephyr)

    -- Found Python3: /usr/local/bin/python3.9 (found suitable exact version "3.9.0") found components: Interpreter

    -- Found west (found suitable version "0.8.0", minimum required is "0.7.1")

    -- Board: thingy91_nrf9160ns

    -- Cache files will be written to: /Users/sshenoy105/Library/Caches/zephyr

    -- Found dtc: /usr/local/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")

    CMake Error at /Users/sshenoy105/Documents/code/ncs/zephyr/cmake/generic_toolchain.cmake:65 (include):

      include could not find load file:

        /Users/sshenoy105/Documents/code/ncs/zephyr/cmake/toolchain//generic.cmake

    Call Stack (most recent call first):

      /Users/sshenoy105/Documents/code/ncs/zephyr/cmake/app/boilerplate.cmake:589 (include)

      /Users/sshenoy105/Documents/code/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)

      /Users/sshenoy105/Documents/code/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)

      CMakeLists.txt:20 (find_package)

    -- Found BOARD.dts: /Users/sshenoy105/Documents/code/ncs/nrf/boards/arm/thingy91_nrf9160/thingy91_nrf9160ns.dts

    CMake Error at /Users/sshenoy105/Documents/code/ncs/zephyr/cmake/dts.cmake:164 (message):

      command failed with return code: No such file or directory

    Call Stack (most recent call first):

      /Users/sshenoy105/Documents/code/ncs/zephyr/cmake/app/boilerplate.cmake:590 (include)

      /Users/sshenoy105/Documents/code/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)

      /Users/sshenoy105/Documents/code/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)

      CMakeLists.txt:20 (find_package)

    -- Configuring incomplete, errors occurred!

    FATAL ERROR: command exited with status 1: /usr/local/bin/cmake -DWEST_PYTHON=/usr/local/opt/[email protected]/bin/python3.9 -B/Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/build -S/Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker -GNinja -DBOARD=thingy91_nrf9160ns

    sshenoy105@MacBook-Pro asset_tracker %

     

     

Children
  • Hmm. I think we have progress. Could ensure that you have the correct values for the "ZEPHYR_TOOLCHAIN_VARIANT" and "GNUARMEMB_TOOLCHAIN_PATH" environment variables? They are supposed to be the following if you followed the getting started guide:

    ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
    GNUARMEMB_TOOLCHAIN_PATH=/opt/gnuarmemb

    Try building on both command line and SES after these are set.

    Best regards,
    Carl Richard

  • I still see nothing when I do echo $ZEPHYR_BASE.. should we fix that first ?

    I created a .zshrc and added 

    export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
    export GNUARMEMB_TOOLCHAIN_PATH=/opt/gnuarmemb

    and tried running SES again.. and here's what I see and it seems like I am back to square one

    Creating solution asset_tracker.emProject
    /usr/local/bin/cmake -GNinja -DBOARD=thingy91_nrf9160ns -DBOARD_DIR=/Users/sshenoy105/Documents/code/ncs/nrf/boards/arm/thingy91_nrf9160 -B/Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/build_thingy91_nrf9160ns -S/Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker -DZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb -DGNUARMEMB_TOOLCHAIN_PATH=/opt/gnuarmemb -DPYTHON_EXECUTABLE=/usr/local/bin/python3 -DCMAKE_MAKE_PROGRAM=/usr/local/bin/ninja -DDTC=/usr/local/bin/dtc -DWEST=/Users/sshenoy105/Library/Python/3.8/bin/west -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=/Users/sshenoy105/Documents/arm_segger_embedded_studio_v510d_macos_x64_nordic/html/configure_nordic_project_menuconfig.py
    -- Application: /Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker
    -- Zephyr version: 2.4.0 (/Users/sshenoy105/Documents/code/ncs/zephyr)
    -- Found Python3: /usr/bin/python3 (found suitable exact version "3.8.2") found components: Interpreter 
    -- Found west (found suitable version "0.8.0", minimum required is "0.7.1")
    -- Board: thingy91_nrf9160ns
    -- Cache files will be written to: /Users/sshenoy105/Library/Caches/zephyr
    -- Found dtc: /usr/local/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
    -- Found toolchain: gnuarmemb (/opt/gnuarmemb)
    -- Found BOARD.dts: /Users/sshenoy105/Documents/code/ncs/nrf/boards/arm/thingy91_nrf9160/thingy91_nrf9160ns.dts
    -- Generated zephyr.dts: /Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: /Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/zephyr/include/generated/devicetree_unfixed.h
    Parsing /Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/Kconfig
    Loaded configuration '/Users/sshenoy105/Documents/code/ncs/nrf/boards/arm/thingy91_nrf9160/thingy91_nrf9160ns_defconfig'
    Merged configuration '/Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/prj_thingy91_nrf9160ns.conf'
    Configuration saved to '/Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/zephyr/.config'
    Kconfig header saved to '/Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/zephyr/include/generated/autoconf.h'
    -- The C compiler identification is GNU 8.3.1
    -- The CXX compiler identification is GNU 8.3.1
    -- The ASM compiler identification is GNU
    -- Found assembler: /opt/gnuarmemb/bin/arm-none-eabi-gcc
    -- Application: /Users/sshenoy105/Documents/code/ncs/nrf/samples/spm
    -- Zephyr version: 2.4.0 (/Users/sshenoy105/Documents/code/ncs/zephyr)
    -- Found Python3: /usr/bin/python3 (found suitable exact version "3.8.2") found components: Interpreter 
    -- Found west (found suitable version "0.8.0", minimum required is "0.7.1")
    -- Board: thingy91_nrf9160
    -- Cache files will be written to: /Users/sshenoy105/Library/Caches/zephyr
    -- Found toolchain: gnuarmemb (/opt/gnuarmemb)
    -- Found BOARD.dts: /Users/sshenoy105/Documents/code/ncs/nrf/boards/arm/thingy91_nrf9160/thingy91_nrf9160.dts
    -- Generated zephyr.dts: /Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/spm/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: /Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/spm/zephyr/include/generated/devicetree_unfixed.h
    Parsing /Users/sshenoy105/Documents/code/ncs/zephyr/Kconfig
    Loaded configuration '/Users/sshenoy105/Documents/code/ncs/nrf/boards/arm/thingy91_nrf9160/thingy91_nrf9160_defconfig'
    Merged configuration '/Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/spm.conf'
    Merged configuration '/Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/spm/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to '/Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/spm/zephyr/.config'
    Kconfig header saved to '/Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/spm/zephyr/include/generated/autoconf.h'
    -- Configuring incomplete, errors occurred!
    See also "/Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/spm/CMakeFiles/CMakeOutput.log".
    -- Configuring incomplete, errors occurred!
    See also "/Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/CMakeFiles/CMakeOutput.log".
    See also "/Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/build_thingy91_nrf9160ns/CMakeFiles/CMakeError.log".
    Including boilerplate (Zephyr base): /Users/sshenoy105/Documents/code/ncs/zephyr/cmake/app/boilerplate.cmake
    thingy91_nrf9160ns.dts.pre.tmp:357.32-361.5: Warning (simple_bus_reg): /soc/cryptocell-sw: missing or empty reg/ranges property
    thingy91_nrf9160ns.dts.pre.tmp:56.42-68.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@40000000/flash-controller@39000: duplicate unit-address (also used in node /soc/peripheral@40000000/kmu@39000)
    thingy91_nrf9160ns.dts.pre.tmp:305.19-311.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@40000000/clock@5000: duplicate unit-address (also used in node /soc/peripheral@40000000/power@5000)
    Changed board to secure thingy91_nrf9160 (NOT NS)
    
    === child image spm -  begin ===
    Including boilerplate (Zephyr base): /Users/sshenoy105/Documents/code/ncs/zephyr/cmake/app/boilerplate.cmake
    CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
    CMake Error at ../../cmake/multi_image.cmake:214 (message):
      CMake generation for spm failed, aborting.  Command: 1
    Call Stack (most recent call first):
      ../../cmake/multi_image.cmake:75 (add_child_image_from_source)
      ../../samples/CMakeLists.txt:22 (add_child_image)
    
    
    
    error: cmake failed
    create_nordic_project.py failed (1)
    
    _______________________________________________________________________


    CMakeError.log has the following
    Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
    Compiler: /opt/gnuarmemb/bin/arm-none-eabi-g++
    Build flags:
    Id flags:

    The output was:
    1
    /opt/gnuarmemb/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /opt/gnuarmemb/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-exit.o): in function `exit':
    exit.c:(.text.exit+0x2c): undefined reference to `_exit'
    collect2: error: ld returned 1 exit status

    ______________________________________________________________________


    then I tried command line build

    sshenoy105@MacBook-Pro-4 ~ % ninja --version

    1.10.1

    sshenoy105@MacBook-Pro-4 ~ % echo $ZEPHYR_BASE

    sshenoy105@MacBook-Pro-4 ~ % cd Documents/code 

    sshenoy105@MacBook-Pro-4 code % ls       

    ncs

    sshenoy105@MacBook-Pro-4 code % cd ncs

    sshenoy105@MacBook-Pro-4 ncs % source zephyr/zephyr-env.sh 

    sshenoy105@MacBook-Pro-4 ncs % cd nrf/applications/asset_tracker 

    sshenoy105@MacBook-Pro-4 asset_tracker % west build -b thingy91_nrf9160ns -p

    -- west build: making build dir /Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/build pristine

    -- west build: generating a build system

    Including boilerplate (Zephyr base): /Users/sshenoy105/Documents/code/ncs/zephyr/cmake/app/boilerplate.cmake

    -- Application: /Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker

    -- Zephyr version: 2.4.0 (/Users/sshenoy105/Documents/code/ncs/zephyr)

    -- Found Python3: /usr/local/bin/python3.9 (found suitable exact version "3.9.0") found components: Interpreter 

    -- Found west (found suitable version "0.8.0", minimum required is "0.7.1")

    -- Board: thingy91_nrf9160ns

    -- Cache files will be written to: /Users/sshenoy105/Library/Caches/zephyr

    -- Found dtc: /usr/local/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")

    CMake Error at /Users/sshenoy105/Documents/code/ncs/zephyr/cmake/generic_toolchain.cmake:65 (include):

      include could not find load file:

        /Users/sshenoy105/Documents/code/ncs/zephyr/cmake/toolchain//generic.cmake

    Call Stack (most recent call first):

      /Users/sshenoy105/Documents/code/ncs/zephyr/cmake/app/boilerplate.cmake:589 (include)

      /Users/sshenoy105/Documents/code/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)

      /Users/sshenoy105/Documents/code/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)

      CMakeLists.txt:20 (find_package)

    -- Found BOARD.dts: /Users/sshenoy105/Documents/code/ncs/nrf/boards/arm/thingy91_nrf9160/thingy91_nrf9160ns.dts

    CMake Error at /Users/sshenoy105/Documents/code/ncs/zephyr/cmake/dts.cmake:164 (message):

      command failed with return code: No such file or directory

    Call Stack (most recent call first):

      /Users/sshenoy105/Documents/code/ncs/zephyr/cmake/app/boilerplate.cmake:590 (include)

      /Users/sshenoy105/Documents/code/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)

      /Users/sshenoy105/Documents/code/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)

      CMakeLists.txt:20 (find_package)

    -- Configuring incomplete, errors occurred!

    FATAL ERROR: command exited with status 1: /usr/local/bin/cmake -DWEST_PYTHON=/usr/local/opt/[email protected]/bin/python3.9 -B/Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker/build -S/Users/sshenoy105/Documents/code/ncs/nrf/applications/asset_tracker -GNinja -DBOARD=thingy91_nrf9160ns

    sshenoy105@MacBook-Pro-4 asset_tracker % 

  • Hi guys,

    I am experiencing the same problem, and am also on MacOS Catalina (10.15.7). I installed the SDK (nRF Connect 3.6.0. with SDK 1.4.0) via Toolchain Manager. I am able to open single image projects in the SES, e.g. for the nRF52480 but have no luck with multi_images, e.g. for the nRF9160.

    I should note that I have previously installed the SDK manually - developer.nordicsemi.com/.../gs_installing.html, and had no problems whatsoever.

    I have observed the same anomaly in earlier versions of nRF Connect and SDK - manual installation works fine, but had no success with the "Toolchain Manager" and "Getting Started Assistant" paths.

    I hope someone can help shed light so we can migrate away from the manual path.

    Ta.

  • Further discoveries:

    I am only able to get things working when I start SES from the terminal:

    /opt/nordic/ncs/v1.4.0/toolchain/segger_embedded_studio/SEGGER\ Embedded\ Studio.app/Contents/MacOS/emStudio
    and configure ninja under Tools > Options > nRF Connect to the instance I installed using brew:

    brew install ninja

    I tried the ninja instance that comes bundled with the SDK, but encountered the anomalies all over again. My hypothesis therefore is that something's probably amiss with the bundled ninja. It also appears that starting SES from the Toolchain Manager (as opposed to the terminal) 'forces' the bundled tools into play, so will result in anomalies resurfacing. However, I cannot dismiss the possibility that the fault could be rooted in my setup. 

  • Hi again, sshenoy. My apologies, I should have mentioned this: ZEPHYR_BASE should be set by the "source <ncs_root>/zephyr/zephyr-env.sh" script, but it seems like this is not happening. Could you try to do the following:
    - set ZEPHYR_BASE to <path_to_ncs_root>/zephyr
    - Add <path_to_ncs_root>/zephyr/scripts to the PATH environment variable

    Best regards,
    Carl Richard

Related