<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>nRFready desktop 2 With Printf</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/9300/nrfready-desktop-2-with-printf</link><description>Hi
I want to use Printf() in the DT2 but it cannot output msg to terminal.
I used hal_uart_config() to config UART TX/RX/Baudrate... in mail.c then
call hal_uart_put_str(&amp;quot;123\n&amp;quot;); and it can show &amp;quot;123&amp;quot; on Terminal but
call Printf(&amp;quot;123\n&amp;quot;) and it cannot</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 21 Sep 2015 14:55:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/9300/nrfready-desktop-2-with-printf" /><item><title>RE: nRFready desktop 2 With Printf</title><link>https://devzone.nordicsemi.com/thread/34325?ContentTypeID=1</link><pubDate>Mon, 21 Sep 2015 14:55:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c02efb8-63bf-4f3b-a43c-7c29497b4157</guid><dc:creator>Atlas</dc:creator><description>&lt;p&gt;Have any update?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRFready desktop 2 With Printf</title><link>https://devzone.nordicsemi.com/thread/34324?ContentTypeID=1</link><pubDate>Fri, 18 Sep 2015 15:40:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cec2622f-f2c4-494b-b143-61872921e91d</guid><dc:creator>Atlas</dc:creator><description>&lt;p&gt;Hi Anders
Yes, I added studio.h in the main.c
I just only want to use Printf for debug.
Could you help to check this issue in DT2 mouse.
I know Printf can be used in SDK but it cannot work in DT2.
Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRFready desktop 2 With Printf</title><link>https://devzone.nordicsemi.com/thread/34323?ContentTypeID=1</link><pubDate>Fri, 18 Sep 2015 15:15:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce22290e-0e52-4608-8fc2-980f6d69843b</guid><dc:creator>Anders Strand</dc:creator><description>&lt;p&gt;Hi.
Have you included stdio.h?
Printf will print to stdout, which means that a printf to stdout must be mapped to printing to the uart. The function fputc must implement hal_uart_put_str().
You can see how this is done inside retarget.c in for example the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk51.v9.0.0/ble_sdk_app_nus_eval.html?cp=4_1_0_4_4_17"&gt;nus example&lt;/a&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;int fputc(int ch, FILE * p_file)
{
    UNUSED_PARAMETER(p_file);

    UNUSED_VARIABLE(app_uart_put((uint8_t)ch));
    return ch;
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>