<?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>Logging to file?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68918/logging-to-file</link><description>I need to get quite a lot of logs and quite fast too. How do I do I get the logs into a file? 
 I tried with Segger RTT logger, but it tends to give up quite quickly. I heard rumors that the RTT logger and debug terminal in the Segger Embedded Studio</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 17 Dec 2020 16:28:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68918/logging-to-file" /><item><title>RE: Logging to file?</title><link>https://devzone.nordicsemi.com/thread/285698?ContentTypeID=1</link><pubDate>Thu, 17 Dec 2020 16:28:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c44496b1-e1f0-46d7-926b-7fafc467ac66</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am happy to hear that you got it working!&lt;/p&gt;
&lt;p&gt;Feel free to return to this thread if you experience further issues of the same nature, or to create a new one should you need assistance with something else.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logging to file?</title><link>https://devzone.nordicsemi.com/thread/284531?ContentTypeID=1</link><pubDate>Fri, 11 Dec 2020 13:02:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0621cca0-5f69-4c1e-8b45-6a5876d9e17f</guid><dc:creator>turboscrew</dc:creator><description>&lt;p&gt;That worked. Not with the log viewer, but with the logger. The logger stopped acting up and didn&amp;#39;t drop any logs.&lt;/p&gt;
&lt;p&gt;THANKS!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logging to file?</title><link>https://devzone.nordicsemi.com/thread/283038?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2020 10:45:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3071d4b-f686-41e0-8fa1-2f3bfd122deb</guid><dc:creator>turboscrew</dc:creator><description>&lt;p&gt;I&amp;#39;ll try in the next run. The runs are so long, that it probably happens tomorrow.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logging to file?</title><link>https://devzone.nordicsemi.com/thread/283036?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2020 10:40:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08a046eb-b817-4712-9108-3fcdc5ea3ae9</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You could try to increase some buffer sizes, giving the viewer a bit more headroom for fetching the log. I got some partial log messages when increasing the message size, but doubled the NRF_LOG_BACKEND_RTT_TEMP_BUFFER_SIZE setting from 64 to 128 and then all messages went through. For the RTT itself you can increase SEGGER_RTT_CONFIG_BUFFER_SIZE_UP (default value 512). Both of those settings will impact memory usage.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logging to file?</title><link>https://devzone.nordicsemi.com/thread/282855?ContentTypeID=1</link><pubDate>Wed, 02 Dec 2020 11:07:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:680c22b5-2cc5-4e49-8774-287ac376e77d</guid><dc:creator>turboscrew</dc:creator><description>&lt;p&gt;The J-link RTT Viewer seems to work a bit better, but loses a lot of log messages.&lt;/p&gt;
&lt;p&gt;That can be seen if the log file is compared to debug terminal window. The debug terminal doesn&amp;#39;t seem to lose log messages.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logging to file?</title><link>https://devzone.nordicsemi.com/thread/282803?ContentTypeID=1</link><pubDate>Wed, 02 Dec 2020 08:23:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b40e439a-6c83-4f4e-a0dc-836ab627d267</guid><dc:creator>turboscrew</dc:creator><description>&lt;p&gt;Thanks, I&amp;#39;ll try that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logging to file?</title><link>https://devzone.nordicsemi.com/thread/282716?ContentTypeID=1</link><pubDate>Tue, 01 Dec 2020 15:03:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d1407c5-40c7-40be-bf13-f05915ea75de</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Right. I understand. I did not find a way for J-Link RTT Logger to connect to an existing session, but J-Link RTT Viewer can. The procedure to get the full log from a debug session is then:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In SES, start a debug session (but do not start execution yet).&lt;/li&gt;
&lt;li&gt;In J-Link RTT Viewer, choose &amp;quot;Existing Session&amp;quot; in the configuration dialog for connecting to a target.&lt;/li&gt;
&lt;li&gt;In J-Link RTT Viewer, choose &amp;quot;Start Terminal Logging&amp;quot; from the &amp;quot;Logging&amp;quot; menu and choose your file name.&lt;/li&gt;
&lt;li&gt;In SES, start the execution (and do whatever debugging you would like.)&lt;/li&gt;
&lt;li&gt;When you are done, either &amp;quot;Stop Terminal Logging&amp;quot; in J-Link RTT Viewer, or end the debug session in SES. In either case the logging should stop.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I did some testing with an nRF52832 DK, and I got way more than 16 kB/s from a test application logging some text and an increasing sequence number from an infinite loop. (It was consumed and logged at the speed sent from the DK.) I did not run it for long, though.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logging to file?</title><link>https://devzone.nordicsemi.com/thread/282628?ContentTypeID=1</link><pubDate>Tue, 01 Dec 2020 10:57:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46683d8c-e7cc-4ae2-b57f-3b469259a4e4</guid><dc:creator>turboscrew</dc:creator><description>&lt;p&gt;That is: about 16 kB per second, about 230 MB in all.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logging to file?</title><link>https://devzone.nordicsemi.com/thread/282536?ContentTypeID=1</link><pubDate>Mon, 30 Nov 2020 18:22:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db12cf17-7da4-43a8-92f2-b39d97f1ed0e</guid><dc:creator>turboscrew</dc:creator><description>&lt;p&gt;Say, 5 hours of logging, 2 shortish text lines per 2.5 ms.&lt;/p&gt;
&lt;p&gt;And yes, running in debugger with the logs going to file. I tried with the Segger RTT logger with the logs also going to the debug terminal, but after a couple of seconds it looked like the Segger RTT logger had restarted itself, or something. The log files contained nothing, or just so10 to 20 lines of text. The log messages were more or less flooding on the debug terminal every time.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m debugging a proprietary board through start52dk (debug out connector) ,and USB cable.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logging to file?</title><link>https://devzone.nordicsemi.com/thread/282534?ContentTypeID=1</link><pubDate>Mon, 30 Nov 2020 18:07:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6d7f5ad-a701-4c0f-8d24-a43659c51cb6</guid><dc:creator>awneil</dc:creator><description>[quote userid="8164" url="~/f/nordic-q-a/68918/logging-to-file/282524#282524"]RTT logging to the Segger Embedded Studio debug terminal should usually work fine[/quote]
&lt;p&gt;Segger broke this - so it now requires a change in sdk_config.h to actually see the logs:&lt;/p&gt;
&lt;p&gt;Change&amp;nbsp;NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED to &lt;strong&gt;zero&lt;/strong&gt; (default is 1)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Logging to file?</title><link>https://devzone.nordicsemi.com/thread/282524?ContentTypeID=1</link><pubDate>Mon, 30 Nov 2020 17:20:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6a5222b-b4a0-4543-8cbf-99d586a11f8d</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Can you quantify &amp;quot;quite a lot&amp;quot; and &amp;quot;quite fast&amp;quot;?&lt;/p&gt;
&lt;p&gt;RTT logging to the Segger Embedded Studio debug terminal should usually work fine, at least in my experience.&lt;/p&gt;
&lt;p&gt;What J-Link programmer are you using, the one integrated on a DK?&lt;/p&gt;
&lt;p&gt;Is the use case here that you wish to run a debug session, but get the logging through RTT logger instead of through SES?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>