<?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>OpenOCD debugging not working on boards with new flash protector</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/103387/openocd-debugging-not-working-on-boards-with-new-flash-protector</link><description>Hi all! I have several pca10056 boards, some of which are quite old with a serial number &amp;lt; 1000000000 . There are boards with higher serial numbers that come with factory-installed flash memory protection. On these new boards, debugging through openocd</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 05 Sep 2023 06:50:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/103387/openocd-debugging-not-working-on-boards-with-new-flash-protector" /><item><title>RE: OpenOCD debugging not working on boards with new flash protector</title><link>https://devzone.nordicsemi.com/thread/444420?ContentTypeID=1</link><pubDate>Tue, 05 Sep 2023 06:50:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ffcc87e-dc50-416a-847f-2024f53482a5</guid><dc:creator>Susheel Nuguru</dc:creator><description>[quote user="Yury Morgunov"]Is Monitor mode debugging available under license on pca10056?[/quote]
&lt;p&gt;I think that the&lt;span&gt;&amp;nbsp;J-Link OB that is included on&amp;nbsp;the DKs does not include a license for monitor mode debugging. On Windows machines, the J-Link driver will allow evaluation of the monitor mode debugging feature if the user accepts a license pop-up.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote user="Yury Morgunov"]The goal is to completely stop the processor and see the current state[/quote]
&lt;p&gt;That should not be a problem with any debugger, but we do not test this and I do not think we support OpenOCD with NCS but it looks like &lt;a href="https://docs.zephyrproject.org/3.1.0/develop/flash_debug/probes.html#flash-and-debug-with-st-link"&gt;Zephyr does&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OpenOCD debugging not working on boards with new flash protector</title><link>https://devzone.nordicsemi.com/thread/444418?ContentTypeID=1</link><pubDate>Tue, 05 Sep 2023 06:27:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2bd057f0-6359-4953-bfef-6d4af0ca6b71</guid><dc:creator>Yury Morgunov</dc:creator><description>&lt;p&gt;Yes, I am using the application with softdevice. The goal is to completely stop the processor and see the current state. I don&amp;#39;t need to step through the code. In general, openocd did an excellent job with this task.&lt;/p&gt;
&lt;p&gt;Is Monitor mode debugging available under license on pca10056?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OpenOCD debugging not working on boards with new flash protector</title><link>https://devzone.nordicsemi.com/thread/444307?ContentTypeID=1</link><pubDate>Mon, 04 Sep 2023 11:50:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a8e2634-d61f-4d96-9764-147744b27f15</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Which application are you running on the board? Is it a BLE based application using the softdevice?&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/17/how-can-i-debug-a-softdevice-application"&gt; If so, then you cannot pause and run the application&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You might have to use &lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/monitor-mode-debugging---revolutionize-the-way-you-debug-ble-applications"&gt;Monitor mode debugging&lt;/a&gt; to be able to do that&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OpenOCD debugging not working on boards with new flash protector</title><link>https://devzone.nordicsemi.com/thread/444267?ContentTypeID=1</link><pubDate>Mon, 04 Sep 2023 09:25:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78c7f40c-e7b4-4fc4-a6ab-72b081cd36e6</guid><dc:creator>Yury Morgunov</dc:creator><description>&lt;p&gt;I got to the point where I started using openocd. Here is the command to start the server.&lt;pre class="ui-code" data-mode="text"&gt;JLinkGDBServer -singlerun -nogui -if swd -port 50000 -swoport 50001 -telnetport 50002 -device nrf52840_xxaa -select usb=1050232322 -rtos GDBServer/RTOSPlugin_FreeRTOS.so -speed 1000 -noir -nohalt&lt;/pre&gt;Everything works, everything starts, but there is one important problem. FreeRTOS streams are not readable.&lt;br /&gt;Manual requests for thread or stack information:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;info threads
  Id   Target Id         Frame 
  2    Remote target     0x00025f40 in ?? ()

The current thread &amp;lt;Thread ID 
1&amp;gt; has terminated.  See `help thread&amp;#39;.
{&amp;quot;output&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;token&amp;quot;:37,&amp;quot;outOfBandRecord&amp;quot;:[],&amp;quot;resultRecords&amp;quot;:{&amp;quot;resultClass&amp;quot;:&amp;quot;done&amp;quot;,&amp;quot;results&amp;quot;:[]}}&lt;/pre&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;bt
The current thread has terminated
The current thread has terminated (from interpreter-exec console &amp;quot;bt&amp;quot;)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I can only get this information if I continue&amp;nbsp;executing the code and immediately pause it. Then everything starts to work, but this is not what is needed.&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;[New Thread 537086184]
[New Thread 537084752]
[New Thread 537088640]
[New Thread 537097944]
[New Thread 537095784]
[New Thread 537091976]
[New Thread 537069128]
[New Thread 537078200]

Thread 
3 received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 537086184]
0x0006f3c0 in nrfx_coredep_delay_us::delay_machine_code ()&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t have enough understanding of the debugging process to do anything with this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OpenOCD debugging not working on boards with new flash protector</title><link>https://devzone.nordicsemi.com/thread/444260?ContentTypeID=1</link><pubDate>Mon, 04 Sep 2023 09:08:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca1e105f-7829-4ddd-9f60-7f76d7277464</guid><dc:creator>Yury Morgunov</dc:creator><description>&lt;p&gt;Yes, the devices connect and work well via jlink. Debugging even works.&lt;/p&gt;
&lt;p&gt;Thanks for the hint, I&amp;#39;ll try to attach it through the jlink debugger.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OpenOCD debugging not working on boards with new flash protector</title><link>https://devzone.nordicsemi.com/thread/444082?ContentTypeID=1</link><pubDate>Fri, 01 Sep 2023 11:57:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb641003-8e0a-4228-af3f-df8a161eb260</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Do the J-link devices show up in dmesg or in &amp;quot;lsusb&amp;quot; at all?&lt;/p&gt;
&lt;p&gt;The J-Link GDB server &lt;em&gt;can&lt;/em&gt; attach to running code with the &amp;quot;-noir -nohalt&amp;quot; command line parameters.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>