<?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>CodeWarrior for MCUのトピックProblems trying to use sprintf</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Problems-trying-to-use-sprintf/m-p/439554#M11947</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello. I am using FRDM KE02 + CWIDE and Processor Expert. &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When trying to use fuctions such as strcpy of sprintf the program builds correctly, but de MCU gets stucked when reaching those functions. Obviously, I have included the libreries&lt;/P&gt;&lt;P&gt;#include &amp;lt;stdio.h&amp;gt; &lt;/P&gt;&lt;P&gt;#include &amp;lt;string.h&amp;gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For instance, this doesnt work:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="j-rte-table"&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style=""&gt;&lt;/TD&gt;&lt;TD style=""&gt;int h=33;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&lt;/TD&gt;&lt;TD style=""&gt;char str2;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&lt;/TD&gt;&lt;TD style=""&gt;sprintf(str2, "Value of N = %d",h);&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&lt;/TD&gt;&lt;TD style=""&gt;lcd_gotoxy(0,0);&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&lt;/TD&gt;&lt;TD style=""&gt;lcd_write_word(str2);&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&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, 23 Jul 2015 14:25:17 GMT</pubDate>
    <dc:creator>juanignaciotroi</dc:creator>
    <dc:date>2015-07-23T14:25:17Z</dc:date>
    <item>
      <title>Problems trying to use sprintf</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Problems-trying-to-use-sprintf/m-p/439554#M11947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello. I am using FRDM KE02 + CWIDE and Processor Expert. &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When trying to use fuctions such as strcpy of sprintf the program builds correctly, but de MCU gets stucked when reaching those functions. Obviously, I have included the libreries&lt;/P&gt;&lt;P&gt;#include &amp;lt;stdio.h&amp;gt; &lt;/P&gt;&lt;P&gt;#include &amp;lt;string.h&amp;gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For instance, this doesnt work:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="j-rte-table"&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style=""&gt;&lt;/TD&gt;&lt;TD style=""&gt;int h=33;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&lt;/TD&gt;&lt;TD style=""&gt;char str2;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&lt;/TD&gt;&lt;TD style=""&gt;sprintf(str2, "Value of N = %d",h);&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&lt;/TD&gt;&lt;TD style=""&gt;lcd_gotoxy(0,0);&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style=""&gt;&lt;/TD&gt;&lt;TD style=""&gt;lcd_write_word(str2);&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&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, 23 Jul 2015 14:25:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Problems-trying-to-use-sprintf/m-p/439554#M11947</guid>
      <dc:creator>juanignaciotroi</dc:creator>
      <dc:date>2015-07-23T14:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problems trying to use sprintf</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Problems-trying-to-use-sprintf/m-p/439555#M11948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have just solved it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2015 14:29:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Problems-trying-to-use-sprintf/m-p/439555#M11948</guid>
      <dc:creator>juanignaciotroi</dc:creator>
      <dc:date>2015-07-23T14:29:09Z</dc:date>
    </item>
  </channel>
</rss>

