<?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>8-bit Microcontrollers中的主题 Re: beekit and floating point math?</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/beekit-and-floating-point-math/m-p/152640#M8410</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;That works fine, just make sure the rtshc08.c is in the link order before the ansi library,&lt;BR /&gt;as the ansi library contains the same file too just compiler with different options.&lt;BR /&gt;One difference of this approach to use the floating point ansi library is that this way, sprintf and others wont support "%f"/float/double and that can be a&amp;nbsp; real space safer in case you use those routines but not with floats. Otherwise using the ansi library may just be a bit simpler.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 May 2008 22:07:24 GMT</pubDate>
    <dc:creator>CompilerGuru</dc:creator>
    <dc:date>2008-05-02T22:07:24Z</dc:date>
    <item>
      <title>beekit and floating point math?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/beekit-and-floating-point-math/m-p/152636#M8406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using beekit 1.6.0 and codewarrior 5.9.0 with the freescale MC13213SRB demo board.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When i export the wireless uart example from Beekit and then import it into codewarrior and try to add floating point arithmetic like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned int setValue( float f) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f=f+1.0; //add 1 to float&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I get a linker error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;L1822: Symbol _FADD_RC ... is undefined&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And then the project fails to compile.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas how to fix this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks so much,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Heather&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 01:00:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/beekit-and-floating-point-math/m-p/152636#M8406</guid>
      <dc:creator>hdeweyh</dc:creator>
      <dc:date>2008-05-02T01:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: beekit and floating point math?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/beekit-and-floating-point-math/m-p/152637#M8407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello Heather,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;When you first create the Codewarrior project using the wizard, you need to indicate that you require floating point support within the project.&amp;nbsp; This will ensure that the correct libraries are linked.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Keep in mind that the use of floating point will require significant MCU resources, and its use may be&amp;nbsp;governed on the resources required by the Beekit code.&amp;nbsp; In many cases, it is possible to avoid the&amp;nbsp;requirement of floating point operations, with careful use of integer calculations.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Mac&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 07:41:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/beekit-and-floating-point-math/m-p/152637#M8407</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2008-05-02T07:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: beekit and floating point math?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/beekit-and-floating-point-math/m-p/152638#M8408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;The Beekit does not utilize the Codewarrior projec wizard, so you can not follow that approach.&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;If you must use the Float format, then you must replace the ansiis.lib with e.g. The anisfs.lib which will include the functions needed for using the "float" and double variable type.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;The codewarrior help clearly specifies what features the different libs support (seach for ansi library reference)&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;It is common knowledge that using floating point in small CPU's is a very bad idea as it takes up too much code space.&lt;BR /&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Therefor it is easier to use real numbers and then scale you input if possible.&lt;BR /&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Br,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mads&lt;/FONT&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 14:17:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/beekit-and-floating-point-math/m-p/152638#M8408</guid>
      <dc:creator>Mads</dc:creator>
      <dc:date>2008-05-02T14:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: beekit and floating point math?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/beekit-and-floating-point-math/m-p/152639#M8409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Thank you both for your suggestions. A question: I found a work around for this problem by including the file rtshc08.c in my project as this file conatined the missing defintion. is this a problematic approach?&lt;BR /&gt;&lt;BR /&gt;Thank you again,&lt;BR /&gt;Heather&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 21:18:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/beekit-and-floating-point-math/m-p/152639#M8409</guid>
      <dc:creator>hdeweyh</dc:creator>
      <dc:date>2008-05-02T21:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: beekit and floating point math?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/beekit-and-floating-point-math/m-p/152640#M8410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;That works fine, just make sure the rtshc08.c is in the link order before the ansi library,&lt;BR /&gt;as the ansi library contains the same file too just compiler with different options.&lt;BR /&gt;One difference of this approach to use the floating point ansi library is that this way, sprintf and others wont support "%f"/float/double and that can be a&amp;nbsp; real space safer in case you use those routines but not with floats. Otherwise using the ansi library may just be a bit simpler.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2008 22:07:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/beekit-and-floating-point-math/m-p/152640#M8410</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2008-05-02T22:07:24Z</dc:date>
    </item>
  </channel>
</rss>

