<?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 in rtt viewer but segger yes</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97415/no-log-in-rtt-viewer-but-segger-yes</link><description>Hi, 
 I have no log using the segger rtt viewer, but when I start Segger in debug mode I have logs. I&amp;#39;m using an NRF52840 with NRF SDK 17 and MESH SDK 5.0.0. 
 My logs init : 
 
 
 The rtt viewer output: 
 * 
 
 The appconfig : 
 
 
 The log&amp;#39;s defines</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 13 Mar 2023 16:04:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97415/no-log-in-rtt-viewer-but-segger-yes" /><item><title>RE: No log in rtt viewer but segger yes</title><link>https://devzone.nordicsemi.com/thread/414988?ContentTypeID=1</link><pubDate>Mon, 13 Mar 2023 16:04:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1eaf5f24-1bc7-48b6-9231-7b10ef61139d</guid><dc:creator>Einar Thorsrud</dc:creator><description>[quote user="neicureuil"]When I tried to use &lt;span&gt;0x2000226C address in RTT viewer, no logs&lt;/span&gt;[/quote]
&lt;p&gt;That number was just relevant for my example. Looking at your ram_dump.txt there is an RTT buffer at a different location. Snippet of the relevant part:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;0x20006240: 00000000 00000000 00000000 47474553   |............SEGG|
0x20006250: 52205245 00005454 00000000 00000002   |ER RTT..........|&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So the RTT block here starts at&amp;nbsp;0x2000624C.&lt;/p&gt;
&lt;p&gt;I cannot say if this is from your bootloader or app though,&amp;nbsp;but if you have RTT logging enabled in both and only see one and this is when the app is running, it seems likely that the&amp;nbsp;bootloader RTT block has been overwritten and this is for the app. However, as it is just one, the RTT viewer would also be able to find this automatically. So it could also be that there is an other issue in this case. If so, please&amp;nbsp;elaborate a bit more about the issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No log in rtt viewer but segger yes</title><link>https://devzone.nordicsemi.com/thread/414869?ContentTypeID=1</link><pubDate>Mon, 13 Mar 2023 11:02:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0047719-702b-4009-a7cb-63777f9a6528</guid><dc:creator>neicureuil</dc:creator><description>&lt;p&gt;Hi, thanks for your answer.&lt;/p&gt;
&lt;p&gt;I have tried your command but I don&amp;#39;t have app logs inside.&lt;/p&gt;
&lt;p&gt;I only found bootloader logs.&lt;/p&gt;
&lt;p&gt;When I tried to use &lt;span&gt;0x2000226C address in RTT viewer, no logs&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ram_5F00_dump.txt"&gt;devzone.nordicsemi.com/.../ram_5F00_dump.txt&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: No log in rtt viewer but segger yes</title><link>https://devzone.nordicsemi.com/thread/414130?ContentTypeID=1</link><pubDate>Wed, 08 Mar 2023 12:57:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed9e566a-54d9-4a3b-856d-6aff7ebeceee</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I see from the RTT log in the screenshot that it is from your bootloader. Is the issue that you are not getting RTT logging from the application (except for when debugging)? If so, that is a common issue, and is related to having two separate RTT buffers. If the RTT Viewer finds the buffer for the bootloader first, it will not continue to&amp;nbsp;search for the buffer used by the application. One way to handle this is to specify where the RTT buffer is.&lt;/p&gt;
&lt;p&gt;If the application overwrites the RTT control block (identified by the magic string &amp;quot;SEGGER RTT&amp;quot;) that was used by the bootloader, and you then start the RTT viewer, it would only find the application RTT control block.&lt;/p&gt;
&lt;p&gt;However, if the application does not overwrite the RTT control block from the bootloader, then the RTT Viewer might find the control block used by the bootloader. This depends on where the linker places things, and can differ between builds, toolchains, etc. So as long as you have two independent and automatically placed RTT control blocks this will be unpredictable.&lt;/p&gt;
&lt;p&gt;Update: I tested this, and to find the RTT control block address manually you can dump the RAM like this (adjust the size for the amount of RAM on your device):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfjprog --memrd 0x20000000 --n 0x10000 &amp;gt; ram_dump.txt&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Then search for &amp;quot;SEGGER RTT&amp;quot; in the dump. This could be spread across multiple lines, so perhaps just &amp;quot;SEGGER&amp;quot; or &amp;quot;RTT&amp;quot;. On my test I found the block here:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;0x20002260: EFDECDBC 030201F0 0000C304 47474553   |............SEGG|
0x20002270: 52205245 00005454 00000000 00000002   |ER RTT..........|&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Which means that the RTT control block is at&amp;nbsp;0x2000226C in this case. Then, use RTT Viewer, check the &amp;quot;Address&amp;quot; radio button, and enter the address, and you will be able to read the RTT log.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>