<?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>How to enable UART or RTT logging in examples?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21189/how-to-enable-uart-or-rtt-logging-in-examples</link><description>I have downloaded nRF5_SDK_12.2.0_f012efa and tried to test logging in examples but without success. Even if I compile an example where NRF_LOG_BACKEND_SERIAL_USES_UART 1 is enabled by default in sdk_config.h I do not get any logs on terminal. I have</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 19 Mar 2020 23:35:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21189/how-to-enable-uart-or-rtt-logging-in-examples" /><item><title>RE: How to enable UART or RTT logging in examples?</title><link>https://devzone.nordicsemi.com/thread/240735?ContentTypeID=1</link><pubDate>Thu, 19 Mar 2020 23:35:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1484866d-0aaf-49a6-9ebf-dff480e9cdba</guid><dc:creator>ryerye120</dc:creator><description>&lt;p&gt;Yes, my error had to do with the log_deferring option! I disabled it and then it worked!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable UART or RTT logging in examples?</title><link>https://devzone.nordicsemi.com/thread/239928?ContentTypeID=1</link><pubDate>Mon, 16 Mar 2020 10:00:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89a8788d-b4b6-467b-bf62-a4fc78378248</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Are you initializing the log module and the backends in your main() function?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;ret_code_t err_code = NRF_LOG_INIT(NULL);
APP_ERROR_CHECK(err_code);

NRF_LOG_DEFAULT_BACKENDS_INIT();&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable UART or RTT logging in examples?</title><link>https://devzone.nordicsemi.com/thread/239807?ContentTypeID=1</link><pubDate>Fri, 13 Mar 2020 18:42:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13b19b7d-51bb-4bd0-acb1-5c92e1b6af35</guid><dc:creator>ryerye120</dc:creator><description>&lt;p&gt;I&amp;#39;m having a similar issue. I&amp;#39;m using SDK16 and developing on the nrf52840 DK.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I followed the instructions in this video:&amp;nbsp;&lt;a href="https://youtu.be/uP8RYgYGRvI?t=179"&gt;https://youtu.be/uP8RYgYGRvI?t=179&lt;/a&gt;&lt;span&gt;&amp;nbsp; in addition to the addendums on this thread as well as this other thread:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/58414/enabling-nrf_log_enabled-to-log-messages-on-debug-terminal"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/58414/enabling-nrf_log_enabled-to-log-messages-on-debug-terminal&lt;/a&gt;&amp;nbsp;. But I&amp;#39;m still not seeing anything in my debug terminal.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Currently, I have enabled NRF_LOG_BACKEND_RTT_ENABLED as well as the NRF_LOG_ENABLED. I have also disabled NRF_LOG_BACKEND_UART_ENABLED&amp;nbsp;just in case. Have I missed something simple?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable UART or RTT logging in examples?</title><link>https://devzone.nordicsemi.com/thread/237936?ContentTypeID=1</link><pubDate>Wed, 04 Mar 2020 08:22:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44b6caf4-e753-42ee-8495-febef3310b24</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Did you add the source file&amp;nbsp;components\libraries\log\src\nrf_log_default_backends.c to your project? NRF_LOG_ENABLED also needs to be set.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable UART or RTT logging in examples?</title><link>https://devzone.nordicsemi.com/thread/237933?ContentTypeID=1</link><pubDate>Wed, 04 Mar 2020 08:16:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16faec9a-2beb-4277-87f5-af50dd06dd71</guid><dc:creator>Navin</dc:creator><description>&lt;p&gt;Hello Jorgen,&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t find &lt;code&gt;NRF_LOG_BACKEND_SERIAL_USES_UART&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;I get the error: &lt;strong&gt;undefined reference to `nrf_log_default_backends_init&amp;#39;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;But I have enabled : &lt;strong&gt;#ifndef NRF_LOG_BACKEND_UART_ENABLED&lt;/strong&gt;&lt;br /&gt;&lt;strong&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #define NRF_LOG_BACKEND_UART_ENABLED 1&lt;/strong&gt;&lt;br /&gt;&lt;strong&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #endif&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;What could I possibly be missing?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable UART or RTT logging in examples?</title><link>https://devzone.nordicsemi.com/thread/82920?ContentTypeID=1</link><pubDate>Fri, 07 Apr 2017 11:08:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77bcef86-f457-42dd-93c6-0a8112fa95e9</guid><dc:creator>Al Bundy</dc:creator><description>&lt;p&gt;Ok, it works. I though that if &lt;code&gt;NRF_LOG_BACKEND_SERIAL_USES_UART 1&lt;/code&gt; is enabled by default in some examples then &lt;code&gt;NRF_LOG_ENABLED 1&lt;/code&gt; is also enabled by default, but it is not.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable UART or RTT logging in examples?</title><link>https://devzone.nordicsemi.com/thread/82919?ContentTypeID=1</link><pubDate>Fri, 07 Apr 2017 07:17:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b685134-2ef3-4732-b464-b774d17140c6</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It should be sufficient to set &lt;code&gt;NRF_LOG_ENABLED 1&lt;/code&gt; and either &lt;code&gt;NRF_LOG_BACKEND_SERIAL_USES_UART 1&lt;/code&gt; or &lt;code&gt;NRF_LOG_BACKEND_SERIAL_USES_RTT 1&lt;/code&gt;. Note that if &lt;code&gt;NRF_LOG_DEFERRED 1&lt;/code&gt; is set, you also need to process the log buffer using &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.2.0/group__nrf__log__ctrl.html#gaea4ee51a39f70f14ad2e3213fa497ade"&gt;&lt;code&gt;NRF_LOG_PROCESS()&lt;/code&gt;&lt;/a&gt; or &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.2.0/group__nrf__log__ctrl.html#ga2d86a60e776a72f918d2f6cf7abc3135"&gt;&lt;code&gt;NRF_LOG_FLUSH()&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>