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

  • 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

  • not sure if this is good .. I tried deleting the zephyr cache as mentioned here but now I have a new problem and looks like deleting cache was a bad idea

    - 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)
  • I see. 

     

    That does not seem good, I agree. From your current error it seems like the "Ninja" tool is not present on the path. Could you try the following things:

     

    1. Check if the "ninja" command is recognized if you run it on the command line. Try "ninja --version". What does it return?

    2. Rerun "source <ncs_root_directory>/zephyr/zephyr-env.sh"

    3. Run the following command: "sudo spctl --master-disable", and then go to "System preferences -> Security & Privacy -> Allow apps downloaded from" and choose "Anywhere". This turns of the "Gatekeeper" of Catelina, which is non-ideal, but it will help us rule out any security issues.

    3. Restart Segger Embedded Studio

     

    Notify me if anything is unclear. You can reenable the Gatekeeper by calling "sudo spctl --master-enable". 

    Note that I do see issues myself when trying this. The above made it work, but I'm trying again with less drastic means.

     

    Best regards,

    Carl Richard

  • 1. Check if the "ninja" command is recognized if you run it on the command line. Try "ninja --version". What does it return? returns 1.1.0

    2. Rerun "source <ncs_root_directory>/zephyr/zephyr-env.sh" did this.. no output but seems to have gone through

    3. Run the following command: "sudo spctl --master-disable", and then go to "System preferences -> Security & Privacy -> Allow apps downloaded from" and choose "Anywhere". This turns of the "Gatekeeper" of Catelina, which is non-ideal, but it will help us rule out any security issues.
    After running the command.. didn't have to choose anywhere.. it was already set

    3. Restart Segger Embedded Studio - done

    Result - same as before

    - 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)
    
    


    I will try restarting the Mac as well

Related