<?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>MCUXpresso IDEのトピックRe: sprintf not functioning correctly</title>
    <link>https://community.nxp.com/t5/MCUXpresso-IDE/sprintf-not-functioning-correctly/m-p/934243#M4307</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This seems to have solved the issue, thank you.&amp;nbsp; I additionally found that it works using the NewLibNano library and selecting enable printf float and enable scanf float in the Managed Linker Script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Jul 2019 13:13:56 GMT</pubDate>
    <dc:creator>christopher_hes</dc:creator>
    <dc:date>2019-07-18T13:13:56Z</dc:date>
    <item>
      <title>sprintf not functioning correctly</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/sprintf-not-functioning-correctly/m-p/934239#M4303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-weight: 200; font-size: 12.96px;"&gt;I am working on a project in MCUXpresso that was originally written in code warrior. I am having difficulty using a sprintf() function and the problem seems to be with MCUXpresso. I have checked that I am using the original compiler and I am using the Redlib semihost&amp;nbsp;C library.&amp;nbsp; Below is the code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-weight: 200; font-size: 12.96px;"&gt;char tString[50];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-weight: 200; font-size: 12.96px;"&gt;float current = 1.2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-weight: 200; font-size: 12.96px;"&gt;sprintf(tString, "%3.0f",current);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; background-color: #ffffff; font-weight: 200; font-size: 12.96px;"&gt;After stepping through this code, the first three entries of tString are&amp;nbsp;32 ' '.&amp;nbsp; What could be causing&amp;nbsp;this issue?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2019 16:48:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/sprintf-not-functioning-correctly/m-p/934239#M4303</guid>
      <dc:creator>christopher_hes</dc:creator>
      <dc:date>2019-07-17T16:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: sprintf not functioning correctly</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/sprintf-not-functioning-correctly/m-p/934240#M4304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you using RedLib (the default)?&lt;/P&gt;&lt;P&gt;If yes, see &lt;A href="https://community.nxp.com/docs/DOC-342727"&gt;https://community.nxp.com/docs/DOC-342727&lt;/A&gt;&amp;nbsp;&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>Wed, 17 Jul 2019 18:47:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/sprintf-not-functioning-correctly/m-p/934240#M4304</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2019-07-17T18:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: sprintf not functioning correctly</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/sprintf-not-functioning-correctly/m-p/934241#M4305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using RedLib,&amp;nbsp; I followed the instructions in the article you have referenced and when I opened that window the only directive from the article was PRINTF_FLOAT_ENABLE=0.&amp;nbsp; I modified the directives as seen below and this has still not solved the issue.&amp;nbsp; Additionally, I have included a snip of the tString after sprintf is called.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/81763iB638A7D921EED576/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&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/82956iA311869DBF5F30D2/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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2019 19:17:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/sprintf-not-functioning-correctly/m-p/934241#M4305</guid>
      <dc:creator>christopher_hes</dc:creator>
      <dc:date>2019-07-17T19:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: sprintf not functioning correctly</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/sprintf-not-functioning-correctly/m-p/934242#M4306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see you still have that CR_INTEGER_PRINTF in the list of defines. Remove it.&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>Thu, 18 Jul 2019 04:40:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/sprintf-not-functioning-correctly/m-p/934242#M4306</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2019-07-18T04:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: sprintf not functioning correctly</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/sprintf-not-functioning-correctly/m-p/934243#M4307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This seems to have solved the issue, thank you.&amp;nbsp; I additionally found that it works using the NewLibNano library and selecting enable printf float and enable scanf float in the Managed Linker Script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jul 2019 13:13:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/sprintf-not-functioning-correctly/m-p/934243#M4307</guid>
      <dc:creator>christopher_hes</dc:creator>
      <dc:date>2019-07-18T13:13:56Z</dc:date>
    </item>
  </channel>
</rss>

