mikcatta if you’re building using the examples (NFED) repository, you should build the version in nrf9160-feather/samples/blinky/

What is the command you’re using to invoke? It should be:

> west build -b cirucuitdojo_feather_nrf9160ns

Did you install all your pip dependencies? (Last step here.)

When you run arm-none-eabi-gcc --version what is the output?

What’s the output of env in shell?

    Hi jaredwolff

    I was in the directory specified in 2.4.1 (ncs/zephyr/samples/basic/blinky), but if I change to C:\nRFConnectSDK\nfed\nrf9160-feather\samples\blinky, I get a different message ( No CMAKE_C_COMPILER could be found.). I have of course installed this into the c:\nRFConnectSDK directory, rather than C:\ is that an issue?

    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.

    The arm compiler is reporting the following version…
    arm-none-eabi-gcc.exe (GNU Tools for Arm Embedded Processors 8-2019-q3-update) 8.3.1 20190703 (release) [gcc-8-branch revision 273027]
    Copyright © 2018 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.

    The build command is as specified above : west build -b cirucuitdojo_feather_nrf9160ns

    The env command doesn’t seem to exist on, I’ve run “set”, which hopefully shows the same thing?

    ALLUSERSPROFILE=C:\ProgramData
    APPDATA=C:\Users\mike\AppData\Roaming
    ChocolateyInstall=C:\ProgramData\chocolatey
    ChocolateyLastPathUpdate=132509839442875324
    CommonProgramFiles=C:\Program Files\Common Files
    CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
    CommonProgramW6432=C:\Program Files\Common Files
    COMPUTERNAME=MIKE-DELL-LAPTO
    ComSpec=C:\WINDOWS\system32\cmd.exe
    DriverData=C:\Windows\System32\Drivers\DriverData
    HOMEDRIVE=C:
    HOMEPATH=\Users\mike

    JAVA_HOME=C:\Program Files\Java\jdk1.8.0_161
    LOCALAPPDATA=C:\Users\mike\AppData\Local
    LOGONSERVER=\MIKE-DELL-LAPTO
    M2_HOME=C:\Program Files\Apache\maven
    MAVEN_HOME=C:\Program Files\Apache\maven
    NUMBER_OF_PROCESSORS=8
    OneDrive=C:\Users\mike
    \OneDrive
    OS=Windows_NT
    Path=C:\Python39\Scripts\;C:\Python39\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\app\mike\product\11.2.0\odac;C:\app\mike\product\11.2.0\odac\bin;C:\app\mike\product\11.2.0\client_64bit_odac\bin;C:\app\mike\product\11.2.0\client_64bit_odac;C:\Program Files (x86)\Intel\iCLS Client\;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Apache\maven\bin;C:\Program Files\Java\jdk1.8.0_161\bin;C:\Program Files (x86)\Intel\Intel® Management Engine Components\DAL;C:\Program Files\Intel\Intel® Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel® Management Engine Components\IPT;C:\Program Files\Intel\Intel® Management Engine Components\IPT;c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin;C:\instantclient_11_1;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\NTP\bin;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Program Files\CMake\bin;C:\nRFConnectSDK\bin;C:\Users\mike\AppData\Local\Microsoft\WindowsApps;C:\ProgramData\mike\atom\bin;C:\Users\mike\AppData\Local\Microsoft\WindowsApps;C:\Users\mike\AppData\Roaming\npm;C:\Users\mike\AppData\Local\Programs\Microsoft VS Code\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
    PROG27B48B2C050=1
    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
    RANDFILE=C:\Program Files (x86)\NTP\etc.rnd
    SESSIONNAME=Console
    SystemDrive=C:
    SystemRoot=C:\WINDOWS
    TEMP=C:\Users\mike
    \AppData\Local\Temp
    TMP=C:\Users\mike\AppData\Local\Temp
    USERDOMAIN=MIKE-DELL-LAPTO
    USERDOMAIN_ROAMINGPROFILE=MIKE-DELL-LAPTO
    USERNAME=mike

    USERPROFILE=C:\Users\mike_
    VBOX_MSI_INSTALL_PATH=C:\Program Files\Oracle\VirtualBox\
    VS100COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\
    windir=C:\WINDOWS

      Tried a few more things (updated GNUARMEMB to the latest) and now I get….

      C:\nRFConnectSDK\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:\nRFConnectSDK\nfed\nrf9160-feather\samples\blinky\build’

      I cant find a “build.ninja” file in this path….

      params now set and visible with set :-
      GNUARMEMB_TOOLCHAIN_PATH=C:\Program Files (x86)\GNU Tools Arm Embedded\9 2019-q4-major
      ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb

      If I add the “-p” command to the build command, it gets further, but still reports….
      – Cache files will be written to: C:/nRFConnectSDK/nfed/zephyr/.cache
      CMake Error at C:/nRFConnectSDK/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:/nRFConnectSDK/nfed/zephyr/CMakeLists.txt:42 (assert)

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

                                      Terms and Conditions | Privacy Policy