This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

The toolchain is unable to build a dummy C file when building project with toolchain manager install

I've been trying to build blinky using the nRF SDK from the toolchain manager with no success on windows 10. I've previously been able to build projects so I'm not entirely sure what is causing this issue.  

I'm using the nRF connect VSCode extensions, the behavior is the same with Segger embedded studio.


Things I've tried:

- Clearing the cache (ncs\SDK_VERSION\zephyr\.cache)
- Fresh install of both nRF connect & SDK/toolchain (Uninstall connect, delete ncs, .nrf-connectapps & appdata, reinstalling VSCode extensions)
- SDK versions 1.7.0, 1.7.1 & 1.6.0
- Using an older version of CMake (3.17)
- Deleting build folder & using pristine build w/ VSCode 
- Error is the same with or without nRF connect command line tools

On trying to compile the blinky example (zephyr\samples\basic\blinky) to the board  actinius_icarus_ns (i've tried others e.g thingy:91 -- no success) the following error is thrown: 

CMake Error at c:\Users\USERNAME\Documents\ncs\v1.6.0\zephyr\samples\cmake\extensions.cmake:1746 (message):
  Assertion failed: The toolchain is unable to build a dummy C file.  See
  CMakeError.log.
Call Stack (most recent call first):
  c:\Users\USERNAME\Documents\ncs\v1.6.0\zephyr\samples\CMakeLists.txt:42 (assert)


I've attached the full build log:

 

> Executing task: nRF Connect: Build blinky/build (active) <

Building blinky
west build --build-dir c:\Users\USERNAME\Documents\ncs\v1.6.0\zephyr\samples\basic\blinky\build c:\Users\USERNAME\Documents\ncs\v1.6.0\zephyr\samples\basic\blinky --pristine --board actinius_icarus_ns -- -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DCONF_FILE:STRING="c:/Users/USERNAME/Documents/ncs/v1.6.0/zephyr/samples/basic/blinky/prj.conf"

-- west build: generating a build system
Including boilerplate (Zephyr base): C:/Users/USERNAME/Documents/ncs/v1.6.0/zephyr/cmake/app/boilerplate.cmake
-- Application: C:/Users/USERNAME/Documents/ncs/v1.6.0/zephyr/samples/basic/blinky
-- Zephyr version: 2.6.0-rc1 (C:/Users/USERNAME/Documents/ncs/v1.6.0/zephyr), build: v2.6.0-rc1-ncs1
-- Found Python3: C:/Users/USERNAME/Documents/ncs/v1.6.0/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
-- Found west (found suitable version "0.11.0", minimum required is "0.7.1")
-- Board: actinius_icarus_ns
-- Cache files will be written to: C:/Users/USERNAME/Documents/ncs/v1.6.0/zephyr/.cache
-- Found dtc: C:/Users/USERNAME/Documents/ncs/v1.6.0/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (c:/Users/USERNAME/Documents/ncs/v1.6.0/toolchain/opt)
-- Found BOARD.dts: C:/Users/USERNAME/Documents/ncs/v1.6.0/zephyr/boards/arm/actinius_icarus/actinius_icarus_ns.dts
-- Generated zephyr.dts: C:/Users/USERNAME/Documents/ncs/v1.6.0/zephyr/samples/basic/blinky/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: C:/Users/USERNAME/Documents/ncs/v1.6.0/zephyr/samples/basic/blinky/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: C:/Users/USERNAME/Documents/ncs/v1.6.0/zephyr/samples/basic/blinky/build/zephyr/include/generated/device_extern.h
Parsing C:/Users/USERNAME/Documents/ncs/v1.6.0/zephyr/Kconfig
Loaded configuration 'C:/Users/USERNAME/Documents/ncs/v1.6.0/zephyr/boards/arm/actinius_icarus/actinius_icarus_ns_defconfig'
Merged configuration 'c:/Users/USERNAME/Documents/ncs/v1.6.0/zephyr/samples/basic/blinky/prj.conf'
Configuration saved to 'C:/Users/USERNAME/Documents/ncs/v1.6.0/zephyr/samples/basic/blinky/build/zephyr/.config'
Kconfig header saved to 'C:/Users/USERNAME/Documents/ncs/v1.6.0/zephyr/samples/basic/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:/Users/USERNAME/Documents/ncs/v1.6.0/toolchain/opt/bin/arm-none-eabi-gcc.exe
CMake Error at c:\Users\USERNAME\Documents\ncs\v1.6.0\zephyr\samples\cmake\extensions.cmake:1746 (message):
  Assertion failed: The toolchain is unable to build a dummy C file.  See
  CMakeError.log.
Call Stack (most recent call first):
  c:\Users\USERNAME\Documents\ncs\v1.6.0\zephyr\samples\CMakeLists.txt:42 (assert)


-- Configuring incomplete, errors occurred!
See also "C:/Users/USERNAME/Documents/ncs/v1.6.0/zephyr/samples/basic/blinky/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/USERNAME/Documents/ncs/v1.6.0/zephyr/samples/basic/blinky/build/CMakeFiles/CMakeError.log".
FATAL ERROR: command exited with status 1: 'c:\Users\USERNAME\Documents\ncs\v1.6.0\toolchain\opt\bin\cmake.EXE' '-DWEST_PYTHON=c:\Users\USERNAME\Documents\ncs\v1.6.0\toolchain\opt\bin\python.exe' '-Bc:\Users\USERNAME\Documents\ncs\v1.6.0\zephyr\samples\basic\blinky\build' '-Sc:\Users\USERNAME\Documents\ncs\v1.6.0\zephyr\samples\basic\blinky' -GNinja -DBOARD=actinius_icarus_ns -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING=NONE -DCONF_FILE:STRING=c:/Users/USERNAME/Documents/ncs/v1.6.0/zephyr/samples/basic/blinky/prj.conf
The terminal process terminated with exit code: 1.

Just wondering if maybe someone has experienced a similar issue? There is old threads with the same error but it seems to be a solved issue & none of the fixes are working (at least for me)


Thanks

Parents
  • Hello, 

    Looking at the log output you have attached, the path of nRF Connect SDK (NCS) is fairly long. How long is the username? Please try moving the NCS folder to e.g. C:\NCS\v1.6.0

    Kind regards,
    Øyvind

  • Thanks for the quick response 

    I've just tried this now sadly no success. Same error.

    Matt

    Terminal will be reused by tasks, press any key to close it.
    
    > Executing task: nRF Connect: Generate config actinius_icarus_ns for c:\ncs\v1.6.0\zephyr\samples\basic\blinky <
    
    Building blinky
    west build --build-dir c:\ncs\v1.6.0\zephyr\samples\basic\blinky\build_2 c:\ncs\v1.6.0\zephyr\samples\basic\blinky --pristine --board actinius_icarus_ns -- -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING="NONE"
    
    -- west build: generating a build system
    Including boilerplate (Zephyr base): C:/ncs/v1.6.0/zephyr/cmake/app/boilerplate.cmake
    -- Application: C:/ncs/v1.6.0/zephyr/samples/basic/blinky
    -- Zephyr version: 2.6.0-rc1 (C:/ncs/v1.6.0/zephyr), build: v2.6.0-rc1-ncs1
    -- Found Python3: C:/ncs/v1.6.0/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
    -- Found west (found suitable version "0.11.0", minimum required is "0.7.1")
    -- Board: actinius_icarus_ns
    -- Cache files will be written to: C:/ncs/v1.6.0/zephyr/.cache
    -- Found dtc: C:/ncs/v1.6.0/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: gnuarmemb (c:/ncs/v1.6.0/toolchain/opt)
    -- Found BOARD.dts: C:/ncs/v1.6.0/zephyr/boards/arm/actinius_icarus/actinius_icarus_ns.dts
    -- Generated zephyr.dts: C:/ncs/v1.6.0/zephyr/samples/basic/blinky/build_2/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: C:/ncs/v1.6.0/zephyr/samples/basic/blinky/build_2/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: C:/ncs/v1.6.0/zephyr/samples/basic/blinky/build_2/zephyr/include/generated/device_extern.h
    Parsing C:/ncs/v1.6.0/zephyr/Kconfig
    Loaded configuration 'C:/ncs/v1.6.0/zephyr/boards/arm/actinius_icarus/actinius_icarus_ns_defconfig'
    Merged configuration 'C:/ncs/v1.6.0/zephyr/samples/basic/blinky/prj.conf'
    Configuration saved to 'C:/ncs/v1.6.0/zephyr/samples/basic/blinky/build_2/zephyr/.config'
    Kconfig header saved to 'C:/ncs/v1.6.0/zephyr/samples/basic/blinky/build_2/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:/ncs/v1.6.0/toolchain/opt/bin/arm-none-eabi-gcc.exe
    CMake Error at c:\ncs\v1.6.0\zephyr\samples\cmake\extensions.cmake:1746 (message):
      Assertion failed: The toolchain is unable to build a dummy C file.  See
      CMakeError.log.
    Call Stack (most recent call first):
      c:\ncs\v1.6.0\zephyr\samples\CMakeLists.txt:42 (assert)
    
    
    -- Configuring incomplete, errors occurred!
    See also "C:/ncs/v1.6.0/zephyr/samples/basic/blinky/build_2/CMakeFiles/CMakeOutput.log".
    See also "C:/ncs/v1.6.0/zephyr/samples/basic/blinky/build_2/CMakeFiles/CMakeError.log".
    FATAL ERROR: command exited with status 1: 'c:\ncs\v1.6.0\toolchain\opt\bin\cmake.EXE' '-DWEST_PYTHON=c:\ncs\v1.6.0\toolchain\opt\bin\python.exe' '-Bc:\ncs\v1.6.0\zephyr\samples\basic\blinky\build_2' '-Sc:\ncs\v1.6.0\zephyr\samples\basic\blinky' -GNinja -DBOARD=actinius_icarus_ns -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING=NONE
    The terminal process terminated with exit code: 1.
    
    

  • Matt, can you please try building the blinky sample in same path as NCS. 

    In your command prompt, go to blinky folder:
    cd c:\ncs\v1.7.1\zephyr\samples\basic\blinky and then run the following:

    west build -b actinius_icarus_ns -d build

    The previous comment had the path c:\Users\USERNAME\Documents\ncs\v1.7.1\, is this still on your computer? If so, please delete any other NCS folders to narrow down to one path. 

  • Hi ,
    Sorry for the late response.

    I have deleted the version of ncs in Documents.

    When running via a prompt the same error occurs (git bash).


    One thing to note: my command prompt seems to be broken. It won't open from System32/cmd.exe  so I'll try fix this and then get back to you with results

    Matt

  • Yes, please do. Awaiting your feedback.

  • , it seems this was an isolated issue on my computer that came from some corrupt(?) Python installation. 

    I've since fixed it & everything is working now.

    Thanks for your help.

Reply Children
No Data
Related