<?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>SES debugging session with pynrfjprog RTT issue</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/75604/ses-debugging-session-with-pynrfjprog-rtt-issue</link><description>I am working on a project that is implementing the segger_rtt framework. It&amp;#39;s based on an NRF52840, it&amp;#39;s running FreeRTOS and we&amp;#39;re using Segger Embedded Studio (SES). Using SWD interface through a Segger Flasher. I have both custom hardware and the PCA10056</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 06 Jun 2021 09:11:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/75604/ses-debugging-session-with-pynrfjprog-rtt-issue" /><item><title>RE: SES debugging session with pynrfjprog RTT issue</title><link>https://devzone.nordicsemi.com/thread/313781?ContentTypeID=1</link><pubDate>Sun, 06 Jun 2021 09:11:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9a94d80-05d8-4276-9129-94c13fad0bf3</guid><dc:creator>JediVille</dc:creator><description>&lt;p&gt;Thanks for your reply!&lt;/p&gt;
&lt;p&gt;I did debug the code to ensure that SEGGER_RTT_Read() kept getting called.&lt;/p&gt;
&lt;p&gt;The PC side using pynrfjprog claims that the data has been delivered.&lt;br /&gt;But on the device side the function SEGGER_RTT_Read() is called again and again and never returning any data.&lt;/p&gt;
&lt;p&gt;As mentioned - I have moved on to other tasks.&lt;/p&gt;
&lt;p&gt;Thanks again for your suggestions!&lt;/p&gt;
&lt;p&gt;//Jesper&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SES debugging session with pynrfjprog RTT issue</title><link>https://devzone.nordicsemi.com/thread/312779?ContentTypeID=1</link><pubDate>Tue, 01 Jun 2021 08:30:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:565d69eb-ce08-414e-bdf0-8f92a5fc7a30</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Sorry, my question was not clear. I meant to ask if you were enabling RTT in the logger module in addition to the direct Segger RTT API calls you mentioned, but I realize now that this had already been answered in your initial post. The question was not as relevant either considering the problem occured after adding vTaskDelay(0). I thought maybe there was an issue with both multiple accesses to the log buffer at first.&lt;/p&gt;
&lt;p&gt;Anyway. I&amp;#39;m afraid I can&amp;#39;t think of any good reasons for why&amp;nbsp;vTaskDelay(0) causes RTT data to not become read in this case.&amp;nbsp; Did you debug the code to confirm if SEGGER_RTT_Read() kept getting called after vTaskDelay(0)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SES debugging session with pynrfjprog RTT issue</title><link>https://devzone.nordicsemi.com/thread/312644?ContentTypeID=1</link><pubDate>Mon, 31 May 2021 13:00:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b21694f4-89f6-447d-9390-cdd8b6cc133a</guid><dc:creator>JediVille</dc:creator><description>&lt;p&gt;Thank you for your reply.&lt;br /&gt;&lt;br /&gt;That is probably what is happening, Something in the Nordic DLLs probably disables the debug interface when an object gets destroyed.&lt;/p&gt;
&lt;p&gt;I can live with the behaviour - I just got curious and wanted to understand what was happening and see if there was a way around it.&lt;/p&gt;
&lt;p&gt;For the other question I am not sure what you mean.&lt;/p&gt;
&lt;p&gt;I am using the NRF logger and the RTT backend.&lt;br /&gt;&lt;br /&gt;The NRF logger and the RTT backend are running on separate channels.&lt;/p&gt;
&lt;p&gt;In the device the function SEGGER_RTT_Read is called in a while(1) loop ( a FreeRTOS task ).&lt;br /&gt;If anything is read it gets processed - and NRF logger may be used depending on the content.&lt;br /&gt;However I felt like trying to insert a vTaskDelay in case nothing is read and that resulted in SEGGER_RTT_Read never returning anything read - even if the PC running the script claims to have delivered data usign the rtt_write function in pynrfjprog.&lt;br /&gt;I haven&amp;#39;t digged further into it - it is debug and test code and it is not important to add a task delay really. I was just curious.&lt;br /&gt;&lt;br /&gt;Thanks again,&lt;br /&gt;//Jesper&lt;/p&gt;
&lt;p&gt;As a curiosum I can mention that I wanted to try out the Telnet connection according to this:&lt;br /&gt;&lt;a href="https://wiki.segger.com/RTT#TELNET_channel_of_J-Link_software"&gt;https://wiki.segger.com/RTT#TELNET_channel_of_J-Link_software&lt;/a&gt;&lt;br /&gt;I couldn&amp;#39;t succeed in sending the configuration command within 100ms of connecting using any telnet application I could find ( PuTTY, MobaXterm and plenty of others ) - except for one, Telnet Scripting Tool 1.0.&lt;br /&gt;I even asked on the Segger forums how to achieve this since they even mention PuTTY but have yet to receive an answer.&lt;br /&gt;&lt;br /&gt;I could write my own client if I wanted to go through that interface - and even create a DLL I could use with test scripts.&lt;br /&gt;And that should leave the debug interface untouched.&lt;br /&gt;But seeing as there really isn&amp;#39;t a need I will leave it at that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SES debugging session with pynrfjprog RTT issue</title><link>https://devzone.nordicsemi.com/thread/312621?ContentTypeID=1</link><pubDate>Mon, 31 May 2021 11:41:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8cf7f985-6250-4ce7-aaa0-e67e3fea9f0e</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;You may run into some conflicts when you have two or more debugger connections to the same target. For instance, the debugger scripts will usually disable the debug interface on the chip before they disconnect to prevent the chip from staying in debug interface mode. This means you are likely to lose both connections if you terminate one.&lt;/p&gt;
[quote user=""]Below is a copy of the JLINK log that shows JLINK_IsHalted() begins to return ERROR. &lt;br /&gt;This should be around the time where the script is completed.[/quote]
&lt;p&gt;&amp;nbsp;The nRF52840 is probably no longer in debug interface mode at this point&lt;/p&gt;
[quote user=""]I also have another issue that I am having trouble wrapping my head around..&lt;br /&gt;The task that is handling segger communications calls &lt;br /&gt;SEGGER_RTT_Read&lt;br /&gt;in a while(1) loop and if anything has been received it gets processed.[/quote]
&lt;p&gt;&amp;nbsp;Are you also the NRF logger module with the RTT backend? &lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>