<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>The toolchain is unable to build a dummy C file</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/55475/the-toolchain-is-unable-to-build-a-dummy-c-file</link><description>Evaluating nRF53 PDK. Trying to build basic samples from zephyr repo as advised here - https://devzone.nordicsemi.com/f/nordic-q-a/54451/nrf5340-support-in-nrf-connect-sdk-and-zephyr/220309#220309 
 Both the command line &amp;#39;west&amp;#39; command and SES project</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 08 Feb 2022 13:00:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/55475/the-toolchain-is-unable-to-build-a-dummy-c-file" /><item><title>RE: The toolchain is unable to build a dummy C file</title><link>https://devzone.nordicsemi.com/thread/351805?ContentTypeID=1</link><pubDate>Tue, 08 Feb 2022 13:00:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc5257aa-2db0-417d-aebc-83cb28532b29</guid><dc:creator>niels.steyaert</dc:creator><description>&lt;p&gt;I solved this error&amp;nbsp;by deleting all the files in ..\v1.8.0\zephyr\.cache\ToolchainCapabilityDatabase&lt;/p&gt;
&lt;p&gt;OS: Windows 10&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The toolchain is unable to build a dummy C file</title><link>https://devzone.nordicsemi.com/thread/288902?ContentTypeID=1</link><pubDate>Wed, 13 Jan 2021 11:49:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb37c10f-b615-4665-b916-bdfd6b5efa5c</guid><dc:creator>armen</dc:creator><description>&lt;p&gt;&lt;span&gt;How to solve Windows 10，if I try to delete \zephyr\cache, it doesn&amp;#39;t work&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;D:\blog\ncs1\version\nrf\applications\nrf_desktop&amp;gt;west build -bnrf52840gmouse_nrf52840 -p&lt;br /&gt;-- west build: generating a build system&lt;br /&gt;Including boilerplate (Zephyr base): D:/blog/ncs1/version/zephyr/cmake/app/boilerplate.cmake&lt;br /&gt;-- Application: D:/blog/ncs1/version/nrf/applications/nrf_desktop&lt;br /&gt;-- Using NCS Toolchain 1.4.0 for building. (D:/blog/ncs1/version/toolchain/cmake)&lt;br /&gt;-- Zephyr version: 2.4.0 (D:/blog/ncs1/version/zephyr)&lt;br /&gt;-- Found Python3: D:/blog/ncs1/version/toolchain/opt/bin/python.exe (found suitable exact version &amp;quot;3.8.2&amp;quot;) found components: Interpreter&lt;br /&gt;-- Found west (found suitable version &amp;quot;0.7.2&amp;quot;, minimum required is &amp;quot;0.7.1&amp;quot;)&lt;br /&gt;-- Board: nrf52840gmouse_nrf52840&lt;br /&gt;-- Cache files will be written to: D:/blog/ncs1/version/zephyr/.cache&lt;br /&gt;-- Found dtc: D:/blog/ncs1/version/toolchain/opt/bin/dtc.exe (found suitable version &amp;quot;1.4.7&amp;quot;, minimum required is &amp;quot;1.4.6&amp;quot;)&lt;br /&gt;-- Found toolchain: gnuarmemb (D:/blog/ncs1/version/toolchain/opt)&lt;br /&gt;-- Found BOARD.dts: D:/blog/ncs1/version/nrf/boards/arm/nrf52840gmouse_nrf52840/nrf52840gmouse_nrf52840.dts&lt;br /&gt;-- Found devicetree overlay: D:/blog/ncs1/version/nrf/applications/nrf_desktop/configuration/nrf52840gmouse_nrf52840/dts.overlay&lt;br /&gt;-- Generated zephyr.dts: D:/blog/ncs1/version/nrf/applications/nrf_desktop/build/zephyr/zephyr.dts&lt;br /&gt;-- Generated devicetree_unfixed.h: D:/blog/ncs1/version/nrf/applications/nrf_desktop/build/zephyr/include/generated/devicetree_unfixed.h&lt;br /&gt;Parsing D:/blog/ncs1/version/nrf/applications/nrf_desktop/Kconfig&lt;br /&gt;Loaded configuration &amp;#39;D:/blog/ncs1/version/nrf/boards/arm/nrf52840gmouse_nrf52840/nrf52840gmouse_nrf52840_defconfig&amp;#39;&lt;br /&gt;Merged configuration &amp;#39;configuration/nrf52840gmouse_nrf52840/app_ZDebug.conf&amp;#39;&lt;br /&gt;Configuration saved to &amp;#39;D:/blog/ncs1/version/nrf/applications/nrf_desktop/build/zephyr/.config&amp;#39;&lt;br /&gt;Kconfig header saved to &amp;#39;D:/blog/ncs1/version/nrf/applications/nrf_desktop/build/zephyr/include/generated/autoconf.h&amp;#39;&lt;br /&gt;-- The C compiler identification is GNU 9.2.1&lt;br /&gt;-- The CXX compiler identification is GNU 9.2.1&lt;br /&gt;-- The ASM compiler identification is GNU&lt;br /&gt;-- Found assembler: D:/blog/ncs1/version/toolchain/opt/bin/arm-none-eabi-gcc.exe&lt;br /&gt;CMake Error at D:/blog/ncs1/version/zephyr/cmake/extensions.cmake:1557 (message):&lt;br /&gt; Assertion failed: The toolchain is unable to build a dummy C file. See&lt;br /&gt; CMakeError.log.&lt;br /&gt;Call Stack (most recent call first):&lt;br /&gt; D:/blog/ncs1/version/zephyr/CMakeLists.txt:42 (assert)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;which says in the error of the CMakeError.log that&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Compiling the C compiler identification source file &amp;quot;CMakeCCompilerId.c&amp;quot; failed.&lt;br /&gt;Compiler: D:/blog/ncs1/version/toolchain/opt/bin/arm-none-eabi-gcc.exe &lt;br /&gt;Build flags: &lt;br /&gt;Id flags:&lt;/p&gt;
&lt;p&gt;The output was:&lt;br /&gt;1&lt;br /&gt;d:/blog/ncs1/version/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: d:/blog/ncs1/version/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/lib\libc.a(lib_a-exit.o): in function `exit&amp;#39;:&lt;br /&gt;exit.c:(.text.exit+0x2c): undefined reference to `_exit&amp;#39;&lt;br /&gt;collect2.exe: error: ld returned 1 exit status&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Compiling the CXX compiler identification source file &amp;quot;CMakeCXXCompilerId.cpp&amp;quot; failed.&lt;br /&gt;Compiler: D:/blog/ncs1/version/toolchain/opt/bin/arm-none-eabi-gcc.exe &lt;br /&gt;Build flags: &lt;br /&gt;Id flags:&lt;/p&gt;
&lt;p&gt;The output was:&lt;br /&gt;1&lt;br /&gt;d:/blog/ncs1/version/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: d:/blog/ncs1/version/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/lib\libc.a(lib_a-ex.....&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The toolchain is unable to build a dummy C file</title><link>https://devzone.nordicsemi.com/thread/274961?ContentTypeID=1</link><pubDate>Wed, 14 Oct 2020 23:12:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42df041b-5548-4424-9182-6ca2c64487fd</guid><dc:creator>mraposo1</dc:creator><description>&lt;p&gt;Also, on Windows, where are the library caches?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The toolchain is unable to build a dummy C file</title><link>https://devzone.nordicsemi.com/thread/274960?ContentTypeID=1</link><pubDate>Wed, 14 Oct 2020 23:11:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5e1caab-8657-40c7-bd42-f5008b8371a0</guid><dc:creator>mraposo1</dc:creator><description>&lt;p&gt;Could you define &amp;quot;&lt;span&gt;wherever the toolchain is defined&amp;quot; better, please?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The toolchain is unable to build a dummy C file</title><link>https://devzone.nordicsemi.com/thread/225465?ContentTypeID=1</link><pubDate>Fri, 13 Dec 2019 18:20:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7544420e-ca39-48a7-a704-57c1e1ce826c</guid><dc:creator>Sven</dc:creator><description>&lt;p&gt;Super, it works! Is that the ccache configure folder there?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The toolchain is unable to build a dummy C file</title><link>https://devzone.nordicsemi.com/thread/225353?ContentTypeID=1</link><pubDate>Fri, 13 Dec 2019 12:40:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdff0a2a-ab5d-41d7-92b6-0a6381c1837e</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Most example projects should build-out of the box when the toolchain is installed correctly. However, one thing that could potentially be a problem here is the Cmake cache. Can you try to delete&amp;nbsp;~/Library/Caches/zephyr before building and see if that helps?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The toolchain is unable to build a dummy C file</title><link>https://devzone.nordicsemi.com/thread/225244?ContentTypeID=1</link><pubDate>Thu, 12 Dec 2019 18:22:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d773c6e5-414a-49f9-b069-83e77435d8e6</guid><dc:creator>Sven</dc:creator><description>&lt;p&gt;Yup. First in modern CMake one should operate on target bases, not on some set({global}), so I should prefer that way, would need to learn the CMake tree in zypher projects anyway with both approaches. Second, why is this happening to my setup, since this is a dummy compilation it should happen with every board, so I believe it should not be anything specific to nRF53.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The toolchain is unable to build a dummy C file</title><link>https://devzone.nordicsemi.com/thread/225042?ContentTypeID=1</link><pubDate>Wed, 11 Dec 2019 22:20:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eeefa1ce-34da-4727-8cb8-aa312ba7b47c</guid><dc:creator>Benjamin</dc:creator><description>&lt;p&gt;You can also add the following line to wherever the toolchain is defined:&lt;/p&gt;
&lt;pre&gt;&lt;span&gt;# Perform compiler test without linker, since we&amp;#39;re cross-compiling&lt;br /&gt;&lt;/span&gt;&lt;span&gt;set&lt;/span&gt;(&lt;span&gt;CMAKE_TRY_COMPILE_TARGET_TYPE &lt;/span&gt;&lt;span&gt;STATIC_LIBRARY&lt;/span&gt;)&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: The toolchain is unable to build a dummy C file</title><link>https://devzone.nordicsemi.com/thread/225024?ContentTypeID=1</link><pubDate>Wed, 11 Dec 2019 19:43:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66f85a84-6337-4db9-863d-f072d050b37d</guid><dc:creator>Sven</dc:creator><description>&lt;p&gt;So &lt;span&gt;--specs=nosys.specs&lt;/span&gt;&amp;nbsp;works.&lt;br /&gt;&lt;br /&gt;I tried to do a dummy linking manually inside the&amp;nbsp;&lt;span&gt;build/CMakeFiles/3.14.5/CompilerIdC directory.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;➜ CompilerIdC git:(b687d5d022) ✗ pwd
.../ncs/zephyr/samples/bluetooth/hci_rpmsg/build/CMakeFiles/3.14.5/CompilerIdC
➜ CompilerIdC git:(b687d5d022) ✗ ll
total 48
-rw-r--r-- 1 svenkautlenbach staff 20K Dec 11 21:24 CMakeCCompilerId.c
-rw-r--r-- 1 svenkautlenbach staff 1.6K Dec 11 21:24 CMakeCCompilerId.o
drwxr-xr-x 2 svenkautlenbach staff 64B Dec 11 21:24 tmp
➜ CompilerIdC git:(b687d5d022) ✗ arm-none-eabi-gcc -o tere CMakeCCompilerId.c
/Users/svenkautlenbach/gnuarmemb/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /Users/svenkautlenbach/gnuarmemb/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-exit.o): in function `exit&amp;#39;:
exit.c:(.text.exit+0x2c): undefined reference to `_exit&amp;#39;
collect2: error: ld returned 1 exit status
➜ CompilerIdC git:(b687d5d022) ✗ arm-none-eabi-gcc --specs=nosys.specs -o tere CMakeCCompilerId.c
➜ CompilerIdC git:(b687d5d022) ✗&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So am I missing something important in build system or should I modify build system files then ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>