<?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: Trying to use sprintf() with KDS</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Trying-to-use-sprintf-with-KDS/m-p/342602#M1017</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;the problem is that sprintf() requires a heap for the newlib-nano implementation of that particular version of newlib-nano included in KDS.&lt;/P&gt;&lt;P&gt;This is already mentioned in the release notes (not particularly in the context of sprintf(), but obviously this applies for this case too).&lt;/P&gt;&lt;P&gt;I see that you are using a Processor Expert project, so increase the heap size to at least 0x400 (see below, and see &lt;A href="http://mcuoneclipse.com/2014/06/20/switching-between-tabs-and-no-tabs-ui-in-processor-expert/" title="http://mcuoneclipse.com/2014/06/20/switching-between-tabs-and-no-tabs-ui-in-processor-expert/"&gt;Switching between ‘tabs’ and ‘no-tabs’ UI in Processor Expert | MCU on Eclipse&lt;/A&gt; if you want the same view).&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/45481i38665694B55FD0F5/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;As a reference, I have attached my test project, where I was able to reproduce your problem with a heap size of zero, and then it worked when I increased the heap for the newlib-nano.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this clarifies the problem, and with this you can solve it.&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Aug 2014 20:10:17 GMT</pubDate>
    <dc:creator>BlackNight</dc:creator>
    <dc:date>2014-08-07T20:10:17Z</dc:date>
    <item>
      <title>Trying to use sprintf() with KDS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Trying-to-use-sprintf-with-KDS/m-p/342601#M1016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;i just installed KDS v1.1 and trying to use sprintf() with floating point numbers on the Freedom KL25z board. I added the -u _printf_float to the linker flags but when i try to debug my program stops. I am a newb to this stuff and have been reading as much as i can to try to fix it but am at a loss.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is a screenshot from the debugger&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 14:38:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Trying-to-use-sprintf-with-KDS/m-p/342601#M1016</guid>
      <dc:creator>chrissorrentino</dc:creator>
      <dc:date>2014-08-07T14:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to use sprintf() with KDS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Trying-to-use-sprintf-with-KDS/m-p/342602#M1017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;the problem is that sprintf() requires a heap for the newlib-nano implementation of that particular version of newlib-nano included in KDS.&lt;/P&gt;&lt;P&gt;This is already mentioned in the release notes (not particularly in the context of sprintf(), but obviously this applies for this case too).&lt;/P&gt;&lt;P&gt;I see that you are using a Processor Expert project, so increase the heap size to at least 0x400 (see below, and see &lt;A href="http://mcuoneclipse.com/2014/06/20/switching-between-tabs-and-no-tabs-ui-in-processor-expert/" title="http://mcuoneclipse.com/2014/06/20/switching-between-tabs-and-no-tabs-ui-in-processor-expert/"&gt;Switching between ‘tabs’ and ‘no-tabs’ UI in Processor Expert | MCU on Eclipse&lt;/A&gt; if you want the same view).&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/45481i38665694B55FD0F5/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;As a reference, I have attached my test project, where I was able to reproduce your problem with a heap size of zero, and then it worked when I increased the heap for the newlib-nano.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this clarifies the problem, and with this you can solve it.&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2014 20:10:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Trying-to-use-sprintf-with-KDS/m-p/342602#M1017</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2014-08-07T20:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to use sprintf() with KDS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Trying-to-use-sprintf-with-KDS/m-p/342603#M1018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, i did read about changing the heap setting and i thought i did so. i went back and did it again and it works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2014 16:25:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Trying-to-use-sprintf-with-KDS/m-p/342603#M1018</guid>
      <dc:creator>chrissorrentino</dc:creator>
      <dc:date>2014-08-08T16:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to use sprintf() with KDS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Trying-to-use-sprintf-with-KDS/m-p/342604#M1019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning Chris &amp;amp; Erich.&lt;/P&gt;&lt;P&gt;And if you don't use PE ? How it's possible to fix it ?&lt;/P&gt;&lt;P&gt;With an integer number sprintf works perfectly. With float or double it returns "" and no coversion is done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;Claudio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 16:22:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Trying-to-use-sprintf-with-KDS/m-p/342604#M1019</guid>
      <dc:creator>ciful</dc:creator>
      <dc:date>2015-01-07T16:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to use sprintf() with KDS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Trying-to-use-sprintf-with-KDS/m-p/342605#M1020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Claudio,&lt;/P&gt;&lt;P&gt;see &lt;A class="generated-link" data-jive-statusinputadd="true" data-jive-truncation-flag="true" href="http://mcuoneclipse.com/2014/07/11/printf-and-scanf-with-gnu-arm-libraries/"&gt;printf() and scanf() with GNU ARM Libraries | MCU...&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You need to add &lt;/P&gt;&lt;P&gt; -u _printf_float&lt;/P&gt;&lt;P&gt;to the linker options to enable float/double support to printf/sprintf()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 15:09:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Trying-to-use-sprintf-with-KDS/m-p/342605#M1020</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2015-01-08T15:09:23Z</dc:date>
    </item>
  </channel>
</rss>

