<?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: floating point math in hc08</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/floating-point-math-in-hc08/m-p/135599#M4086</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;For the number, its 1e4f, not 1ef4. Anyway, use 10000.0f, for me that's more readable than the scientific e notation.&lt;BR /&gt;&lt;BR /&gt;About the linking error, the actual problem is that your project is linking against the wrong ansi???.lib file.&lt;BR /&gt;Change your existing project to link the correct one, for example by deleting the wrong one out of your existing project and drag and drop the one from the dummy project.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;BR /&gt;BTW for HCS08, Small memory model, IEEE32, link against ansifs.lib.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 03 Jun 2007 03:10:13 GMT</pubDate>
    <dc:creator>CompilerGuru</dc:creator>
    <dc:date>2007-06-03T03:10:13Z</dc:date>
    <item>
      <title>floating point math in hc08</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/floating-point-math-in-hc08/m-p/135595#M4082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I am trying to perform this multiplication:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;dac_val = (float)*(Uart_ptr + 9) * 1e4;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;When I include 1e4 instead of 10000 I get errors:&lt;/DIV&gt;&lt;DIV&gt;symbol _dufloat undefined&lt;/DIV&gt;&lt;DIV&gt;symbol _dmul_rc undefined&lt;/DIV&gt;&lt;DIV&gt;symbol _dstrunc undefined&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;What should I include for this to work?&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jun 2007 09:32:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/floating-point-math-in-hc08/m-p/135595#M4082</guid>
      <dc:creator>steve_fae</dc:creator>
      <dc:date>2007-06-02T09:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: floating point math in hc08</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/floating-point-math-in-hc08/m-p/135596#M4083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Read the lib\hc08c\readme.txt.&lt;BR /&gt;&lt;BR /&gt;or you can create a new project with the wizard and pick the floating support you want, then adapt your project it uses the same setup.&lt;BR /&gt;&lt;BR /&gt;Basically the link time errors you get do show that you link against a library version with no floating point support.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;BR /&gt;BTW: I actually wonder if you try to use IEEE64 or IEEE32, I guess _dmul_rc is the IEEE64 bit multiplication. If you want IEEE32, use 1e4f (or 10000.0f), or set the double type to be 32 bit too in the settings (and pick the right library to reflect that)&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jun 2007 20:34:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/floating-point-math-in-hc08/m-p/135596#M4083</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2007-06-02T20:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: floating point math in hc08</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/floating-point-math-in-hc08/m-p/135597#M4084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thanks for the initial response.&amp;nbsp; I am also exploring the answer, but if I used PE initially, is there something I can do after the project has been built to include these libraries instead of creating a new project from scratch?&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jun 2007 22:08:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/floating-point-math-in-hc08/m-p/135597#M4084</guid>
      <dc:creator>steve_fae</dc:creator>
      <dc:date>2007-06-02T22:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: floating point math in hc08</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/floating-point-math-in-hc08/m-p/135598#M4085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Ok, I created a dummy project with 32/32 float added.&amp;nbsp; I copied the compiler setting from it for my project:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;-Cs08 -Ms -Fd&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;But trying either&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;int dac_val;&lt;/DIV&gt;&lt;DIV&gt;byte * Uart_ptr;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;dac_val = (float)*(Uart_ptr + 9) * 1e4;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;gives&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;_FUFLOAT undefined&lt;/DIV&gt;&lt;DIV&gt;_FMUL_RC undefined&lt;/DIV&gt;&lt;DIV&gt;_FSTRUNC undefined&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;dac_val = (float)*(Uart_ptr + 9) * 1ef4; creates illegal floating point exponent&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jun 2007 22:31:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/floating-point-math-in-hc08/m-p/135598#M4085</guid>
      <dc:creator>steve_fae</dc:creator>
      <dc:date>2007-06-02T22:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: floating point math in hc08</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/floating-point-math-in-hc08/m-p/135599#M4086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;For the number, its 1e4f, not 1ef4. Anyway, use 10000.0f, for me that's more readable than the scientific e notation.&lt;BR /&gt;&lt;BR /&gt;About the linking error, the actual problem is that your project is linking against the wrong ansi???.lib file.&lt;BR /&gt;Change your existing project to link the correct one, for example by deleting the wrong one out of your existing project and drag and drop the one from the dummy project.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;BR /&gt;BTW for HCS08, Small memory model, IEEE32, link against ansifs.lib.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jun 2007 03:10:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/floating-point-math-in-hc08/m-p/135599#M4086</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2007-06-03T03:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: floating point math in hc08</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/floating-point-math-in-hc08/m-p/135600#M4087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thanks Danny,&lt;/DIV&gt;&lt;DIV&gt;Removing ansiis.lib and adding in ansifs.lib&amp;nbsp;fixed the errors and I looked at the disassembly code to make sure that it found what it needed.&amp;nbsp; I really love to use PE but wow, it really makes you lame when you run into problems like this.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Oh yes, using 1e4f didn't matter.&amp;nbsp; 1e4 created the same assembly code.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;S&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jun 2007 09:06:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/floating-point-math-in-hc08/m-p/135600#M4087</guid>
      <dc:creator>steve_fae</dc:creator>
      <dc:date>2007-06-03T09:06:48Z</dc:date>
    </item>
  </channel>
</rss>

