<?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 Float value printing issue in PE in Kinetis Design Studio</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Float-value-printing-issue-in-PE/m-p/573647#M7313</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;BR /&gt;I know this issue is already discussed in another questions, but when I follow the steps to get float value I am unable to get that.&lt;BR /&gt;using KDS3.1.0 + PE&lt;/P&gt;&lt;P&gt;chip: KL03&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;there is nothing special in my code I am just writing&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;while(1)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; PRINTF("\r\n %f",1.234);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; OSA_TimeDelay(1000);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and it is giving me output as: &lt;STRONG&gt;f&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got&amp;nbsp;two solutions after reading previous questions.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;SOLUTION-1:&amp;nbsp;Adding symbol for float in Cross ARM C Compiler&amp;gt;&amp;gt;Preprocessor&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="160322_160322.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/122169i081981EFEF982609/image-size/large?v=v2&amp;amp;px=999" role="button" title="160322_160322.PNG" alt="160322_160322.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="flaot.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/4691i1A63C5B3B41D48A9/image-size/large?v=v2&amp;amp;px=999" role="button" title="flaot.PNG" alt="flaot.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;After adding this "PRINTF_FLOAT_ENABLE" symbol when I build my code, it is showing error as follows&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="160323_160323.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/122170i8EE576FA1620DED4/image-size/large?v=v2&amp;amp;px=999" role="button" title="160323_160323.PNG" alt="160323_160323.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="float2.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/4384i2CE6B539D4E91372/image-size/large?v=v2&amp;amp;px=999" role="button" title="float2.PNG" alt="float2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;SOLUTION-2:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;checking for "-u_printf_float" in Cross ARM C++ Linker&amp;gt;&amp;gt;Miscellaneous&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="160324_160324.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/122171i4851E47ABB073FA3/image-size/large?v=v2&amp;amp;px=999" role="button" title="160324_160324.PNG" alt="160324_160324.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="3.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/4746i939B3AC0E2A80010/image-size/large?v=v2&amp;amp;px=999" role="button" title="3.PNG" alt="3.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It is printing the output as &lt;STRONG&gt;'f'&amp;nbsp;&lt;/STRONG&gt;only.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am also attaching here my project file,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;why the float value is not getting printed?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338515"&gt;float_30082016.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Aug 2016 13:37:28 GMT</pubDate>
    <dc:creator>syed_idris</dc:creator>
    <dc:date>2016-08-30T13:37:28Z</dc:date>
    <item>
      <title>Float value printing issue in PE</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Float-value-printing-issue-in-PE/m-p/573647#M7313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;BR /&gt;I know this issue is already discussed in another questions, but when I follow the steps to get float value I am unable to get that.&lt;BR /&gt;using KDS3.1.0 + PE&lt;/P&gt;&lt;P&gt;chip: KL03&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;there is nothing special in my code I am just writing&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;while(1)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; PRINTF("\r\n %f",1.234);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; OSA_TimeDelay(1000);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and it is giving me output as: &lt;STRONG&gt;f&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got&amp;nbsp;two solutions after reading previous questions.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;SOLUTION-1:&amp;nbsp;Adding symbol for float in Cross ARM C Compiler&amp;gt;&amp;gt;Preprocessor&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="160322_160322.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/122169i081981EFEF982609/image-size/large?v=v2&amp;amp;px=999" role="button" title="160322_160322.PNG" alt="160322_160322.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="flaot.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/4691i1A63C5B3B41D48A9/image-size/large?v=v2&amp;amp;px=999" role="button" title="flaot.PNG" alt="flaot.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;After adding this "PRINTF_FLOAT_ENABLE" symbol when I build my code, it is showing error as follows&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="160323_160323.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/122170i8EE576FA1620DED4/image-size/large?v=v2&amp;amp;px=999" role="button" title="160323_160323.PNG" alt="160323_160323.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="float2.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/4384i2CE6B539D4E91372/image-size/large?v=v2&amp;amp;px=999" role="button" title="float2.PNG" alt="float2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;SOLUTION-2:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;checking for "-u_printf_float" in Cross ARM C++ Linker&amp;gt;&amp;gt;Miscellaneous&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="160324_160324.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/122171i4851E47ABB073FA3/image-size/large?v=v2&amp;amp;px=999" role="button" title="160324_160324.PNG" alt="160324_160324.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="3.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/4746i939B3AC0E2A80010/image-size/large?v=v2&amp;amp;px=999" role="button" title="3.PNG" alt="3.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It is printing the output as &lt;STRONG&gt;'f'&amp;nbsp;&lt;/STRONG&gt;only.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am also attaching here my project file,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;why the float value is not getting printed?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338515"&gt;float_30082016.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2016 13:37:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Float-value-printing-issue-in-PE/m-p/573647#M7313</guid>
      <dc:creator>syed_idris</dc:creator>
      <dc:date>2016-08-30T13:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: Float value printing issue in PE</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Float-value-printing-issue-in-PE/m-p/573648#M7314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Syed,&lt;/P&gt;&lt;P&gt;Attached is updated project that I got to work on my FRDM-KL03Z4 Freedom board to output floating point using printf as in your case #1 above.&lt;/P&gt;&lt;P&gt;I did have to change UART pinout to switch the RX/TX to make it work but I did not have the errors you indicate when I added the "PRINTF_FLOAT_ENABLE" to the Preprocessor Defined symbols. &amp;nbsp;Note I used "" around the define. &amp;nbsp;Your picture does not. &amp;nbsp;My would compile fine without it but maybe it makes a difference on your system...&lt;/P&gt;&lt;P&gt;I did alter your code to have OS_Task Component so that more tasks could be added to the PE project. &amp;nbsp;Just look for "//DES" to see where I made code changes.&lt;/P&gt;&lt;P&gt;My Terminal Output:&lt;/P&gt;&lt;P&gt;1.234000&lt;BR /&gt; 1.234000&lt;BR /&gt; 1.234000&lt;BR /&gt; 1.234000&lt;BR /&gt; 1.234000&lt;BR /&gt; 1.234000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS&lt;/P&gt;&lt;P&gt;Please make sure your KDS has had updates applied.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2016 18:34:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Float-value-printing-issue-in-PE/m-p/573648#M7314</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2016-08-30T18:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: Float value printing issue in PE</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Float-value-printing-issue-in-PE/m-p/573649#M7315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks David,&lt;BR /&gt;you are correct I forgot to use&amp;nbsp;Quotation marks &lt;STRONG&gt;" "&lt;/STRONG&gt;&amp;nbsp;while adding &lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;"PRINTF_FLOAT_ENABLE"&lt;/SPAN&gt;&amp;nbsp;to&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;the Preprocessor Defined symbols.&lt;BR /&gt;&lt;BR /&gt;Idris&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2016 10:41:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Float-value-printing-issue-in-PE/m-p/573649#M7315</guid>
      <dc:creator>syed_idris</dc:creator>
      <dc:date>2016-08-31T10:41:17Z</dc:date>
    </item>
  </channel>
</rss>

