<?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>S32 Design Studio中的主题 printf() to console</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/printf-to-console/m-p/1250551#M7350</link>
    <description>&lt;P&gt;I am maintaining a S32K144 Makefile project in Design Studio.&lt;/P&gt;&lt;P&gt;I want to send UART output to the Debugger console. The only instruction I can find is &lt;A href="https://community.nxp.com/t5/Kinetis-Design-Studio-Knowledge/How-to-use-printf-to-print-string-to-Console-and-UART-in-KDS2-0/ta-p/1111033" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/Kinetis-Design-Studio-Knowledge/How-to-use-printf-to-print-string-to-Console-and-UART-in-KDS2-0/ta-p/1111033&lt;/A&gt; which uses Processor Expert (which we do not).&lt;/P&gt;&lt;P&gt;Its been a few years (&amp;amp; on STM) but as I recall I just have to add an ITM putc() somewhere?&lt;/P&gt;&lt;P&gt;Please point me at the magic charm(s) needed.&lt;/P&gt;&lt;P&gt;I am using USB Multilink, any special debug configuration needed would be welcome.&lt;/P&gt;</description>
    <pubDate>Tue, 23 Mar 2021 15:36:34 GMT</pubDate>
    <dc:creator>Pete66</dc:creator>
    <dc:date>2021-03-23T15:36:34Z</dc:date>
    <item>
      <title>printf() to console</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/printf-to-console/m-p/1250551#M7350</link>
      <description>&lt;P&gt;I am maintaining a S32K144 Makefile project in Design Studio.&lt;/P&gt;&lt;P&gt;I want to send UART output to the Debugger console. The only instruction I can find is &lt;A href="https://community.nxp.com/t5/Kinetis-Design-Studio-Knowledge/How-to-use-printf-to-print-string-to-Console-and-UART-in-KDS2-0/ta-p/1111033" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/Kinetis-Design-Studio-Knowledge/How-to-use-printf-to-print-string-to-Console-and-UART-in-KDS2-0/ta-p/1111033&lt;/A&gt; which uses Processor Expert (which we do not).&lt;/P&gt;&lt;P&gt;Its been a few years (&amp;amp; on STM) but as I recall I just have to add an ITM putc() somewhere?&lt;/P&gt;&lt;P&gt;Please point me at the magic charm(s) needed.&lt;/P&gt;&lt;P&gt;I am using USB Multilink, any special debug configuration needed would be welcome.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 15:36:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/printf-to-console/m-p/1250551#M7350</guid>
      <dc:creator>Pete66</dc:creator>
      <dc:date>2021-03-23T15:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: printf() to console</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/printf-to-console/m-p/1251974#M7352</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;there is an old example -&amp;nbsp;&lt;A href="https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/EXAMPLE-S32k144-UART-printf-scanf-under-FreeRTOS-S32DS/ta-p/1122496" target="_blank"&gt;https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/EXAMPLE-S32k144-UART-printf-scanf-under-FreeRTOS-S32DS/ta-p/1122496&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Basically - you need to implement these functions:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;int_t __read_console(__file_handle handle, uchar_t * buffer, size_t * count);&lt;BR /&gt;int_t __write_console(__file_handle handle, uchar_t * buffer, size_t * count);&lt;BR /&gt;int_t __close_console(__file_handle handle);&lt;/P&gt;
&lt;P&gt;You can reuse console.h and console.c from example in your project.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jiri&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 08:44:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/printf-to-console/m-p/1251974#M7352</guid>
      <dc:creator>jiri_kral</dc:creator>
      <dc:date>2021-03-25T08:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: printf() to console</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/printf-to-console/m-p/1251992#M7353</link>
      <description>&lt;P&gt;I am not being clear.&lt;/P&gt;&lt;P&gt;I want printf() to appear in the &lt;EM&gt;debugger &lt;/EM&gt;console. This used to be called ITM?&lt;/P&gt;&lt;P&gt;I have a Multilink connected to the target. I do not have access to UART pins (don't ask!).&lt;/P&gt;&lt;P&gt;I have seen a PE example but we do not use PE (again don't ask!).&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 09:06:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/printf-to-console/m-p/1251992#M7353</guid>
      <dc:creator>Pete66</dc:creator>
      <dc:date>2021-03-25T09:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: printf() to console</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/printf-to-console/m-p/1252126#M7354</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ok, I see. I understand it that you need to use printf to serial console, sorry.&lt;/P&gt;
&lt;P&gt;So - you can use STD C library with debugger I/O support - for example newlib:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jiri_kral_0-1616671028683.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/140657i27A2AE67DD863BE5/image-size/large?v=v2&amp;amp;px=999" role="button" title="jiri_kral_0-1616671028683.png" alt="jiri_kral_0-1616671028683.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and enable Semihosting console in debug configurations:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jiri_kral_1-1616671111622.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/140658i15F1957BA399F34E/image-size/large?v=v2&amp;amp;px=999" role="button" title="jiri_kral_1-1616671111622.png" alt="jiri_kral_1-1616671111622.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should be able see printf output in Debug session semihosting console.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it helps.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jiri&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 11:19:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/printf-to-console/m-p/1252126#M7354</guid>
      <dc:creator>jiri_kral</dc:creator>
      <dc:date>2021-03-25T11:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: printf() to console</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/printf-to-console/m-p/1424906#M8309</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.nxp.com/t5/user/viewprofilepage/user-id/159987" target="_self"&gt;&lt;SPAN class=""&gt;jiri_kral&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;According these steps , I make the same thing and SOP but it can't work ok.&lt;/P&gt;&lt;P&gt;please see the attach file and kindly help me.&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 02:53:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/printf-to-console/m-p/1424906#M8309</guid>
      <dc:creator>tzeng015</dc:creator>
      <dc:date>2022-03-09T02:53:23Z</dc:date>
    </item>
  </channel>
</rss>

