<?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 exception in MQX 4.0 telnet2ser sample in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/printf-exception-in-MQX-4-0-telnet2ser-sample/m-p/306115#M9836</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could Anybody help me?&lt;/P&gt;&lt;P&gt;more findings here. the temporary variable "char tmp" did get address&amp;nbsp; 0x1FFF0E80. and the address of "file_ptr" is 0x1FFF0E6C.&lt;/P&gt;&lt;P&gt;After that, when it has changed "tmp"s value, the element's value in struct file_ptr would changed ,then MQX goes to IDLE TASK.&lt;/P&gt;&lt;P&gt;How can I resolve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="11.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/44064i251BEF33E45E8736/image-size/large?v=v2&amp;amp;px=999" role="button" title="11.jpg" alt="11.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 May 2014 02:14:39 GMT</pubDate>
    <dc:creator>qianmingzhu</dc:creator>
    <dc:date>2014-05-30T02:14:39Z</dc:date>
    <item>
      <title>printf exception in MQX 4.0 telnet2ser sample</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/printf-exception-in-MQX-4-0-telnet2ser-sample/m-p/306114#M9835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, everyone,&lt;/P&gt;&lt;P&gt;I am developing a TCP/IP application based on the sample telnet2ser. My problem is only about printf function. &lt;/P&gt;&lt;P&gt;At the main task function, my printf is used well. But when the program goes to "_mqx_int lw_telnet_server(void (_CODE_PTR_ user_fn)(void))" function and call "printf("hello");" as the first statement, the MQX is in ISR and has a endless loop in idle task, with nothing displayed in the console.&lt;/P&gt;&lt;P&gt;I have traced the printf and found that the only different between the error and correct is around as the following figure.&lt;/P&gt;&lt;P&gt;The problem is focused on "tmp = (char) c". This statement will change the file_ptr-&amp;gt;SIZE or other element in struct file_ptr except file_ptr-&amp;gt;DEV_PTR. And then when it goes into _io_serial_polled_write function in serl_pol.c, the fd_ptr struct always has wrong values but its address is the same as the correct procedure.&lt;/P&gt;&lt;P&gt;Please give me some help. I can't get out of here anymore. Please!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="20140527172607.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/43849i151DE5670A561B4C/image-size/large?v=v2&amp;amp;px=999" role="button" title="20140527172607.jpg" alt="20140527172607.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 May 2014 09:35:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/printf-exception-in-MQX-4-0-telnet2ser-sample/m-p/306114#M9835</guid>
      <dc:creator>qianmingzhu</dc:creator>
      <dc:date>2014-05-27T09:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: printf exception in MQX 4.0 telnet2ser sample</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/printf-exception-in-MQX-4-0-telnet2ser-sample/m-p/306115#M9836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could Anybody help me?&lt;/P&gt;&lt;P&gt;more findings here. the temporary variable "char tmp" did get address&amp;nbsp; 0x1FFF0E80. and the address of "file_ptr" is 0x1FFF0E6C.&lt;/P&gt;&lt;P&gt;After that, when it has changed "tmp"s value, the element's value in struct file_ptr would changed ,then MQX goes to IDLE TASK.&lt;/P&gt;&lt;P&gt;How can I resolve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="11.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/44064i251BEF33E45E8736/image-size/large?v=v2&amp;amp;px=999" role="button" title="11.jpg" alt="11.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 02:14:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/printf-exception-in-MQX-4-0-telnet2ser-sample/m-p/306115#M9836</guid>
      <dc:creator>qianmingzhu</dc:creator>
      <dc:date>2014-05-30T02:14:39Z</dc:date>
    </item>
  </channel>
</rss>

