<?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 Development ToolsのトピックRe: ConsoleIO printf problem</title>
    <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/ConsoleIO-printf-problem/m-p/304072#M687</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have a look here:&lt;/P&gt;&lt;P&gt;&lt;A href="http://mcuoneclipse.com/2013/02/07/tutorial-printf-with-and-without-processor-expert/" title="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;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 26 Apr 2014 08:23:52 GMT</pubDate>
    <dc:creator>BlackNight</dc:creator>
    <dc:date>2014-04-26T08:23:52Z</dc:date>
    <item>
      <title>ConsoleIO printf problem</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/ConsoleIO-printf-problem/m-p/304071#M686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm new to the Kinetis family of chips, code warrior and processor expert. However am reasonably experienced in embedded software.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having trouble getting printf to work on my FRDM-K20D50M board.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Setting up the Serial_LDD component to use UART0 on PTB16 and PTB17. Then using:&lt;/P&gt;&lt;P&gt;AS1_SendBlock(AS1_DeviceData, "hello world\n", 12);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works fine.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then add a consoleIO component, and try:&lt;/P&gt;&lt;P&gt;printf("Test\n");&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This doesn't work.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stepping through it I end up in:&lt;/P&gt;&lt;P&gt;C:\Freescale\CW MCU v10.5\MCU\ARM_GCC_Support\ewl\EWL_C\src\stdio\printf.c&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sticking breakpoints in the generated CsIO1.c __write_console and _write functions. They are never hit.&lt;/P&gt;&lt;P&gt;Instead the code goes through fwrite(), with the file pointer: stdout. However I can't see anywhere that sets up stdout to point to my UART.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In addition in the generated CsIO1.c the code uses: UART1_BASE_PTR. Whereas my serial component is configured to UART0.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I noted that at the path that usses ARM_EABI_Support, there is:&lt;/P&gt;&lt;P&gt;C:\Freescale\CW MCU v10.5\MCU\ARM_EABI_Support\ewl\EWL_C\src\printf.c&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This printf.c has a lot more code, including: printf_console, which references __write_console.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It compiles and uses this file when I select the freescale tools instead of ARM tools. However this still doesn't work, however it does get into CsIO1.c this time. It may be the UART1_BASE_PTR that breaks it here.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm sure I'm missing something obvious, but I just can't see it. Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Apr 2014 11:21:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/ConsoleIO-printf-problem/m-p/304071#M686</guid>
      <dc:creator>andrewparlane</dc:creator>
      <dc:date>2014-04-25T11:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: ConsoleIO printf problem</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/ConsoleIO-printf-problem/m-p/304072#M687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have a look here:&lt;/P&gt;&lt;P&gt;&lt;A href="http://mcuoneclipse.com/2013/02/07/tutorial-printf-with-and-without-processor-expert/" title="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;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Apr 2014 08:23:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/ConsoleIO-printf-problem/m-p/304072#M687</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2014-04-26T08:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: ConsoleIO printf problem</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/ConsoleIO-printf-problem/m-p/304073#M688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found and read that already. Unfortunately it doesn't help. I'm using the EWL library, I have a consoleIO component and I have a serial_ldd component. When I just using the serial's sendBlock function, I see the output. The problem is the printf being compiled in as part of the GCC tools isn't linking up with the consoleIO component. In addition the consoleIO component doesn't seem to link to the serial component and instead tries to do the comms itself and ends up using the wrong UART peripheral.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Apr 2014 10:48:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/ConsoleIO-printf-problem/m-p/304073#M688</guid>
      <dc:creator>andrewparlane</dc:creator>
      <dc:date>2014-04-28T10:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: ConsoleIO printf problem</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/ConsoleIO-printf-problem/m-p/304074#M689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I fixed it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This post had the answer.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/message/371896"&gt;Re: printf in TeraTerm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem was I added a serial_ldd component and a ConsoleIO component. The ConsolieIO component auto adds a serial_ldd.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2014 11:14:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/ConsoleIO-printf-problem/m-p/304074#M689</guid>
      <dc:creator>andrewparlane</dc:creator>
      <dc:date>2014-04-29T11:14:47Z</dc:date>
    </item>
  </channel>
</rss>

