<?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 Software Development KitのトピックRe: printf() with float values</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/printf-with-float-values/m-p/381458#M984</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A easyer way is:&lt;/P&gt;&lt;P&gt;Under Project Settings -&amp;gt; C/C++ Build -&amp;gt; Settings -&amp;gt; Tool Settings -&amp;gt; Miscellaneous&lt;/P&gt;&lt;P&gt;enable the Checkbox: "Use float with nano printf".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Sep 2015 14:28:02 GMT</pubDate>
    <dc:creator>dorianhildebran</dc:creator>
    <dc:date>2015-09-10T14:28:02Z</dc:date>
    <item>
      <title>printf() with float values</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/printf-with-float-values/m-p/381452#M978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using KSDK 1.1.0 with MQX and Processor Expert. Using printf() usually works fine, but I cannot make printf to print float/double values. For the code&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;float val = 1.234;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;printf("Value = %f unit\n", val);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;the output is&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Value = f&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I guess the reason is because printf() does not support float with the default KSDK settings for MQX, so I added&amp;nbsp; "#define MQX_INCLUDE_FLOATING_POINT_IO 1" to mqx_sdk_config.h but the behavior is still the same.&lt;/P&gt;&lt;P&gt;Any hints what I am doing wrong?&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;Matthias&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2015 13:53:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/printf-with-float-values/m-p/381452#M978</guid>
      <dc:creator>matthias</dc:creator>
      <dc:date>2015-02-17T13:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: printf() with float values</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/printf-with-float-values/m-p/381453#M979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matthias,&lt;/P&gt;&lt;P&gt;are you using KDS/GNU libraries? If so, have you added&lt;/P&gt;&lt;P&gt;-u _printf_float&lt;/P&gt;&lt;P&gt;to the linker options?&lt;/P&gt;&lt;P&gt;(see &lt;A href="http://mcuoneclipse.com/2014/07/11/printf-and-scanf-with-gnu-arm-libraries/" title="http://mcuoneclipse.com/2014/07/11/printf-and-scanf-with-gnu-arm-libraries/"&gt;printf() and scanf() with GNU ARM Libraries | MCU on Eclipse&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2015 14:29:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/printf-with-float-values/m-p/381453#M979</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2015-02-17T14:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: printf() with float values</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/printf-with-float-values/m-p/381454#M980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Erich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for the quick reply. I am using&amp;nbsp; the MQX libraries that are included in KSDK. I have seen your post on mcuoneclipse.com (which helped me many times before :-)) and I have tried -u _printf_float in the linker options without success (I guess this option does not apply for KSDK libraries). I think the problem lies somewhere in the configuration of the KSDK/MQX libraries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Matthias&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2015 14:45:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/printf-with-float-values/m-p/381454#M980</guid>
      <dc:creator>matthias</dc:creator>
      <dc:date>2015-02-17T14:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: printf() with float values</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/printf-with-float-values/m-p/381455#M981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found a soultion now, but I am not very comfortable with it yet:&lt;/P&gt;&lt;P&gt;In the KSDK source code, there is a file "std_prv.h" where STD_FP_IO is defined. Setting this define to "1", printf() works with float. But as said, I am not comfortable with changing a file in the KSDK source code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2015 16:00:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/printf-with-float-values/m-p/381455#M981</guid>
      <dc:creator>matthias</dc:creator>
      <dc:date>2015-02-17T16:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: Re: printf() with float values</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/printf-with-float-values/m-p/381456#M982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matthias,&lt;/P&gt;&lt;P&gt;I have reproduced your finding and have submitted a trouble ticket to our MQX KSDK team.&lt;/P&gt;&lt;P&gt;Documentation should be updated and we should have a master location to define the STD_FP_IO option/capability.&lt;/P&gt;&lt;P&gt;My workaround...&lt;/P&gt;&lt;P&gt;Change std_prv.h to following:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;#ifndef STD_FP_IO&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;//DES added #ifndef&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;#define STD_FP_IO 0&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;#endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And in the project Properties...add Defined for "STD_FP_IO=1":&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="ScreenHunter_111 Feb. 17 11.17.gif"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/50577iB0599FA25AFF85BA/image-size/large?v=v2&amp;amp;px=999" role="button" title="ScreenHunter_111 Feb. 17 11.17.gif" alt="ScreenHunter_111 Feb. 17 11.17.gif" /&gt;&lt;/span&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, 17 Feb 2015 17:20:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/printf-with-float-values/m-p/381456#M982</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2015-02-17T17:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: printf() with float values</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/printf-with-float-values/m-p/381457#M983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just thought I'd add my $0.02 worth for anybody else in this situation. I'm using KSDK 1.2.0 with Processor Expert in KDS 3.0 to create code to be built with IAR Embedded Workbench. I've added the MQX component to my project and chosen the standard MQX instead of MQX Lite. I found that the right place to put the define for STD_FP_IO = 1 is in the Component Inspector for MQX, in the User settings Definitions dialog:&lt;/P&gt;&lt;P&gt;&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/23489i635F19C1B193D58C/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;&lt;/P&gt;&lt;P&gt;Also be sure to make the change to std_prv.h in the KDS project. If you change any of the generated files outside the Processor Expert environment (i.e. you edit them in IAR Workbench) you'll get errors from Processor Expert the next time you try to generate code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 May 2015 23:20:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/printf-with-float-values/m-p/381457#M983</guid>
      <dc:creator>rogerchaplin</dc:creator>
      <dc:date>2015-05-31T23:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: printf() with float values</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/printf-with-float-values/m-p/381458#M984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A easyer way is:&lt;/P&gt;&lt;P&gt;Under Project Settings -&amp;gt; C/C++ Build -&amp;gt; Settings -&amp;gt; Tool Settings -&amp;gt; Miscellaneous&lt;/P&gt;&lt;P&gt;enable the Checkbox: "Use float with nano printf".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 14:28:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/printf-with-float-values/m-p/381458#M984</guid>
      <dc:creator>dorianhildebran</dc:creator>
      <dc:date>2015-09-10T14:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: printf() with float values</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/printf-with-float-values/m-p/381459#M985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I am getting same float printing problem in kinetis design studio 3.0.0 how to solve this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Dec 2015 09:16:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/printf-with-float-values/m-p/381459#M985</guid>
      <dc:creator>syedidris</dc:creator>
      <dc:date>2015-12-03T09:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: printf() with float values</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/printf-with-float-values/m-p/381460#M986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just tried this - went to mqx_stdlib_Source/include/std_prv.h and set "#define STD_FP_IO 1"&amp;nbsp; (I'll do the ifndef once this works).&lt;/P&gt;&lt;P&gt;I recompiled the KSDK libraries: mqx_stdlib_frdmk64f, ksdk_mqx_lib, ksdk_platform_lib_K64F12, and mqx_frdmk64f&amp;nbsp; and did a simple printf w/ floating point.&lt;/P&gt;&lt;P&gt;I get MQX_UNHANDLED_INTERRUPT (0x0041) exception. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Setting it back to 0, printf works as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;-Raj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Dec 2015 01:08:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/printf-with-float-values/m-p/381460#M986</guid>
      <dc:creator>rajbatra</dc:creator>
      <dc:date>2015-12-24T01:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: printf() with float values</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/printf-with-float-values/m-p/381461#M987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Silly mistake - I was getting a stack over flow because stack size was set too small for printf floating point support. Once I increased stack, floating point printing worked. FYI, the &lt;SPAN style="font-weight: bold; font-size: 13px;"&gt;-u _printf_float&lt;/SPAN&gt; made no difference, just Matthias/David's comment to define STD_FP_IO to 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;-Raj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Dec 2015 21:43:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/printf-with-float-values/m-p/381461#M987</guid>
      <dc:creator>rajbatra</dc:creator>
      <dc:date>2015-12-28T21:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: printf() with float values</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/printf-with-float-values/m-p/381462#M988</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;&lt;/P&gt;&lt;P&gt;So is it applicable for CW 10.6 with MCU MKE06Z as well? I have posted similar question about printf(%f) at here&amp;nbsp;&lt;A href="https://community.nxp.com/thread/438758"&gt;https://community.nxp.com/thread/438758&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Nov 2016 02:53:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/printf-with-float-values/m-p/381462#M988</guid>
      <dc:creator>eyeow84</dc:creator>
      <dc:date>2016-11-24T02:53:28Z</dc:date>
    </item>
  </channel>
</rss>

