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

Failed to manually build blinky example

Had tried to build it from the IDE before.  Couldn't do it.
Tried to build manually, got exactly the same error I was getting in the IDE.

Parsing C:/Users/mario.raposo/zephyrproject/zephyr/Kconfig
Loaded configuration 'C:/Users/mario.raposo/zephyrproject/zephyr/build/zephyr/.config'
No change to configuration in 'C:/Users/mario.raposo/zephyrproject/zephyr/build/zephyr/.config'
No change to Kconfig header in 'C:/Users/mario.raposo/zephyrproject/zephyr/build/zephyr/include/generated/autoconf.h'
CMake Error at ../../../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):
../../../CMakeLists.txt:42 (assert)


-- Configuring incomplete, errors occurred!
See also "C:/Users/mario.raposo/zephyrproject/zephyr/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/mario.raposo/zephyrproject/zephyr/build/CMakeFiles/CMakeError.log".

Parents
  • "You can get the latest release of the GNU Arm Embedded Toolchain here"

          I did and it did not help me.  The issue persists.

    "Check out this video for a visualization of the IDE use and more: 
    https://youtu.be/1jgImp7FBy8?t=877 "

          I did.  Thank you for the link, but it did not help me, since I tried both methods (Toolchain manager and manual) and the issue is the same.

    "What is the command you use in terminal when trying to build? Do you use  west build -b thingy91_nrf9160ns ?"

         Yes.

  • Hi Mario,

    Looks like it is a Cmake path problem.  I would suggest to uninstall all versions of Cmake and then re-install one version, then update your system path to Cmake.

    Alliteratively you can try to sett a Cmake path in SES and re install NCS and try again. 

    Also when you build start whit a clean build directory. 

    Regards,
    Jonathan

  • Uninstalled my installed cmake.
    Uninstalled NCS.
    Re-installed using Toolchain manager.



    Same error.

    Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
    Compiler: C:/Users/mario.raposo/ncs/v1.3.1/toolchain/opt/bin/arm-none-eabi-gcc.exe 
    Build flags: 
    Id flags:  
    
    The output was:
    1
    c:/users/mario.raposo/ncs/v1.3.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: c:/users/mario.raposo/ncs/v1.3.1/toolchain/opt/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:/Users/mario.raposo/ncs/v1.3.1/toolchain/opt/bin/arm-none-eabi-gcc.exe 
    Build flags: 
    Id flags:  
    
    The output was:
    1
    c:/users/mario.raposo/ncs/v1.3.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: c:/users/mario.raposo/ncs/v1.3.1/toolchain/opt/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
    
    
    
    The target system is: Generic - 2.3.0 - arm
    The host system is: Windows - 10.0.17134 - AMD64
    Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
    Compiler: C:/Users/mario.raposo/ncs/v1.3.1/toolchain/opt/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:/Users/mario.raposo/ncs/v1.3.1/zephyr/samples/basic/blinky/build/CMakeFiles/3.13.4/CompilerIdC/CMakeCCompilerId.o"
    
    Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
    Compiler: C:/Users/mario.raposo/ncs/v1.3.1/toolchain/opt/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:/Users/mario.raposo/ncs/v1.3.1/zephyr/samples/basic/blinky/build/CMakeFiles/3.13.4/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.
    
    
  • Hi

    Try to change the GNU ARM Embedded Directory from your ncs folder to the place you installed the toolchain, likely at C:\gnuarmemb\


    Zephyr Base directory is ok

    Regards,
    Jonathan

Reply Children
No Data
Related