mikcatta Yes I believe all steps have been followed, the only thing I would mention is that I already had the SDK installed for compiling for the Thingy91, which was/is working.

Sorry for the delay @mikcatta. I didn’t see the notification you replied!

With the above being said, it’s difficult to add the NFED directory to an already existing NCS copy.

Have you tried compiling this code for the nRF91 Thingy?
How did you manage the install process of NCS?

Things may not work as expected if you’re using the Nordic’s install wizard/Segger Studio. I recommend you pull a fresh repo using the instructions here.

    Hi @jaredwolff

    I believe I did follow your instructions to the letter, the only difference being that I installed into C:\nRFConnectSDK\nfed rather than c:\nfed, but I can’t see that would of caused any issues? Maybe I should try that next……

    Unfortunately without the “build.ninja” file, it fails every-time unless I specify -p, odd or what?

    The install for the Thingy91 seemed to work and using Segger, rather than “west”, the build worked. Iam really not sure where to go with this now. I am no expert with the Nordic tools, I was just trying to get started.

      Installed into c:\nfed and it fails with the same error

      c:\nfed\nrf9160-feather\samples\blinky>west build -b circuitdojo_feather_nrf9160ns
      ninja: error: loading ‘build.ninja’: The system cannot find the file specified.

      FATAL ERROR: command exited with status 1: ‘C:\Program Files\CMake\bin\cmake.EXE’ –build ‘c:\nfed\nrf9160-feather\samples\blinky\build’

        mikcatta I believe I did follow your instructions to the letter, the only difference being that I installed into C:\nRFConnectSDK\nfed rather than c:\nfed, but I can’t see that would of caused any issues? Maybe I should try that next……

        Ahh gotcha. I was confused as to how wrote it earlier. This should not matter as long as everything (zephyr nrf etc are within the nfed directory)

        One thing I did notice is that this setup is using C:/gnuarmemb/bin/arm-none-eabi-gcc.exe as your compiler not C:\Program Files (x86)\GNU Tools Arm Embedded\9 2019-q4-major

        You may want to open the environment configuration as seen here and make sure that GNUARMEMB_TOOLCHAIN_PATH and ZEPHYR_TOOLCHAIN_VARIANT are set correctly.

          Hi @jaredwolff

          This is the output from the command, and it looks to me as if “gnuarmemb” is correct?

          `c:\nfed\nrf9160-feather\samples\blinky>west build -b circuitdojo_feather_nrf9160ns -p
          – west build: making build dir c:\nfed\nrf9160-feather\samples\blinky\build pristine
          – west build: generating a build system
          Including boilerplate (Zephyr base): C:/nfed/zephyr/cmake/app/boilerplate.cmake
          – Application: C:/nfed/nrf9160-feather/samples/blinky
          – Zephyr version: 2.3.0-rc1 (C:/nfed/zephyr)
          – Found Python3: C:/Python39/python.exe (found suitable exact version “3.9.0”) found components: Interpreter
          – Board: circuitdojo_feather_nrf9160ns
          – Found west: C:/Python39/Scripts/west.exe (found suitable version “0.8.0”, minimum required is “0.7.1”)
          – Found dtc: C:/ProgramData/chocolatey/bin/dtc.exe (found suitable version “1.4.7”, minimum required is “1.4.6”)
          Found toolchain: gnuarmemb (C:/Program Files (x86)/GNU Tools Arm Embedded/9 2019-q4-major)
          – Found BOARD.dts: C:/nfed/zephyr/boards/arm/circuitdojo_feather_nrf9160/circuitdojo_feather_nrf9160ns.dts
          – Generated zephyr.dts: C:/nfed/nrf9160-feather/samples/blinky/build/zephyr/zephyr.dts
          – Generated devicetree_unfixed.h: C:/nfed/nrf9160-feather/samples/blinky/build/zephyr/include/generated/devicetree_unfixed.h
          Parsing C:/nfed/zephyr/Kconfig
          Loaded configuration ‘C:/nfed/zephyr/boards/arm/circuitdojo_feather_nrf9160/circuitdojo_feather_nrf9160ns_defconfig’
          Merged configuration ‘C:/nfed/nrf9160-feather/samples/blinky/prj.conf’
          Configuration saved to ‘C:/nfed/nrf9160-feather/samples/blinky/build/zephyr/.config’
          Kconfig header saved to ‘C:/nfed/nrf9160-feather/samples/blinky/build/zephyr/include/generated/autoconf.h’
          – The C compiler identification is GNU 9.2.1
          – The CXX compiler identification is GNU 9.2.1
          – The ASM compiler identification is GNU
          – Found assembler: C:/Program Files (x86)/GNU Tools Arm Embedded/9 2019-q4-major/bin/arm-none-eabi-gcc.exe
          – Cache files will be written to: C:/nfed/zephyr/.cache
          CMake Error at C:/nfed/zephyr/cmake/extensions.cmake:1457 (message):
          Assertion failed: The toolchain is unable to build a dummy C file. See
          CMakeError.log.
          Call Stack (most recent call first):
          C:/nfed/zephyr/CMakeLists.txt:42 (assert)

          – Configuring incomplete, errors occurred!
          See also “C:/nfed/nrf9160-feather/samples/blinky/build/CMakeFiles/CMakeOutput.log”.
          See also “C:/nfed/nrf9160-feather/samples/blinky/build/CMakeFiles/CMakeError.log”.
          FATAL ERROR: command exited with status 1: ‘C:\Program Files\CMake\bin\cmake.EXE’ ‘-Bc:\nfed\nrf9160-feather\samples\blinky\build’ ‘-Sc:\nfed\nrf9160-feather\samples\blinky’ -GNinja -DBOARD=circuitdojo_feather_nrf9160ns`

            @jaredwolff

            C:\Users\mike_>cmake -version
            cmake version 3.19.1

            C:\Users\mike_>python –version
            Python 3.9.0

            I have also installed on my Ubuntu VM and I get exactly the same error, so maybe there is a step missing in the instructions?

            with -p included in the options

            -- Configuring incomplete, errors occurred!
            See also "/home/mike/nfed/nrf9160-feather/samples/blinky/build/CMakeFiles/CMakeOutput.log".
            See also "/home/mike/nfed/nrf9160-feather/samples/blinky/build/CMakeFiles/CMakeError.log".
            FATAL ERROR: command exited with status 1: /usr/bin/cmake -B/home/mike/nfed/nrf9160-feather/samples/blinky/build -S/home/mike/nfed/nrf9160-feather/samples/blinky -GNinja -DBOARD=circuitdojo_feather_nrf9160ns
            --

            without the -p

            west build -b circuitdojo_feather_nrf9160ns
            ninja: error: loading 'build.ninja': No such file or directory
            FATAL ERROR: command exited with status 1: /usr/bin/cmake --build /home/mike/nfed/nrf9160-feather/samples/blinky/build

              mikcatta this is so funky. Do you mind uploading your CMakeOutput.log and CMakeError.log? Sorry for the issues with this. Just when you think the bugs are ironed out, more come out of the woodwork!

                mikcatta how did you init the NFED directory?

                Did you do these steps?

                cd C:\
                mkdir nfed
                cd nfed
                west init -m https://github.com/circuitdojo/nrf9160-feather-examples-and-drivers --mr main

                I did notice that my cmake is slightly older. How did you install it? Through choco?

                  yes did the “west init -m…..” command

                  Cmake I believe was installed from the installation routines (step 3) :- choco install cmake –installargs ‘ADD_CMAKE_TO_PATH=System’

                    mikcatta hmm ok! I’m updating my setup here to see if I can reproduce the error.

                      CMakeError.log

                      Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
                      Compiler: C:/Program Files (x86)/GNU Tools Arm Embedded/9 2019-q4-major/bin/arm-none-eabi-gcc.exe 
                      Build flags: 
                      Id flags:  
                      
                      The output was:
                      1
                      c:/program files (x86)/gnu tools arm embedded/9 2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: c:/program files (x86)/gnu tools arm embedded/9 2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/lib\libc.a(lib_a-exit.o): in function `exit':
                      exit.c:(.text.exit+0x2c): undefined reference to `_exit'
                      collect2.exe: error: ld returned 1 exit status
                      
                      
                      Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
                      Compiler: C:/Program Files (x86)/GNU Tools Arm Embedded/9 2019-q4-major/bin/arm-none-eabi-gcc.exe 
                      Build flags: 
                      Id flags:  
                      
                      The output was:
                      1
                      c:/program files (x86)/gnu tools arm embedded/9 2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: c:/program files (x86)/gnu tools arm embedded/9 2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/lib\libc.a(lib_a-exit.o): in function `exit':
                      exit.c:(.text.exit+0x2c): undefined reference to `_exit'
                      collect2.exe: error: ld returned 1 exit status

                        CMakeOutput.log

                        The target system is: Generic - 2.3.0 - arm
                        The host system is: Windows - 10.0.18363 - AMD64
                        Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
                        Compiler: C:/Program Files (x86)/GNU Tools Arm Embedded/9 2019-q4-major/bin/arm-none-eabi-gcc.exe 
                        Build flags: 
                        Id flags: -c 
                        
                        The output was:
                        0
                        
                        
                        Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.o"
                        
                        The C compiler identification is GNU, found in "C:/nfed/nrf9160-feather/samples/blinky/build/CMakeFiles/3.19.1/CompilerIdC/CMakeCCompilerId.o"
                        
                        Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
                        Compiler: C:/Program Files (x86)/GNU Tools Arm Embedded/9 2019-q4-major/bin/arm-none-eabi-gcc.exe 
                        Build flags: 
                        Id flags: -c 
                        
                        The output was:
                        0
                        
                        
                        Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.o"
                        
                        The CXX compiler identification is GNU, found in "C:/nfed/nrf9160-feather/samples/blinky/build/CMakeFiles/3.19.1/CompilerIdCXX/CMakeCXXCompilerId.o"
                        
                        Checking whether the ASM compiler is GNU using "--version" matched "(GNU assembler)|(GCC)|(Free Software Foundation)":
                        arm-none-eabi-gcc.exe (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]
                        Copyright (C) 2019 Free Software Foundation, Inc.
                        This is free software; see the source for copying conditions.  There is NO
                        warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

                          @mikcatta can you delete your build folder and try again with west build -b circuitdojo_feather_nrf9160ns

                            @jaredwolff Presumably that is the build directory in the C:\nfed\nrf9160-feather\samples\blinky directory?

                            Deleted that directory and build using west build -b circuitdojo_feather_nrf9160ns and I still get the same error.

                             Assertion failed: The toolchain is unable to build a dummy C file.  See
                              CMakeError.log.
                            Call Stack (most recent call first):
                              C:/nfed/zephyr/CMakeLists.txt:42 (assert)

                              mikcatta @jaredwolff Presumably that is the build directory in the C:\nfed\nrf9160-feather\samples\blinky directory?

                              Yes, C:\nfed\nrf9160-feather\samples\blinky\build delete the whole build directory if that’s where you’re running west build -b circuitdojo_feather_nrf9160ns

                              mikcatta hmm so this error happens when the cmake cache is mucked up for some reason. The solution for Mac is this. working on a Windows solution..

                                mikcatta try this:

                                Open up powershell.exe in Adminstrator mode and run:

                                choco uninstall cmake
                                choco install -y cmake --version 3.18.5

                                Then delete your build directory and try again.

                                  Hi @jaredwolff

                                  Tried that, and cmake didn’t seem to be added to the PATH, so had to add it manually and now it reports as:

                                  C:\nfed\nrf9160-feather\samples\blinky>cmake -version
                                  cmake version 3.18.5

                                  But I still get the same error as before:-

                                  CMake Error at C:/nfed/zephyr/cmake/extensions.cmake:1457 (message):
                                    Assertion failed: The toolchain is unable to build a dummy C file.  See
                                    CMakeError.log.
                                  Call Stack (most recent call first):
                                    C:/nfed/zephyr/CMakeLists.txt:42 (assert)
                                  
                                  
                                  -- Configuring incomplete, errors occurred!
                                  See also "C:/nfed/nrf9160-feather/samples/blinky/build/CMakeFiles/CMakeOutput.log".
                                  See also "C:/nfed/nrf9160-feather/samples/blinky/build/CMakeFiles/CMakeError.log".
                                  FATAL ERROR: command exited with status 1: 'c:\program files\cmake\bin\cmake.EXE' '-BC:\nfed\nrf9160-feather\samples\blinky\build' '-SC:\nfed\nrf9160-feather\samples\blinky' -GNinja -DBOARD=circuitdojo_feather_nrf9160ns

                                    mikcatta where are you running these commands? powershell.exe? You don’t have any other cmake installations before using choco correct?

                                      Terms and Conditions | Privacy Policy