<?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>No Log output to J-Link RTT Viewer</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/38291/no-log-output-to-j-link-rtt-viewer</link><description>Hello, 
 I have read through all the posts I can find on this subject, but none has solved my problem. 
 - nRF5_SDK_15.1.0 
 - Example: Segger Embedded Studio Project: twi_master_with_twis_slave_pca10040 Using Segger Embedded Studio 
 - Connected to nrf52</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 10 Sep 2018 07:01:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/38291/no-log-output-to-j-link-rtt-viewer" /><item><title>RE: No Log output to J-Link RTT Viewer</title><link>https://devzone.nordicsemi.com/thread/147929?ContentTypeID=1</link><pubDate>Mon, 10 Sep 2018 07:01:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2aa13f0d-7ad8-4d8e-a3bf-d9710f4c052e</guid><dc:creator>gos</dc:creator><description>&lt;p&gt;Thanks Einar.&lt;/p&gt;
&lt;p&gt;I got it sorted: I used the TWI Sensor as my base, and then RTT works with Segger natively for both&amp;nbsp;Logging and printf() statements.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I got my TWI (I2C) working with my sensor, but I am now fighting with Current Conspumption in __WFI ~500 uA. WIll post about this problem in another thread...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No Log output to J-Link RTT Viewer</title><link>https://devzone.nordicsemi.com/thread/147928?ContentTypeID=1</link><pubDate>Mon, 10 Sep 2018 06:54:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05a6021d-2dcd-4545-9e97-831984ae4b08</guid><dc:creator>Einar Thorsrud</dc:creator><description>[quote user="gos"]So how do I get Segger&amp;#39;s Debug Terminal to&amp;nbsp;show logged data?[/quote]
&lt;p&gt;In the examples, simply enable RTT logging as we have discussed and as described in the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/lib_nrf_log.html?cp=4_0_1_3_26"&gt;Logger module documentation&lt;/a&gt;.&lt;/p&gt;
[quote user="gos"]Can I get my own printf() of similar to show up in Segger Debug Terminal?[/quote]
&lt;p&gt;&amp;nbsp;You would have to retarget printf to use RTT og the logger module. I do not see any benefit with this, and I suggest using the logger macros instead. That would give you all the benefits of the logger system, and the string formatting is identical with printf.&lt;/p&gt;
[quote user="gos"]By the way, What is CLI[/quote]
&lt;p&gt;&amp;nbsp;Command line interface. It interferes&amp;nbsp;with logging, and is not useful in a practical application. I suggest you steer well clear of CLI, particularly if you want to get logging working.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No Log output to J-Link RTT Viewer</title><link>https://devzone.nordicsemi.com/thread/147927?ContentTypeID=1</link><pubDate>Mon, 10 Sep 2018 06:51:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7a5aff4-af1d-48ae-b57d-046a84784fa4</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;What I wanted to to stress in my previous answer is that you can only use&amp;nbsp;JLinkRTTViewer.exe&amp;nbsp;&lt;em&gt;or&lt;/em&gt;&amp;nbsp;the built in Debug Terminal in SES, not both simultaneously. This was my main theory for you not seeing the logs, as it should work out of the box in most SDK examples provided you&amp;nbsp;set&amp;nbsp;NRF_LOG_BACKEND_RTT_ENABLED to 1 in your projects sdk_config.h file. You should also double check that&amp;nbsp;NRF_LOG_ENABLED is set to 1, which it should be by default.&amp;nbsp;The only other typical reason I can think of for logging to fail is if the example use deferred logging, and there is an error before the log can be processed. I recommend you refer to the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/lib_nrf_log.html?cp=4_0_1_3_26"&gt;Logger module documentation&lt;/a&gt;&amp;nbsp;for a better understanding of how it works and is configured.&lt;/p&gt;
&lt;p&gt;If it still does not work, can you e.g. try to use the unmodified&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/ble_sdk_app_hrs.html?cp=4_0_1_4_1_2_13"&gt;Heart Rate Application example&lt;/a&gt;&amp;nbsp;in the SDK (&amp;lt;SDK 15&amp;gt;\examples\ble_peripheral\ble_app_hrs\pca10040\s132\ses\ble_app_hrs_pca10040_s132.emProject)? You just have to enable RTT logging by setting the&amp;nbsp;&lt;span&gt;NRF_LOG_BACKEND_RTT_ENABLED&amp;nbsp;in &amp;lt;SDK 15&amp;gt;\examples\ble_peripheral\ble_app_hrs\pca10040\s132\config\sdk_config.h and run the project. You should get the debug printouts&amp;nbsp;in SES. Alternatively, if you don&amp;#39;t debug in SES, use&amp;nbsp;JLinkRTTViewer.exe.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No Log output to J-Link RTT Viewer</title><link>https://devzone.nordicsemi.com/thread/147840?ContentTypeID=1</link><pubDate>Fri, 07 Sep 2018 14:46:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2319b71f-d146-4096-b1ee-657d2e462012</guid><dc:creator>gos</dc:creator><description>&lt;p&gt;I see that I probably Misunderstood the docs i referred to above: Segger will not start RTTViewer, but the Debug Termoinal..&lt;/p&gt;
&lt;p&gt;So how do I get Segger&amp;#39;s Debug Terminal to&amp;nbsp;show logged data?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Can I make the example user &amp;quot;Normal&amp;quot; Debugging?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Can I get my own printf() of similar to show up in Segger Debug Terminal?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;By the way, What is CLI ?&lt;/p&gt;
&lt;p&gt;Sorry if I mess up a bit, but I have been trying to solve this for two days, and I wearing out...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No Log output to J-Link RTT Viewer</title><link>https://devzone.nordicsemi.com/thread/147837?ContentTypeID=1</link><pubDate>Fri, 07 Sep 2018 14:39:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80354a1c-a294-4cf0-ac22-1110fc4ad3a7</guid><dc:creator>gos</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Thanks for your answer.&lt;/p&gt;
&lt;p&gt;There must be some major misunderstandings somewhere:&lt;/p&gt;
&lt;p&gt;According to:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;nRF5 Getting Started &amp;gt; Software development Getting Started Guides &amp;gt; nRF5 Series: Developing with SEGGER Embedded Studio &amp;gt; Communicating with the board &amp;gt; Connecting via RTT&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Segger can indeed use &lt;strong&gt;JLinkRTTViewer.exe &lt;/strong&gt;for logging:&amp;nbsp; The docs even claims it will start it automatically!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;An this Video:&amp;nbsp;&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://www.youtube.com/watch?v=uP8RYgYGRvI"&gt;https://www.youtube.com/watch?v=uP8RYgYGRvI&lt;/a&gt;&lt;span&gt;&amp;nbsp;at&amp;nbsp;&lt;/span&gt;&lt;strong&gt;03:48&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Shows using RTT to Log to Segger Embedded Studio Debug Terminal:&lt;/p&gt;
&lt;p&gt;I do not need both to work, I will be satisfied using&amp;nbsp;&lt;span&gt;Segger Embedded Studio Debug Terminal, but it does not work.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regarding the code I am using: That&amp;#39;s&amp;nbsp;what my project will be based on, so it makes no sense to base my code on something else....&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;See my Post here: &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/38306/confusing-docs-on-using-rtt-viwer-debug-terminal-with-segger"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/38306/confusing-docs-on-using-rtt-viwer-debug-terminal-with-segger&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No Log output to J-Link RTT Viewer</title><link>https://devzone.nordicsemi.com/thread/147803?ContentTypeID=1</link><pubDate>Fri, 07 Sep 2018 12:32:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:303be660-b8c7-4f86-84ae-97872c95d80a</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You cannot debug using Segger Embedded Studio (SES) and use the RTT Viewer at the same time. SES an integrated RTT viewer, and you cannot use two RTT viewers simultaneously.&lt;/p&gt;
&lt;p&gt;Most SDK examples have UART logging enabled by default. The only thing you need to do to get RTT logging working is to set&amp;nbsp;NRF_LOG_BACKEND_RTT_ENABLED to 1 in the projects sdk_config.h file. However, a few examples use the CLI interface instead of normal logging. This is the case for the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/twi_master_with_twis_slave_example.html?cp=4_0_1_4_5_44"&gt;TWIS Slave and TWI Master Mode Drivers Examples&lt;/a&gt;&amp;nbsp;that you are using. I recommend you use a different example if you want an example without CLI, for example the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/twi_sensor_example.html?cp=4_0_1_4_5_42"&gt;TWI sensor example&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No Log output to J-Link RTT Viewer</title><link>https://devzone.nordicsemi.com/thread/147734?ContentTypeID=1</link><pubDate>Fri, 07 Sep 2018 09:04:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7836ca7-4969-4a83-a377-6532fd28ded8</guid><dc:creator>gos</dc:creator><description>&lt;p&gt;Actually the RTT Viewer looks as this:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Jlink_5F00_RTT_5F00_Viwer_5F00_Log_5F00_Window.JPG" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>