<?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 Re: printf/sprintf width and precision in CodeWarrior for QorIQ</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/printf-sprintf-width-and-precision/m-p/149415#M1656</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Well,&lt;BR /&gt;&lt;BR /&gt;I tried your printf files, and the compiler complains about trying to overload the std:&lt;IMG alt=":smileytongue:" class="emoticon emoticon-smileytongue" id="smileytongue" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-tongue.gif" title="Smiley Tongue" /&gt;rintf routines (amoung others). So I gave that up and decided to optimize the libraries myself, which seems to work except then it complains that the set_printf routine the is in tiny IO (and used with console IO) is not available.&lt;BR /&gt;&lt;BR /&gt;I feel like I can't win for trying here.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Feb 2009 21:02:58 GMT</pubDate>
    <dc:creator>Adam</dc:creator>
    <dc:date>2009-02-16T21:02:58Z</dc:date>
    <item>
      <title>printf/sprintf width and precision</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/printf-sprintf-width-and-precision/m-p/149413#M1654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a custom project that we took from CW 6.0 to CW 7.1.1 recently.&amp;nbsp; We moved to the C_4i_CF_SZ_MSL.a and C++_4i_CF_SZ_MSL.a libraries because using the non-SZ libraries increased our flash ROM size by nearly 1MB (up from 1.2mb).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But in doing so, it appears that printf and sprintf, when using %2.2d, %*d, etc seems to ignore the width and prescision parameters.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sprintf(tmp, "%.2d.%2.2d.%*2d", event, event, event);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Would yield the string tmp looking like&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2d.2d.2d&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It appears that . and * are not valid now even though the help files seem to indicate they should be.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I trace the code and it goes into printf_tiny_io.c.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any opinions?&amp;nbsp; Or anyone know why the stock libraries to link in changed so drastically between CW 6.0 and CW 7.1.1?&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Feb 2009 04:47:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/printf-sprintf-width-and-precision/m-p/149413#M1654</guid>
      <dc:creator>Adam</dc:creator>
      <dc:date>2009-02-05T04:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: printf/sprintf width and precision</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/printf-sprintf-width-and-precision/m-p/149414#M1655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;See:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;A href="http://forums.freescale.com/freescale/board/message?board.id=CWCFCOMM&amp;amp;message.id=2281&amp;amp;query.id=4110#M2281" target="_blank"&gt;http://forums.freescale.com/freescale/board/message?board.id=CWCFCOMM&amp;amp;message.id=2281&amp;amp;query.id=4110#M2281&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I think that has all your answers -- the SZ libraries prune out as much functionality as possible to reduce their size...&amp;nbsp; Sometimes you have to prune some of it back in. :smileyhappy:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;-- Rich&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Feb 2009 05:11:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/printf-sprintf-width-and-precision/m-p/149414#M1655</guid>
      <dc:creator>RichTestardi</dc:creator>
      <dc:date>2009-02-05T05:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: printf/sprintf width and precision</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/printf-sprintf-width-and-precision/m-p/149415#M1656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Well,&lt;BR /&gt;&lt;BR /&gt;I tried your printf files, and the compiler complains about trying to overload the std:&lt;IMG alt=":smileytongue:" class="emoticon emoticon-smileytongue" id="smileytongue" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-tongue.gif" title="Smiley Tongue" /&gt;rintf routines (amoung others). So I gave that up and decided to optimize the libraries myself, which seems to work except then it complains that the set_printf routine the is in tiny IO (and used with console IO) is not available.&lt;BR /&gt;&lt;BR /&gt;I feel like I can't win for trying here.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Feb 2009 21:02:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/printf-sprintf-width-and-precision/m-p/149415#M1656</guid>
      <dc:creator>Adam</dc:creator>
      <dc:date>2009-02-16T21:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: printf/sprintf width and precision</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/printf-sprintf-width-and-precision/m-p/149416#M1657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Again, finally got it with some linker work, so, that appears to be the easiest solution (using custom functions for specific ones we need) rather than customizing libraries and trying to get everyone to use the right ones.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Feb 2009 00:56:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-QorIQ/printf-sprintf-width-and-precision/m-p/149416#M1657</guid>
      <dc:creator>Adam</dc:creator>
      <dc:date>2009-02-17T00:56:32Z</dc:date>
    </item>
  </channel>
</rss>

