<?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>MQX Software Solutions中的主题 Disable console on UART with printf</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Disable-console-on-UART-with-printf/m-p/253650#M7379</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure the title is very correct.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use latest CW 10.4 and MQX 4.0 with a K60F120M bsp configuration.&amp;nbsp; I use the console printf for debug and redirected it to an UART (UART2 -&amp;gt; ttyc)&amp;nbsp; and it works fine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I use printf in my code to help debug and develop.&amp;nbsp; =&amp;gt; OK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I reach the final steps, this UART should be used for something else so I want to completely disable the console output. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What should I do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And what should I do with all the places I use printf now?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and best regards&lt;/P&gt;&lt;P&gt;-stéphan-&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Sep 2013 07:35:15 GMT</pubDate>
    <dc:creator>aroste</dc:creator>
    <dc:date>2013-09-27T07:35:15Z</dc:date>
    <item>
      <title>Disable console on UART with printf</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Disable-console-on-UART-with-printf/m-p/253650#M7379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure the title is very correct.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use latest CW 10.4 and MQX 4.0 with a K60F120M bsp configuration.&amp;nbsp; I use the console printf for debug and redirected it to an UART (UART2 -&amp;gt; ttyc)&amp;nbsp; and it works fine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I use printf in my code to help debug and develop.&amp;nbsp; =&amp;gt; OK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I reach the final steps, this UART should be used for something else so I want to completely disable the console output. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What should I do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And what should I do with all the places I use printf now?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and best regards&lt;/P&gt;&lt;P&gt;-stéphan-&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2013 07:35:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Disable-console-on-UART-with-printf/m-p/253650#M7379</guid>
      <dc:creator>aroste</dc:creator>
      <dc:date>2013-09-27T07:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: Disable console on UART with printf</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Disable-console-on-UART-with-printf/m-p/253651#M7380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;-stéphan-,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In file \mqx\source\bsp\&amp;lt;BOARD_NAME&amp;gt;\&amp;lt;BOARD_NAME&amp;gt;.h is defined BSP_DEFAULT_IO_CHANNEL. You can change it here,probably set to NULL.(also you can set this macros in user_config.h).&lt;/P&gt;&lt;P&gt;If you want change only app you can use function _io_set_handle() and change IO_STDOUT and IO_STDIN to NULL or other io driver. ! !&lt;/P&gt;&lt;P&gt;_io_set_handle(IO_STDOUT, NULL);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this answer will help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Oct 2013 11:14:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Disable-console-on-UART-with-printf/m-p/253651#M7380</guid>
      <dc:creator>BielikM</dc:creator>
      <dc:date>2013-10-22T11:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: Disable console on UART with printf</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Disable-console-on-UART-with-printf/m-p/253652#M7381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have always incorporated a simple Ethernet or telnet interface into my applications (of course I realize this doesn't help if you are not incorporating the Ethernet port).&amp;nbsp; Telnet is still available as a command line interface in most operating systems... including Windows (although they are making it more and more difficult to locate).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Oct 2013 11:46:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Disable-console-on-UART-with-printf/m-p/253652#M7381</guid>
      <dc:creator>stevejanisch</dc:creator>
      <dc:date>2013-10-22T11:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Disable console on UART with printf</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Disable-console-on-UART-with-printf/m-p/253653#M7382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stephan,&lt;/P&gt;&lt;P&gt;Martin has best solution to disable the default io capability.&lt;/P&gt;&lt;P&gt;Another method would be to make modifications to the user_config.h (this is the highest level header file in the RTOS that can over ride default RTOS settings).&lt;/P&gt;&lt;P&gt;Simply setting all the selected BSPCFG_ENABLE(I)TTYx #defines to 0 will disable the RTOS from using a physical UART.&lt;/P&gt;&lt;P&gt;That doesn't resolve the printf's matter you have in your code base.&lt;/P&gt;&lt;P&gt;For that you can modify the PSP fio.h header and add a #define to the user_config.h to switch on and off the printf capability:&lt;/P&gt;&lt;P&gt;fio.h modifications:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="ScreenHunter_32 Oct. 22 13.06.gif"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/41071i18868CA66419D0CC/image-size/large?v=v2&amp;amp;px=999" role="button" title="ScreenHunter_32 Oct. 22 13.06.gif" alt="ScreenHunter_32 Oct. 22 13.06.gif" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;user_config.h modification:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="ScreenHunter_33 Oct. 22 13.06.gif"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/40783i1269CFAD41D82D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="ScreenHunter_33 Oct. 22 13.06.gif" alt="ScreenHunter_33 Oct. 22 13.06.gif" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As always, please re-compile the RTOS when making modifications to user_config.h.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David &lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Oct 2013 18:11:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Disable-console-on-UART-with-printf/m-p/253653#M7382</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2013-10-22T18:11:06Z</dc:date>
    </item>
  </channel>
</rss>

