<?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>RTT Viewer doesn&amp;#39;t always work</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/27852/rtt-viewer-doesn-t-always-work</link><description>Not really a question - I have had trouble with J-Link RTT Viewer for some time, when it works it&amp;#39;s a very useful tool, but it was only working about 25% of the time.
This evening I had a flash of inspiration, and plugged the J-Link lite into the main</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 07 Dec 2017 22:39:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/27852/rtt-viewer-doesn-t-always-work" /><item><title>RE: RTT Viewer doesn't always work</title><link>https://devzone.nordicsemi.com/thread/109751?ContentTypeID=1</link><pubDate>Thu, 07 Dec 2017 22:39:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b394199-e4ad-4c17-81da-a8494977b57d</guid><dc:creator>pmeilleur</dc:creator><description>&lt;p&gt;I wanted to share the most reliable and efficient method I found, which also allows using the excellent Log Viewer Log4View. Simply create and launch 2 distinct batch files, open Log4view and start debugging!&lt;/p&gt;
&lt;p&gt;The first batch file starts the JLINK Commander that reliably connects (and reconnects) to a target, buffers and make log output available through telnet. Rename as &amp;quot;jlinkcommander.bat&amp;quot; and start it once only;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;REM this is to start JLINK Commander, that collects log stuff and make it available through telnet port 19021
&amp;quot;C:\Program Files (x86)\SEGGER\JLink_V510d\JLink.exe&amp;quot; -device NRF52832_XXAA -if SWD -speed 4000 -autoconnect 1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then the 2nd batch file can be killed and restarted as desired to &amp;quot;cut&amp;quot; the log file, and store the previous log as an archive, which can be usefull for later reference. I called it &amp;quot;jlink_startlog.bat&amp;quot; :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;REM this script renames current log file, if any, to date-time format
REM then move all logs to subfolder archive
REM then starts a telnet receiver to localhost + stores output to a local file
REM this file can then be read through Log4View (file receiver, log format = pattern, %m (dump all directly)
REM Log4View could also be configured to track formatting like  UniversalTime (runtime in ms) log source, etc..
@echo off
echo wscript.echo year(date) ^&amp;amp; &amp;quot;-&amp;quot; ^&amp;amp; right(100+month(date),2) ^&amp;amp; &amp;quot;-&amp;quot; ^&amp;amp; right(100+day(date),2)^&amp;amp; &amp;quot;@&amp;quot; ^&amp;amp; right(100+hour(time),2) ^&amp;amp; &amp;quot;-&amp;quot; ^&amp;amp; right(100+minute(time),2) &amp;gt; &amp;quot;%temp%\dateparts.vbs&amp;quot;
for /f &amp;quot;tokens=1 delims=&amp;quot; %%a in (&amp;#39;cscript //nologo &amp;quot;%temp%\dateparts.vbs&amp;quot;&amp;#39;) do set yyyymmddhhmm=%%a
echo Now you can use this in your filename: %yyyymmddhhmm%
@echo on

if EXIST rtt_debug.log (
REN rtt_debug.log &amp;quot;%yyyymmddhhmm% - rtt_debug.log&amp;quot;
)

move %~dp0\*.log %~dp0\archive

telnet localhost 19021 -f rtt_debug.log
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Finally I recommend viewing the log output using Log4View. Simply configure a File Receiver, using the pattern %s to output the whole file content. You can also standardize the output format of all your NRF_LOG to feed the uptime in millisecond, the log source, the severity, etc.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[31761132] RFN0 &amp;gt;&amp;gt; [ForcedRxLoad] ignore (mode_site)
[31761134] RFN0 &amp;gt;&amp;gt; [RxProcessRun] &amp;lt;&amp;lt;&amp;lt; scan &amp;gt;&amp;gt;&amp;gt; FreqBandIsmRxDefaultOverride
[31770625] MODEM&amp;gt;&amp;gt; RX (12)
[31770626] MODEM&amp;gt;&amp;gt; 0000: C3 00 00 06 6B 17 01 00 00 00 7D EE -- -- -- -- 
[31770627] MODEM&amp;gt;&amp;gt; [ATRspProcess] app -&amp;gt; h_OnIpTunnelDataReceived (12)
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTT Viewer doesn't always work</title><link>https://devzone.nordicsemi.com/thread/109750?ContentTypeID=1</link><pubDate>Thu, 26 May 2016 16:49:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4aa6b31-45dc-49dd-acc9-0152a9baecf4</guid><dc:creator>JohnBrown</dc:creator><description>&lt;p&gt;Do you have more than one Segger connected? Not that I&amp;#39;ve touched a Nordic chip for months, but I seem to remember that the serial number question only arose when I had a J-link connected to the board under development AND a Nordic dongle plugged into the PC.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTT Viewer doesn't always work</title><link>https://devzone.nordicsemi.com/thread/109749?ContentTypeID=1</link><pubDate>Thu, 26 May 2016 15:30:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65a4d3cc-0341-42ea-87b8-6ab2b5e313cb</guid><dc:creator>Christopher</dc:creator><description>&lt;p&gt;I use the J-Link RTT client (&lt;code&gt;JLinkRTTClient.exe&lt;/code&gt;) in console mode which automatically reconnects and not the J-Link RTT Viewer.&lt;/p&gt;
&lt;p&gt;You should also keep your Segger tools updated to the latest version. use this link to downalod the latest tools: &lt;a href="https://www.segger.com/jlink-software.html"&gt;www.segger.com/jlink-software.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTT Viewer doesn't always work</title><link>https://devzone.nordicsemi.com/thread/109748?ContentTypeID=1</link><pubDate>Wed, 21 Oct 2015 09:55:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef189edf-6973-476c-a4a8-9f0dc3bf26fb</guid><dc:creator>JohnBrown</dc:creator><description>&lt;p&gt;Thanks. I have realised that reset (from Eclipse using nnrjprog) DOES seem to work, but pin reset, which I have been using, as I believe it turns debug mode off, does NOT work in conjunction with RTT Viewer. So am I only supposed to be able to use RTT Viewer when in debug mode? Maybe it&amp;#39;s been my problem all along...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTT Viewer doesn't always work</title><link>https://devzone.nordicsemi.com/thread/109747?ContentTypeID=1</link><pubDate>Wed, 21 Oct 2015 09:25:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ebe2a3d-01f3-4ba8-9556-2955f837bffb</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi. Maybe this is relevant? &lt;a href="https://devzone.nordicsemi.com/question/46290/how-should-i-reset-my-device-when-using-rtt/"&gt;How should I reset my device when using RTT&lt;/a&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTT Viewer doesn't always work</title><link>https://devzone.nordicsemi.com/thread/109746?ContentTypeID=1</link><pubDate>Wed, 21 Oct 2015 08:43:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25007fcc-3230-4cd9-ba9f-ebf033aee076</guid><dc:creator>JohnBrown</dc:creator><description>&lt;p&gt;&amp;quot;Upgraded&amp;quot; to 5.02d.
GCC moans about Segger&amp;#39;s use of char for array subscripts. Changed to unsigned char, seems to work.
Yes, it remembers the serial number now, but I still have to click on the tickbox that says &amp;quot;serial number&amp;quot;, Shame there isn&amp;#39;t a setting for this.&lt;/p&gt;
&lt;p&gt;If anyone from Segger ever looks at this forum, the ability to perform a reset from RTT Viewer would be really useful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTT Viewer doesn't always work</title><link>https://devzone.nordicsemi.com/thread/109745?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2015 21:18:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4a41699-91fc-42fb-bed2-ff4a0ff4ef49</guid><dc:creator>kirkus</dc:creator><description>&lt;p&gt;I also had reliability issues - until upgrading to 5.02d of both the Segger software and the RTT source code. That combo has been rock-solid for me (with a powered USB hub) for the nRF51/52 OB J-Link as well as my J-Link EDU. I just checked RTT Viewer 5.02d and it remembered the serial number.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>