<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re:  Undefined reference to `__fabs in S32 Design Studio</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/Undefined-reference-to-fabs/m-p/907595#M4940</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jiri:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;I find 'fabs()' can be work in new project, but my project is new by older version S32DS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Some head file not similar to new project. The attachment is my demo project.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;I would appreciate it if you could use my project (file Main_Z4b.c line 21).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;PS: I can't rebuild a new project on the new version.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 May 2019 08:48:48 GMT</pubDate>
    <dc:creator>jiajian_qiu</dc:creator>
    <dc:date>2019-05-27T08:48:48Z</dc:date>
    <item>
      <title>Undefined reference to `__fabs</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Undefined-reference-to-fabs/m-p/907591#M4936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; My project has below error info when use fabs() function:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;S32DS/e200_ewl2/EWL_C/src/math/fabsf.c undefined reference to `__fabs' Demo line 22 C/C++ Problem&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Platform : S32 Design Studio for Power Architecture Version: 2017.R1&amp;nbsp;&amp;nbsp;&amp;nbsp;MPC5748G&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;The fabsf.c：&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#include &amp;lt;ansi_parms.h&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#include &amp;lt;ewl_misra_types.h&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#if _EWL_FLOATING_POINT &amp;amp;&amp;amp; _EWL_USES_SUN_SP_MATH_LIB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#include &amp;lt;math.h&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#ifdef __USING_INTRINSIC_FABS__&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#define __HAS_FABS 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;extern double fabs(double x)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return __fabs(x) ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;So I need to include some head files?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;I look forward to receiving a response., thanks !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2019 09:51:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Undefined-reference-to-fabs/m-p/907591#M4936</guid>
      <dc:creator>jiajian_qiu</dc:creator>
      <dc:date>2019-05-24T09:51:56Z</dc:date>
    </item>
    <item>
      <title>Re:  Undefined reference to `__fabs</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Undefined-reference-to-fabs/m-p/907592#M4937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Include this content in your&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;fabsf.c file and build&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE style="color: #000000;"&gt;
#&lt;SPAN class="" style="color: #5f9ea0; font-weight: bold;"&gt;define&lt;/SPAN&gt; &lt;SPAN style="color: #51626f; background-color: #ffffff; font-weight: 400;"&gt;__fabs&lt;/SPAN&gt; \ ({ \     &lt;SPAN class="" style="color: #228b22; font-weight: bold;"&gt;double&lt;/SPAN&gt; __value, __arg = (x); \     asm &lt;SPAN class="" style="color: #228b22; font-weight: bold;"&gt;volatile&lt;/SPAN&gt; (&lt;SPAN class="" style="color: #bc8f8f; font-weight: bold;"&gt;"fabs %0,%1"&lt;/SPAN&gt; : &lt;SPAN class="" style="color: #bc8f8f; font-weight: bold;"&gt;"=f"&lt;/SPAN&gt; (__value): &lt;SPAN class="" style="color: #bc8f8f; font-weight: bold;"&gt;"f"&lt;/SPAN&gt; (__arg)); \     __value; \ })  &lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;VinothS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 May 2019 05:15:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Undefined-reference-to-fabs/m-p/907592#M4937</guid>
      <dc:creator>vinothkumars</dc:creator>
      <dc:date>2019-05-27T05:15:40Z</dc:date>
    </item>
    <item>
      <title>Re:  Undefined reference to `__fabs</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Undefined-reference-to-fabs/m-p/907593#M4938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried hello world project - and only what I need to add is #include &amp;lt;math.h&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/83856iC716859238C0C59D/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also make sure that hardware floating point is enabled in project properties:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/83857iFF70C9D9D477A581/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 May 2019 06:14:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Undefined-reference-to-fabs/m-p/907593#M4938</guid>
      <dc:creator>jiri_kral</dc:creator>
      <dc:date>2019-05-27T06:14:42Z</dc:date>
    </item>
    <item>
      <title>Re:  Undefined reference to `__fabs</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Undefined-reference-to-fabs/m-p/907594#M4939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;VinothS：&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Thanks for your reply.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;I have do as you say and change some base platform.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f;"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; #define fabs(x) \&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;({ \&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;double __value, __arg = (x); \&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;__asm__ volatile ("fabs %0,%1" : "=f" (__value): "f" (__arg)); \&lt;BR /&gt;&amp;nbsp; &amp;nbsp; __value; \&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;})&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;But the compiler report another error.&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;impossible constraint in 'asm'&amp;nbsp;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f;"&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f;"&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;nbsp; Upload a demo project , it's delete part of the code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;I would appreciate it if you could use my project (file Main_Z4b.c line 21).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Best regards.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 May 2019 08:39:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Undefined-reference-to-fabs/m-p/907594#M4939</guid>
      <dc:creator>jiajian_qiu</dc:creator>
      <dc:date>2019-05-27T08:39:56Z</dc:date>
    </item>
    <item>
      <title>Re:  Undefined reference to `__fabs</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Undefined-reference-to-fabs/m-p/907595#M4940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jiri:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;I find 'fabs()' can be work in new project, but my project is new by older version S32DS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Some head file not similar to new project. The attachment is my demo project.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;I would appreciate it if you could use my project (file Main_Z4b.c line 21).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;PS: I can't rebuild a new project on the new version.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 May 2019 08:48:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Undefined-reference-to-fabs/m-p/907595#M4940</guid>
      <dc:creator>jiajian_qiu</dc:creator>
      <dc:date>2019-05-27T08:48:48Z</dc:date>
    </item>
    <item>
      <title>Re:  Undefined reference to `__fabs</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Undefined-reference-to-fabs/m-p/907596#M4941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you want to use only EWL library? You can use newlib library instead:&lt;/P&gt;&lt;P&gt;1. Delete&amp;nbsp;#define fabs(x) implementation from your&amp;nbsp;Main_Z4b.c file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Add libm library in linker settings and&amp;nbsp;delete&amp;nbsp;"${VLE_EWL_DIR}\lib\e200z4\fp" from Library search path&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_37.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/83912i41D80F8CE4896FAC/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_37.png" alt="pastedImage_37.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Select newlib in Target Processor settings&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_36.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/83913i43866F6083C8A8A7/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_36.png" alt="pastedImage_36.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it will help. :smileyhappy:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: If you still want to use EWL:&lt;/P&gt;&lt;P&gt;1. Delete Release and Debug folders from your project.&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;&lt;SPAN&gt;Delete&amp;nbsp;#define fabs(x) implementation from your&amp;nbsp;Main_Z4b.c file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3. Uncheck the following settings:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/83918iDDE2A07FFDCDA045/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_4.png" alt="pastedImage_4.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;4. You are welcome.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Dmitry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 May 2019 13:05:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Undefined-reference-to-fabs/m-p/907596#M4941</guid>
      <dc:creator>b48014</dc:creator>
      <dc:date>2019-05-27T13:05:49Z</dc:date>
    </item>
    <item>
      <title>Re:  Undefined reference to `__fabs</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Undefined-reference-to-fabs/m-p/907597#M4942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dmitry:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;I use new library and 'fabs()' work now ^_^.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Thanks very much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2019 02:39:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Undefined-reference-to-fabs/m-p/907597#M4942</guid>
      <dc:creator>jiajian_qiu</dc:creator>
      <dc:date>2019-05-28T02:39:09Z</dc:date>
    </item>
    <item>
      <title>Re:  Undefined reference to `__fabs</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Undefined-reference-to-fabs/m-p/1735154#M11109</link>
      <description>&lt;P&gt;hello, I am having the same problem for S32K148 on S32DS.&lt;/P&gt;&lt;P&gt;How to solve this ld error:undefned reference to 'ciel'?&lt;/P&gt;&lt;P&gt;Which library to add and what Target processor settings to do?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Oct 2023 09:48:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Undefined-reference-to-fabs/m-p/1735154#M11109</guid>
      <dc:creator>PCS13</dc:creator>
      <dc:date>2023-10-07T09:48:50Z</dc:date>
    </item>
  </channel>
</rss>

