<?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>CodeWarrior Development Tools中的主题 Problem using math library functions</title>
    <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Problem-using-math-library-functions/m-p/351703#M1622</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I am using CW 10.2v with MQX 3.8. I am using Kinetis K-61 microcontroller.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I am not able to use any of the math functions, despite including the header file.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The function i want to use is not getting mapped to the same in math.h header file. No build error is there.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Do i need to do any modification in the project? How to get over this problem.?&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Please help!!&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Regards&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Puneet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Dec 2014 09:00:17 GMT</pubDate>
    <dc:creator>puneetgautam</dc:creator>
    <dc:date>2014-12-15T09:00:17Z</dc:date>
    <item>
      <title>Problem using math library functions</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Problem-using-math-library-functions/m-p/351703#M1622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I am using CW 10.2v with MQX 3.8. I am using Kinetis K-61 microcontroller.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I am not able to use any of the math functions, despite including the header file.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The function i want to use is not getting mapped to the same in math.h header file. No build error is there.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Do i need to do any modification in the project? How to get over this problem.?&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Please help!!&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Regards&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Puneet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Dec 2014 09:00:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Problem-using-math-library-functions/m-p/351703#M1622</guid>
      <dc:creator>puneetgautam</dc:creator>
      <dc:date>2014-12-15T09:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using math library functions</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Problem-using-math-library-functions/m-p/351704#M1623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Puneet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About your problem , you can refer to this &lt;A href="https://community.nxp.com/message/439488"&gt;CW 10.6 Kinetis - "incompatible implicit declaration" of all math.h functions?&lt;/A&gt; .&lt;/P&gt;&lt;P&gt;You can try , even thought the version not the same , I think the principle is the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;ALice&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'inherit','serif'; color: #3d3d3d;"&gt;------------------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'inherit','serif'; color: #3d3d3d;"&gt;If this post answers your question, please click the Correct Answer button. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2014 02:53:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Problem-using-math-library-functions/m-p/351704#M1623</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2014-12-16T02:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using math library functions</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Problem-using-math-library-functions/m-p/351705#M1624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hi&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Actually , i am not using MQX. Its just a bareboard project using K-61 controller.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I have tried the solution posted above but that doesnt seem to work. &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I am not getting any errors. I think CW is not able to provide support for Floating point. &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;In ansi_prefix.ARM.h file, &lt;/SPAN&gt;I have tried to set the following flags:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;1. _EWL_FLOATING_POINT &lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;2. _EWL_&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;FLOATING_POINT_PRINTF_SCANF to 1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The problem remains the same. It is not recognizing any math functions.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Please help!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Regards&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Puneet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2014 08:27:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Problem-using-math-library-functions/m-p/351705#M1624</guid>
      <dc:creator>puneetgautam</dc:creator>
      <dc:date>2014-12-16T08:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Problem using math library functions</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Problem-using-math-library-functions/m-p/351706#M1625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Puneet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't have anymore the MCU v10.2 installed on my PC.&lt;/P&gt;&lt;P&gt;I've performed some tests with the config:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - MCU v10.6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Multilink Universal&amp;nbsp; Rev B,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - TWR-K60D100M (Based on K60DN512)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My example is using the fabs().&lt;/P&gt;&lt;P&gt;I can build it and the application is running fine on board.&lt;/P&gt;&lt;P&gt;Attached you will find the example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Pascal&lt;BR /&gt;Freescale Technical Support&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 06:55:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Problem-using-math-library-functions/m-p/351706#M1625</guid>
      <dc:creator>trytohelp</dc:creator>
      <dc:date>2014-12-17T06:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Problem using math library functions</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Problem-using-math-library-functions/m-p/351707#M1626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi pascal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have not tried CW 10.6 but i tried to build the same application using CW v10.5. I could not find any solution for the same.&lt;/P&gt;&lt;P&gt;See, I am able to build my application and fuse it with Microcontroller board.&lt;/P&gt;&lt;P&gt;But the problem is that i am not getting the correct results as expected.&lt;/P&gt;&lt;P&gt;The math functions like sin, cos, asin , acos and even stdlib functions like atof are not working correctly. &lt;/P&gt;&lt;P&gt;This is happening because these function names are not getting mapped to their definitions provided in the header files &amp;lt;math.h&amp;gt; and &amp;lt;stdlib.h&amp;gt;.&lt;/P&gt;&lt;P&gt;But i am able to use atoi and atol functions defined in &amp;lt;stdlib.h&amp;gt;.&lt;/P&gt;&lt;P&gt;Maybe , some issue with the floating point support.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls help !!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Puneet Gautam&lt;/P&gt;&lt;P&gt;BEL&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 08:50:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Problem-using-math-library-functions/m-p/351707#M1626</guid>
      <dc:creator>puneetgautam</dc:creator>
      <dc:date>2014-12-17T08:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem using math library functions</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Problem-using-math-library-functions/m-p/351708#M1627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi bel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ever used CW 10.2v and MQX 3.8 on k60 board this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;set in user_config.h MQX_INCLUDE_FLOATING_POINT_IO 1. You can find this file in the next path:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;C:\Program Files\Freescale\Freescale &lt;STRONG&gt;MQX&lt;/STRONG&gt; 3.8\config\twrk60n512&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;After this you must recompile K60 BSP and PSP libraries. You can find the projects to recompile these libraries in the next paths:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;C:\Program Files\Freescale\Freescale &lt;STRONG&gt;MQX&lt;/STRONG&gt; 3.8\mqx\build\cw10\bsp_twrk60n512&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;C:\Program Files\Freescale\Freescale &lt;STRONG&gt;MQX&lt;/STRONG&gt; 3.8\mqx\build\cw10\psp_twrk60n512&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;Finally, in your applications project, you must change your library model to c9x in your project porperties as you have already done. But you must also change print format and scan format to int_FP. And change IO Mode to Buffered.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;Dont forget to include #include&amp;nbsp; in your source file where you are using math file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Zhang Jun&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;===============================================&lt;/P&gt;&lt;P&gt;this answer is for you, if it helps, please click on "Correct Answer" button.&lt;/P&gt;&lt;P&gt;===============================================&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 09:49:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Problem-using-math-library-functions/m-p/351708#M1627</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2014-12-17T09:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Problem using math library functions</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Problem-using-math-library-functions/m-p/351709#M1628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Puneet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not using MQX project.&lt;/P&gt;&lt;P&gt;Based on the EWL C Reference.pdf manual, I've created an example using the sin().&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Refer to the 13.5.6 sin() page 98&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the result should be 0.8387.&lt;/P&gt;&lt;P&gt;In the debugger I see:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jiveImage" src="https://community.nxp.com/" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems it's working on my side.&lt;/P&gt;&lt;P&gt;Attached the new example.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Pascal&lt;BR /&gt;Freescale Technical Support&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 11:15:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Problem-using-math-library-functions/m-p/351709#M1628</guid>
      <dc:creator>trytohelp</dc:creator>
      <dc:date>2014-12-17T11:15:48Z</dc:date>
    </item>
  </channel>
</rss>

