<?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>printf, uart0 and libuarte ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71384/printf-uart0-and-libuarte</link><description>Dear Members, 
 
 I want to use print for debugging with uart0 and libuarte, 
 I can only dislpay 1 character, what should I change ? 
 Thanks 
 Code :</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 16 Feb 2021 10:40:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71384/printf-uart0-and-libuarte" /><item><title>RE: printf, uart0 and libuarte ?</title><link>https://devzone.nordicsemi.com/thread/294572?ContentTypeID=1</link><pubDate>Tue, 16 Feb 2021 10:40:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:552da28e-1b75-4f22-9735-f6bc9679b747</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Yes, but you would have to use libuarte with UARTE1 with a different pinout to avoid conflict with the UARTE0 instance used by the logger module. I think it would be easier if you selected the RTT backend for logging.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf, uart0 and libuarte ?</title><link>https://devzone.nordicsemi.com/thread/294252?ContentTypeID=1</link><pubDate>Fri, 12 Feb 2021 23:30:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cda5e961-ea43-47fc-b56e-bedfda855bd6</guid><dc:creator>RixtronixLAB</dc:creator><description>&lt;p&gt;no output from NRF_LOG_INFO() , which config do I miss here in libuarte example ? thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf, uart0 and libuarte ?</title><link>https://devzone.nordicsemi.com/thread/294250?ContentTypeID=1</link><pubDate>Fri, 12 Feb 2021 22:12:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14aceb58-9a23-40a8-aebd-893c285d9a97</guid><dc:creator>RixtronixLAB</dc:creator><description>&lt;p&gt;so nrf_log_info() can work together with libuarte ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf, uart0 and libuarte ?</title><link>https://devzone.nordicsemi.com/thread/294211?ContentTypeID=1</link><pubDate>Fri, 12 Feb 2021 15:26:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14091c5a-b845-4352-b65c-85b80cc5b49d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;The logger module works with the driver directly, so it&amp;#39;s no using libuarte.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf, uart0 and libuarte ?</title><link>https://devzone.nordicsemi.com/thread/294209?ContentTypeID=1</link><pubDate>Fri, 12 Feb 2021 15:24:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1177335c-e0e2-4dcc-94b1-5910780cad43</guid><dc:creator>RixtronixLAB</dc:creator><description>&lt;p&gt;How to use Logger module with libuarte ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf, uart0 and libuarte ?</title><link>https://devzone.nordicsemi.com/thread/294208?ContentTypeID=1</link><pubDate>Fri, 12 Feb 2021 15:22:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2c1cb30-e8fa-43cf-8449-3595e6cbe1cc</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Maybe it&amp;#39;s returning a busy error. Can you try to place the nrf_libuarte_async_tx() call inside a while loop that only exits when nrf_libuarte_async_tx() has returned NRF_SUCCESS?&lt;/p&gt;
&lt;p&gt;while (err_code != NRF_SUCCESS) {&lt;/p&gt;
&lt;p&gt;err_code = nrf_libuarte_async_tx(&amp;amp;libuarte, (uint8_t*)&amp;amp;ch,1);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Also, have you considered using our &lt;span class="item"&gt;&lt;a title="Logger module" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_nrf_log.html?cp=7_1_3_27"&gt;Logger module? &lt;/a&gt;&lt;/span&gt;&lt;span class="item"&gt;It offers some good features that you don&amp;#39;t get with printf&amp;#39;s&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf, uart0 and libuarte ?</title><link>https://devzone.nordicsemi.com/thread/294204?ContentTypeID=1</link><pubDate>Fri, 12 Feb 2021 15:08:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8a77d45-da73-4c56-a166-889e3e9265c8</guid><dc:creator>RixtronixLAB</dc:creator><description>&lt;p&gt;int fputc(int ch, FILE * p_file)&lt;br /&gt;{&lt;br /&gt; UNUSED_PARAMETER(p_file);&lt;/p&gt;
&lt;p&gt;//UNUSED_VARIABLE(app_uart_put((uint8_t)ch));&lt;br /&gt; nrf_libuarte_async_tx(&amp;amp;libuarte, (uint8_t*)&amp;amp;ch,1);&lt;br /&gt; return ch;&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;it&amp;#39;s only printing the first character ??&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf, uart0 and libuarte ?</title><link>https://devzone.nordicsemi.com/thread/294085?ContentTypeID=1</link><pubDate>Fri, 12 Feb 2021 05:20:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4131a63b-853d-4f21-9396-098d93ab84f4</guid><dc:creator>RixtronixLAB</dc:creator><description>&lt;p&gt;How to use :&lt;/p&gt;
&lt;p&gt;NRF_MODULE_ENABLED(RETARGET) in retarget.c ? thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf, uart0 and libuarte ?</title><link>https://devzone.nordicsemi.com/thread/294017?ContentTypeID=1</link><pubDate>Thu, 11 Feb 2021 15:17:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77a1612f-d927-45bc-b656-e0559b9c7c76</guid><dc:creator>RixtronixLAB</dc:creator><description>&lt;p&gt;do you mean replacing :&lt;/p&gt;
&lt;p&gt;#define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f)&lt;/p&gt;
&lt;p&gt;with :&lt;/p&gt;
&lt;p&gt;app_uart_put()&lt;/p&gt;
&lt;p&gt;become :&lt;/p&gt;
&lt;p&gt;#define PUTCHAR_PROTOTYPE int app_uart_put(ch)&amp;nbsp; ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf, uart0 and libuarte ?</title><link>https://devzone.nordicsemi.com/thread/294015?ContentTypeID=1</link><pubDate>Thu, 11 Feb 2021 15:10:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa26572f-86eb-4e25-8855-3d565db5f4b7</guid><dc:creator>RixtronixLAB</dc:creator><description>&lt;p&gt;I got this error ?&lt;/p&gt;
&lt;p&gt;.\_build\nrf52840_xxaa.axf: Error: L6200E: Symbol __asm___10_retarget_c____REV16 multiply defined (by retarget_1.o and retarget.o).&lt;br /&gt;.\_build\nrf52840_xxaa.axf: Error: L6200E: Symbol __asm___10_retarget_c____REVSH multiply defined (by retarget_1.o and retarget.o).&lt;br /&gt;.\_build\nrf52840_xxaa.axf: Error: L6200E: Symbol __asm___10_retarget_c____RRX multiply defined (by retarget_1.o and retarget.o).&lt;/p&gt;
&lt;p&gt;and how can I use app_uart_put() ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf, uart0 and libuarte ?</title><link>https://devzone.nordicsemi.com/thread/293444?ContentTypeID=1</link><pubDate>Mon, 08 Feb 2021 22:32:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9f39026-9222-4e8e-9deb-a6bc6cd9d6c8</guid><dc:creator>RixtronixLAB</dc:creator><description>&lt;p&gt;Hi Vidar, thanks for the reply,&lt;/p&gt;
&lt;p&gt;Then how can I relate with my printf(), is retarget.c activating printf() ?&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll give a try and posted,&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf, uart0 and libuarte ?</title><link>https://devzone.nordicsemi.com/thread/293335?ContentTypeID=1</link><pubDate>Mon, 08 Feb 2021 13:07:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f242d8b-cd36-481c-9712-abeb4e9a0a89</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Could you please try to use the retarget.c implementation \components\libraries\uart and replace the call to app_uart_put() with&amp;nbsp;nrf_libuarte_async_tx() to see if it gives the same result. The length argument should also be set to &amp;#39;1&amp;#39; byte as it is supposed to send one byte at a time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>