<?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>Kinetis Design Studio中的主题 Re: PRINTING FLOAT</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/PRINTING-FLOAT/m-p/480497#M5451</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Koorosh,&lt;/P&gt;&lt;P&gt;Please review these posts:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/342693"&gt;printf() with float values&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/382606"&gt;float printing error in PE&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/338464"&gt;Floating Point on KDS&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Mar 2016 18:48:02 GMT</pubDate>
    <dc:creator>DavidS</dc:creator>
    <dc:date>2016-03-15T18:48:02Z</dc:date>
    <item>
      <title>PRINTING FLOAT</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/PRINTING-FLOAT/m-p/480496#M5450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;My target is TWR-K54F10M and I'm using KSDK1.2 and KSDK1.3 and DSK3.0.&lt;/P&gt;&lt;P&gt;I'm not able to print float values using PRINTF macro(debug_printf).&lt;/P&gt;&lt;P&gt;I have turned on the switch -u&amp;nbsp; _printf_float&amp;nbsp; and it shows up in the linking phase of the build.&lt;/P&gt;&lt;P&gt;However It does not work.&lt;span class="lia-inline-image-display-wrapper" image-alt="144154_144154.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/121176i82966CBB309AC202/image-size/large?v=v2&amp;amp;px=999" role="button" title="144154_144154.PNG" alt="144154_144154.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="prppert_capture.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/23521i839660B35C328264/image-size/large?v=v2&amp;amp;px=999" role="button" title="prppert_capture.PNG" alt="prppert_capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would appreciate your help.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Koorosh Hajiani&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2016 18:27:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/PRINTING-FLOAT/m-p/480496#M5450</guid>
      <dc:creator>kooroshhajiani</dc:creator>
      <dc:date>2016-03-15T18:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: PRINTING FLOAT</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/PRINTING-FLOAT/m-p/480497#M5451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Koorosh,&lt;/P&gt;&lt;P&gt;Please review these posts:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/342693"&gt;printf() with float values&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/382606"&gt;float printing error in PE&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/338464"&gt;Floating Point on KDS&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2016 18:48:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/PRINTING-FLOAT/m-p/480497#M5451</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2016-03-15T18:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: PRINTING FLOAT</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/PRINTING-FLOAT/m-p/480498#M5452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found out you need to define&amp;nbsp; a macro in Build setting:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="property_Capture.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/23178iA7A04A7B909413B2/image-size/large?v=v2&amp;amp;px=999" role="button" title="property_Capture.PNG" alt="property_Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now however I'm having issues with using sprintf&amp;nbsp; with floats.&lt;/P&gt;&lt;P&gt;Any Ideas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Koorosh Hajiani &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2016 19:06:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/PRINTING-FLOAT/m-p/480498#M5452</guid>
      <dc:creator>kooroshhajiani</dc:creator>
      <dc:date>2016-03-15T19:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: PRINTING FLOAT</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/PRINTING-FLOAT/m-p/480499#M5453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please also add the "SCANF_FLOAT_ENABLE" as you did with the "PRINTF_FLOAT_ENABLE".&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2016 19:11:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/PRINTING-FLOAT/m-p/480499#M5453</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2016-03-15T19:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: PRINTING FLOAT</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/PRINTING-FLOAT/m-p/480500#M5454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks much. Printf issue is resolved by the solution proposed by Jennie Zhang in the post you provided.&lt;/P&gt;&lt;P&gt;However now I'm having issue with sprintf : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;sprintf(out_buff,&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: 10pt;"&gt;"%f"&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;, flt_val);&lt;/STRONG&gt; with the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;char out_buff[50]; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;float flt_val;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;when I look at out_buff using debugger it is all zeros with flt_val displaying a float as I expect it to.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Can't figure this one out. Is this the GCC arm or KDS.I've used GCC ARM before and never had any issues.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I need to covert a float number to string and I always used sprintf for this purpose successfully until now.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Any ideas?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Koorosh Hajiani&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2016 19:37:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/PRINTING-FLOAT/m-p/480500#M5454</guid>
      <dc:creator>kooroshhajiani</dc:creator>
      <dc:date>2016-03-15T19:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: PRINTING FLOAT</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/PRINTING-FLOAT/m-p/480501#M5455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;Regarding the sprintf not working with float, I noticed that in one of your posts regarding this issue that&amp;nbsp; &lt;STRONG&gt;-u _printf_float&lt;/STRONG&gt; switch under the Linker Miscellaneous option , needs to be checked.&lt;/P&gt;&lt;P&gt;When I do this my code hits a trap when it tries to execute sprintf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So without that option I get all zeros and with those option turned on ,I hit a trap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Koorosh Hajiani &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2016 20:53:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/PRINTING-FLOAT/m-p/480501#M5455</guid>
      <dc:creator>kooroshhajiani</dc:creator>
      <dc:date>2016-03-15T20:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: PRINTING FLOAT</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/PRINTING-FLOAT/m-p/480502#M5456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Koorosh,&lt;/P&gt;&lt;P&gt;You do want the -u _printf_float and -u _scanf_float checked.&lt;/P&gt;&lt;P&gt;Try increasing your task stack size.&lt;/P&gt;&lt;P&gt;If still having issue please post your project.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Mar 2016 14:47:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/PRINTING-FLOAT/m-p/480502#M5456</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2016-03-16T14:47:39Z</dc:date>
    </item>
  </channel>
</rss>

