<?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 cannot work with MQX？ in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/printf-cannot-work-with-MQX/m-p/260037#M7705</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abid,&lt;/P&gt;&lt;P&gt;Can you ZIP and post your project?&lt;/P&gt;&lt;P&gt;Are you using the Console I/O Component?&amp;nbsp; If yes, there should be no slowness.&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>Mon, 23 Mar 2015 21:16:04 GMT</pubDate>
    <dc:creator>DavidS</dc:creator>
    <dc:date>2015-03-23T21:16:04Z</dc:date>
    <item>
      <title>printf cannot work with MQX？</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/printf-cannot-work-with-MQX/m-p/260031#M7699</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 have a KL25Z board in my hand, when I use the console component in code warrior, I can use "printf" function to print log with serial port into PC com port.&lt;/P&gt;&lt;P&gt;But when I add the MQXLite and write printf in my code, I cannot get message on my PC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_13768085185002911 jive_macro_code" jivemacro_uid="_13768085185002911"&gt;
&lt;P&gt;void Task1_task(uint32_t task_init_data) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; int counter = 0;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LDD_TDeviceData *blueLed = Bit1_Init(NULL);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; bool ledVal = 1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; printf("count: %d\n", counter);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; while (1) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp; counter++;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; printf("count: %d\n", counter);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ledVal = !ledVal;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Bit1_PutVal(blueLed, ledVal);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; _time_delay_ticks(10);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; /* Write your code here ... */&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with these code, I can see my blue led blink, but I cannot get serial port message.&lt;/P&gt;&lt;P&gt;Why ?&lt;/P&gt;&lt;P&gt;Is there any where to set when using printf in MQX?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Aug 2013 06:50:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/printf-cannot-work-with-MQX/m-p/260031#M7699</guid>
      <dc:creator>zhangjay</dc:creator>
      <dc:date>2013-08-18T06:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: printf cannot work with MQX？</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/printf-cannot-work-with-MQX/m-p/260032#M7700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was ever able to print to the &lt;SPAN class="&amp;amp;quothighlight&amp;quot;"&gt;&lt;STRONG&gt;console&lt;/STRONG&gt;&lt;/SPAN&gt; in &lt;SPAN class="&amp;amp;quothighlight&amp;quot;"&gt;&lt;STRONG&gt;MQX&lt;/STRONG&gt;&lt;/SPAN&gt; and CW10.2 by doing the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To be able to output &lt;SPAN class="&amp;amp;quothighlight&amp;quot;"&gt;&lt;STRONG&gt;printf&lt;/STRONG&gt;&lt;/SPAN&gt; to the &lt;SPAN class="&amp;amp;quothighlight&amp;quot;"&gt;&lt;STRONG&gt;console&lt;/STRONG&gt;&lt;/SPAN&gt; you need to open the psp for your board, locate file "fio.h" under PSP include and comment out&lt;/P&gt;&lt;P&gt;line 75: // #define&amp;nbsp; printf&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _io_printf&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then recompile the psp project as well as the bsp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Aug 2013 02:02:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/printf-cannot-work-with-MQX/m-p/260032#M7700</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2013-08-19T02:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: printf cannot work with MQX？</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/printf-cannot-work-with-MQX/m-p/260033#M7701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For MQX Lite, it is very easy. I refer to the tutorial on the link below:&lt;/P&gt;&lt;P&gt;&lt;A href="http://mcuoneclipse.com/2013/02/07/tutorial-printf-with-and-without-processor-expert/"&gt;http://mcuoneclipse.com/2013/02/07/tutorial-printf-with-and-without-processor-expert/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;In CW 10.4, create New MQX-Lite project for KL25Z128 with I/O Support UART (default). Then add ConsoleIO component to the Processor Expert and configure Serial_LDD componet to use UART 0 on pins PTA1 and PTA2. Then I add printf("Hello World\n"); into my MQX Lite task, build, download, and I get the message on my Win7 terminal, on the Freedom board virtual COM port.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Aug 2013 05:15:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/printf-cannot-work-with-MQX/m-p/260033#M7701</guid>
      <dc:creator>Martin_</dc:creator>
      <dc:date>2013-08-19T05:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: printf cannot work with MQX？</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/printf-cannot-work-with-MQX/m-p/260034#M7702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin and Zhang,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a very similar problem. I have a k20 processor expert project on codewarrior (10.6) with the terminal IO component set up for UART0. When I do a standard printf with no additional arguments, it prints fine, but when I printf with a variable I get a hard fault.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int testVal = 0;&lt;/P&gt;&lt;P&gt;testVal++;&lt;/P&gt;&lt;P&gt;printf("test \r\n"); //works fine&lt;/P&gt;&lt;P&gt;prinf("testval = %d \r\n", testVal); //causes a hard fault after it prints the value the first time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Abid.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2015 19:14:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/printf-cannot-work-with-MQX/m-p/260034#M7702</guid>
      <dc:creator>abidesmail</dc:creator>
      <dc:date>2015-03-20T19:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: printf cannot work with MQX？</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/printf-cannot-work-with-MQX/m-p/260035#M7703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abid,&lt;/P&gt;&lt;P&gt;Are you using MQX or MQXLite?&lt;/P&gt;&lt;P&gt;If yes, please try increasing your stack size.&lt;/P&gt;&lt;P&gt;If no, please step into your printf and try to debug where it issue starts.&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>Sat, 21 Mar 2015 13:21:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/printf-cannot-work-with-MQX/m-p/260035#M7703</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2015-03-21T13:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: printf cannot work with MQX？</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/printf-cannot-work-with-MQX/m-p/260036#M7704</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;I am using MQX lite. I tried changing the stack size from 512 bytes to 1024 bytes, but it didn't help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then tried to reduce the priority of the task (to the lowest priority of the whole system : 10) and it was worked - I was able to printf variables. Do you know if the terminal IO module is really slow or has a problem with MQX lite. Below is my task. As you can see, it is really simple:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;testTaskCounter = 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;void test_task(uint32_t task_init_data)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; while(1)&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; testTaskCounter++;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("testTaskCounter %d \r\n", testTaskCounter);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _time_delay_ticks(1000);&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Abid&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2015 17:53:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/printf-cannot-work-with-MQX/m-p/260036#M7704</guid>
      <dc:creator>abidesmail</dc:creator>
      <dc:date>2015-03-23T17:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: printf cannot work with MQX？</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/printf-cannot-work-with-MQX/m-p/260037#M7705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abid,&lt;/P&gt;&lt;P&gt;Can you ZIP and post your project?&lt;/P&gt;&lt;P&gt;Are you using the Console I/O Component?&amp;nbsp; If yes, there should be no slowness.&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>Mon, 23 Mar 2015 21:16:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/printf-cannot-work-with-MQX/m-p/260037#M7705</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2015-03-23T21:16:04Z</dc:date>
    </item>
  </channel>
</rss>

