<?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>Problems using newlib C standard library</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/87175/problems-using-newlib-c-standard-library</link><description>Hi 
 Now I am using NCS1.7.1 for development the nRF52840 chip.I need to use the C standard library(math.h).I set up as follows: 
 There is no problem when the above macro definitions are not added to &amp;quot; nrf\samples\bluetooth\mesh\light_ctrl&amp;quot; project.If</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 28 Apr 2022 11:59:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/87175/problems-using-newlib-c-standard-library" /><item><title>RE: Problems using newlib C standard library</title><link>https://devzone.nordicsemi.com/thread/365410?ContentTypeID=1</link><pubDate>Thu, 28 Apr 2022 11:59:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54319aa1-35bd-4183-9791-40297c6ab344</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Could you try including&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;#include&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;lt;zephyr.h&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;in your test_settings.c file? That works on my side.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;Regards,&lt;/div&gt;
&lt;div&gt;Elfving&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems using newlib C standard library</title><link>https://devzone.nordicsemi.com/thread/364602?ContentTypeID=1</link><pubDate>Mon, 25 Apr 2022 07:27:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93051457-61c1-4688-b0e8-d7af2c9f828a</guid><dc:creator>listenYes</dc:creator><description>&lt;p&gt;At the configure the &amp;quot;&lt;span&gt;CONFIG_NEWLIB_LIBC=y&lt;/span&gt;&amp;quot;,you can try to add the code like &amp;ldquo;#include &amp;lt;math.h&amp;gt;&amp;rdquo;, to the main.c file.But when you try to open the header file, SES will pop message &amp;quot;Can`t open for reading&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems using newlib C standard library</title><link>https://devzone.nordicsemi.com/thread/364346?ContentTypeID=1</link><pubDate>Fri, 22 Apr 2022 04:04:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3937898d-54a8-4b33-8a5c-509ac08d54cb</guid><dc:creator>listenYes</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;This My test code,put into NCS1.7.1 for run,and&amp;nbsp;&lt;span&gt;the &amp;quot;&lt;/span&gt;&lt;span&gt;CONFIG_NEWLIB_LIBC=y&amp;quot;,it`s&amp;nbsp;&lt;/span&gt;will display like &lt;span&gt;as follow&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1650599581229v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1650599718894v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;If delete the&amp;nbsp;&lt;span&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;CONFIG_NEWLIB_LIBC=y&amp;quot; for prj.conf,and click the &amp;quot;configure nRF Connct SDK Project...&amp;quot; button,it will success of build.like&amp;nbsp;as follow:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1650599958848v3.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have attached my code.&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/test_5F00_code.zip"&gt;devzone.nordicsemi.com/.../test_5F00_code.zip&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems using newlib C standard library</title><link>https://devzone.nordicsemi.com/thread/364207?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2022 11:39:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24622289-93f5-4097-894c-bb17d320e7d7</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;That is odd. I don&amp;#39;t seem to be able to reproduce this, though are you getting the same result with a basic example like Hello World?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems using newlib C standard library</title><link>https://devzone.nordicsemi.com/thread/364146?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2022 08:49:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ea400ae-9ff2-4ce3-bc18-f495a7ed3df6</guid><dc:creator>listenYes</dc:creator><description>&lt;p&gt;I also found a problem, even if I remove the &amp;quot;SETTINGS_STATIC_HANDLER_DEFINE&amp;rdquo; code, and enable newlib(CONFIG_NEWLIB_LIBC=y), when I &amp;quot;#include &amp;lt;math.h&amp;gt;&amp;quot;, SES still can&amp;#39;t find the math.h file.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>