<?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>Kinetis Microcontrollers中的主题 Re: How do I get printf output to a console?</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-do-I-get-printf-output-to-a-console/m-p/165531#M945</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry again...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would say:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i CAN'T get the printf output on eclipse window console:&lt;/P&gt;&lt;P&gt;//#define SERIAL_CARD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // use this option for serial port on TWR-SER&lt;BR /&gt;#define OSJTAG&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // use this option for serial port over the OS-JTAG circuit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Sep 2011 22:20:36 GMT</pubDate>
    <dc:creator>AlexGiov</dc:creator>
    <dc:date>2011-09-12T22:20:36Z</dc:date>
    <item>
      <title>How do I get printf output to a console?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-do-I-get-printf-output-to-a-console/m-p/165528#M942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can not to have the printf output on console in a simple design (without MXQ and Process Expert).&lt;/P&gt;&lt;P&gt;My configuration is:CW10.1 based on eclipe, TWR-K60N512-KIT﻿, and I debug the project "helloword" adn "gpio" in the code example "KINETIS512_SC.zip".&lt;BR /&gt;is it possible in this case to get printfout on console?﻿&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2011 20:55:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-do-I-get-printf-output-to-a-console/m-p/165528#M942</guid>
      <dc:creator>AlexGiov</dc:creator>
      <dc:date>2011-09-08T20:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get printf output to a console?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-do-I-get-printf-output-to-a-console/m-p/165529#M943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got the gpio demonstartion working last week, so I may be able to help&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once you have opened the gpio project, go to the "Sources" folder, then the "platforms" forder and open file k60_tower.h&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At the end of this file is a section titled&amp;nbsp;/*&amp;nbsp;* Serial Port Info&amp;nbsp;*/﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are using the tower with the separate serial/USB/Ethernet ports then uncomment the line&amp;nbsp;&lt;/P&gt;&lt;P&gt;#define SERIAL_CARD &amp;nbsp; &amp;nbsp; // use this option for serial port on TWR-SER﻿&lt;/P&gt;&lt;P&gt;and comment out the line&lt;/P&gt;&lt;P&gt;//#define OSJTAG &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // use this option for serial port over the OS-JTAG circuit﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rebuild the project and debug.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Connect the serial port on the tower to a serial port on your PC, and use Hyperterminal - set the communications speed to 115200 baud.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2011 12:16:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-do-I-get-printf-output-to-a-console/m-p/165529#M943</guid>
      <dc:creator>Jiun_Yong</dc:creator>
      <dc:date>2011-09-12T12:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get printf output to a console?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-do-I-get-printf-output-to-a-console/m-p/165530#M944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry&lt;BR /&gt;&lt;BR /&gt;I explained badly the problem that I have.&lt;BR /&gt;I am using CodeWarrior 10.1 (based on eclipse) on windows 7&lt;BR /&gt;I would like to get printf output to the console windows of CodeWarrior (based on Eclipse).&lt;BR /&gt;&lt;BR /&gt;I use this setting but i can get the printf output on eclipse window console:&lt;/P&gt;&lt;P&gt;//#define SERIAL_CARD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // use this option for serial port on TWR-SER&lt;BR /&gt;#define OSJTAG&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // use this option for serial port over the OS-JTAG circuit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;A href="http://www,pemicro.com/osbdm" rel="nofollow" target="_blank"&gt;http://www,pemicro.com/osbdm&lt;/A&gt;﻿&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2011 21:25:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-do-I-get-printf-output-to-a-console/m-p/165530#M944</guid>
      <dc:creator>AlexGiov</dc:creator>
      <dc:date>2011-09-12T21:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get printf output to a console?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-do-I-get-printf-output-to-a-console/m-p/165531#M945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry again...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would say:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i CAN'T get the printf output on eclipse window console:&lt;/P&gt;&lt;P&gt;//#define SERIAL_CARD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // use this option for serial port on TWR-SER&lt;BR /&gt;#define OSJTAG&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // use this option for serial port over the OS-JTAG circuit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2011 22:20:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-do-I-get-printf-output-to-a-console/m-p/165531#M945</guid>
      <dc:creator>AlexGiov</dc:creator>
      <dc:date>2011-09-12T22:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get printf output to a console?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-do-I-get-printf-output-to-a-console/m-p/165532#M946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alex,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In our demo we use the printf for console and it is working. You can download the code here:&lt;/P&gt;&lt;P&gt;&lt;A href="http://code.google.com/p/brtos/downloads/list" rel="nofollow" target="_blank"&gt;http://code.google.com/p/brtos/downloads/list&lt;/A&gt;﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We used the console printf for Thread-Metric analysis, like this:&lt;/P&gt;&lt;P&gt;printf("**** Thread-Metric Basic Single Thread Processing Test **** Relative Time: %u\n\r", relative_time);﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you do not have TWR-LCD i would like to recommend you this demo:&lt;/P&gt;&lt;P&gt;&lt;A href="http://brtos.googlecode.com/files/BRTOS%201.65%20Kinetis%20-%20USB.rar" rel="nofollow" target="_blank"&gt;http://brtos.googlecode.com/files/BRTOS%201.65%20Kinetis%20-%20USB.rar&lt;/A&gt;﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you ever tried to mark the option in the attached figure?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Gustavo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2011 03:53:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-do-I-get-printf-output-to-a-console/m-p/165532#M946</guid>
      <dc:creator>gustavod</dc:creator>
      <dc:date>2011-09-13T03:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get printf output to a console?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-do-I-get-printf-output-to-a-console/m-p/165533#M947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank all for your help.&lt;BR /&gt;&lt;BR /&gt;I've solved my problem.&lt;BR /&gt;&lt;BR /&gt;A little report.&lt;BR /&gt;&lt;BR /&gt;Gustav your examples compile perfect and put the printf out directly on eclipse console (i've downloaded the builded code into flash).&lt;BR /&gt;&lt;BR /&gt;The freescale example in "KINETIS512_SC.zip" put the code only on serial card (TWR-SER) or OSJTAG. This's because in this example it's writen a new printf function (printf.c) declared in io.h. So if you use the printf in printf.c you get output on TWR-SER or OSJTAG.&lt;BR /&gt;To get printf output on eclipse console you need to use # include &amp;lt;stdio.h&amp;gt; instead of # included "io.h" and do not compile printf.c&lt;BR /&gt;&lt;BR /&gt;Explained by code:&lt;BR /&gt;common.h:&lt;BR /&gt;/*&lt;BR /&gt;&amp;nbsp;* Include common utilities&lt;BR /&gt;&amp;nbsp;*/&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Alex:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;* to get output through serial port (OSJTAG or SERIAL_CARD on TWR-SER)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;*/&lt;BR /&gt;//#define IO_ON_SERIAL&lt;BR /&gt;#define IO_ON_ECLIPSE_CONSOLE&lt;BR /&gt;&lt;BR /&gt;#include "assert.h"&lt;BR /&gt;&lt;BR /&gt;//Alex: including the IO&lt;BR /&gt;#if (defined(IO_ON_SERIAL))&lt;BR /&gt;#include "io.h"&lt;BR /&gt;#elif (defined(IO_ON_ECLIPSE_CONSOLE))&lt;BR /&gt;#include &amp;lt;stdio.h&amp;gt;&lt;BR /&gt;#else&lt;BR /&gt;#error "Alex: No IO defined!!!"&lt;BR /&gt;#endif&lt;BR /&gt;&lt;BR /&gt;printf.c&lt;BR /&gt;/*&lt;BR /&gt;&amp;nbsp;* File:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printk.c&lt;BR /&gt;&amp;nbsp;* Purpose:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The standard C library routine printf(), but without&lt;BR /&gt;&amp;nbsp;*&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; all the baggage.&lt;BR /&gt;&amp;nbsp;*/&lt;BR /&gt;&lt;BR /&gt;#include "common.h"&lt;BR /&gt;/* Alex:&lt;BR /&gt;&amp;nbsp;* Compile this file only if you want IO on serial card or OSJTAG&lt;BR /&gt;&amp;nbsp;*/&lt;BR /&gt;#if (defined(IO_ON_SERIAL))&lt;BR /&gt;#include &amp;lt;stdarg.h&amp;gt;&lt;BR /&gt;&lt;BR /&gt;/********************************************************************/&lt;BR /&gt;&lt;BR /&gt;typedef struct&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int dest;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; void (*func)(char);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; char *loc;&lt;BR /&gt;} PRINTK_INFO;&lt;BR /&gt;&lt;BR /&gt;int&amp;nbsp; ...continue the printf...&lt;BR /&gt;&lt;BR /&gt;Alex.﻿&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2011 22:18:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-do-I-get-printf-output-to-a-console/m-p/165533#M947</guid>
      <dc:creator>AlexGiov</dc:creator>
      <dc:date>2011-09-15T22:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get printf output to a console?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-do-I-get-printf-output-to-a-console/m-p/165534#M948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use the following file to redirect to external serial port. Look at the example code. This is the same as semihosting or retarget concept coming from other ARM compilers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2011 00:02:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-do-I-get-printf-output-to-a-console/m-p/165534#M948</guid>
      <dc:creator>PaoloRenzo</dc:creator>
      <dc:date>2011-09-19T00:02:45Z</dc:date>
    </item>
  </channel>
</rss>

