<?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: floating to fraction  in CodeWarrior Development Tools</title>
    <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/floating-to-fraction/m-p/464361#M3523</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Fast service&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls check attached Proj.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Thanks your kindly service&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;……………………………………&lt;/P&gt;&lt;P&gt;Joseph Ahn(안연수)&lt;/P&gt;&lt;P&gt;Assistant Software Design Manager&lt;/P&gt;&lt;P&gt;Avnet Electronic Marketing.&lt;/P&gt;&lt;P&gt;Joseph.ahn@avnet.com&amp;lt;mailto:Joseph.ahn@avnet.com&amp;gt;&lt;/P&gt;&lt;P&gt;……………………………………&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;12th Floor, KBS Media Center, Maebongsan-ro 45 (Sangam-dong),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mapo-gu, Seoul, 121-915, Korea&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Direct:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;82-2-6277-6395&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fax:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;82-2-761-2133&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Jan 2016 08:38:32 GMT</pubDate>
    <dc:creator>ahnjoseph</dc:creator>
    <dc:date>2016-01-26T08:38:32Z</dc:date>
    <item>
      <title>floating to fraction</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/floating-to-fraction/m-p/464359#M3521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;MCU : s12zvl&lt;/P&gt;&lt;P&gt;CW:&amp;nbsp; 10.6&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I need to convert a floating point variable ram to fraction value for Using Fraction Lib &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; float f_t1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; tFrac16 test_frac1,test_frac2&amp;nbsp; ;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; f_t1=0.5;&lt;/P&gt;&lt;P&gt;&amp;nbsp; test_frac1 = FRAC16(0.5); // &amp;lt;--- O.K&lt;/P&gt;&lt;P&gt;&amp;nbsp; test_frac1 = FRAC16(f_t1) ; // Compile Err&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; How can i do ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jan 2016 06:44:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/floating-to-fraction/m-p/464359#M3521</guid>
      <dc:creator>ahnjoseph</dc:creator>
      <dc:date>2016-01-26T06:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: floating to fraction</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/floating-to-fraction/m-p/464360#M3522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ahn,&lt;/P&gt;&lt;P&gt;what error message do you have? can you please send a screenshot of it?&lt;/P&gt;&lt;P&gt;to solve the problem faster, can you please send your demo project here thus i can work on your issue directly. thanks!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Jennie Zhang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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>Tue, 26 Jan 2016 08:02:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/floating-to-fraction/m-p/464360#M3522</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2016-01-26T08:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: floating to fraction</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/floating-to-fraction/m-p/464361#M3523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Fast service&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls check attached Proj.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Thanks your kindly service&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;……………………………………&lt;/P&gt;&lt;P&gt;Joseph Ahn(안연수)&lt;/P&gt;&lt;P&gt;Assistant Software Design Manager&lt;/P&gt;&lt;P&gt;Avnet Electronic Marketing.&lt;/P&gt;&lt;P&gt;Joseph.ahn@avnet.com&amp;lt;mailto:Joseph.ahn@avnet.com&amp;gt;&lt;/P&gt;&lt;P&gt;……………………………………&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;12th Floor, KBS Media Center, Maebongsan-ro 45 (Sangam-dong),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mapo-gu, Seoul, 121-915, Korea&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Direct:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;82-2-6277-6395&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fax:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;82-2-761-2133&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jan 2016 08:38:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/floating-to-fraction/m-p/464361#M3523</guid>
      <dc:creator>ahnjoseph</dc:creator>
      <dc:date>2016-01-26T08:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: floating to fraction</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/floating-to-fraction/m-p/464362#M3524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ahn&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;Please choose the floating Point Library instead. Please open the Project Properties from ‘Project’ menu-&amp;gt; Properties. Then go to C/C++ Build-&amp;gt; Settings, under &amp;lt;Tool Settings&amp;gt; tab, go to S12Z Linker-&amp;gt;Input,&amp;nbsp; please replace :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;"${MCUToolsBaseDir}/S12lisa_Support/s12lisac/lib_small/ansii.lib"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;With:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;"${MCUToolsBaseDir}/S12lisa_Support/s12lisac/lib_small/ansif.lib" &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="lib.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/23469i4A37FAF4DA8E2BB3/image-size/large?v=v2&amp;amp;px=999" role="button" title="lib.png" alt="lib.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;I also attached a simple example project for using FRAC16 macro. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;Fiona Kuang&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;Technical Information &amp;amp; Commercial Support&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Arial','sans-serif';"&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jan 2016 04:28:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/floating-to-fraction/m-p/464362#M3524</guid>
      <dc:creator>TICS_Fiona</dc:creator>
      <dc:date>2016-01-27T04:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: floating to fraction</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/floating-to-fraction/m-p/464363#M3525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ahn,&lt;/P&gt;&lt;P&gt;I built your project from my side, I got error message:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/23530i1856B9243D956623/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;this is because symbols such as __fcmp are supported in floating library only. while this project&lt;STRONG&gt; use integer library ansii.lib which doesn't support symbols.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So Fiona is correct, change ansii.lib(c_no_float support library) to ansif.lib(c_float support library) can correct the problem.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/2105iD7E2D293EC878BCB/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for HCS12z library usage of, see below:&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/2068i122FC3ED0A5FFFA1/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;my modified project is attached.&lt;/P&gt;&lt;P&gt;can this help you?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Jennie Zhang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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, 27 Jan 2016 05:43:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/floating-to-fraction/m-p/464363#M3525</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2016-01-27T05:43:55Z</dc:date>
    </item>
  </channel>
</rss>

