<?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>NRF5340 Seems to flash, but fails to debug using VSC</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/95409/nrf5340-seems-to-flash-but-fails-to-debug-using-vsc</link><description>Hello, 
 I am having issues debugging my nRF5340 chip using VS code. When I flash, there is no indication that it fails from the console. When I try to debug however, my debugger launches but is always paused. When I try to step through or step out, I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 06 Jan 2023 21:06:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/95409/nrf5340-seems-to-flash-but-fails-to-debug-using-vsc" /><item><title>RE: NRF5340 Seems to flash, but fails to debug using VSC</title><link>https://devzone.nordicsemi.com/thread/403658?ContentTypeID=1</link><pubDate>Fri, 06 Jan 2023 21:06:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6554d8e2-89e9-4cd2-aefd-90d9a3b74864</guid><dc:creator>TommyKirscher</dc:creator><description>&lt;p&gt;I swapped out the J-link that I was using. Turns out that was the issue. I am now able to properly debug my board.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 Seems to flash, but fails to debug using VSC</title><link>https://devzone.nordicsemi.com/thread/403643?ContentTypeID=1</link><pubDate>Fri, 06 Jan 2023 16:25:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8b69cbd-8717-4768-a375-117df9a66bdb</guid><dc:creator>TommyKirscher</dc:creator><description>&lt;p&gt;Hi Dejan,&lt;/p&gt;
&lt;p&gt;Is there a way of adding --recover to my west flash command using VSC?&lt;/p&gt;
&lt;p&gt;I added&amp;nbsp;&lt;code&gt;&lt;span&gt;&amp;quot;args&amp;quot;&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;&amp;quot;--recover&amp;quot; &lt;/span&gt;&lt;/code&gt;to my launch.json, but it doesn&amp;#39;t seem to accept &amp;quot;args&amp;quot;. The only location that I found &amp;quot;west flash&amp;quot; was in build.ninja, and adding &lt;code&gt;--recover&lt;/code&gt; to that line did not seem to change anything.&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 Seems to flash, but fails to debug using VSC</title><link>https://devzone.nordicsemi.com/thread/403553?ContentTypeID=1</link><pubDate>Fri, 06 Jan 2023 11:34:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c58b70d7-d172-451d-9151-4e4022790d51</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Problems with debugging might be caused by enabled&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.2.0/nrf/ug_nrf5340.html#readback-protection"&gt;readback protection&lt;/a&gt;. Option --recover of either &amp;quot;west flash&amp;quot; or &amp;quot;nrfjprog&amp;quot; should be used to disable readback protection. I tested on empty_app_core sample and without --recover I have seen &amp;quot;Unable to step out: Cannot find the caller frame (from exec-finish --thread 1)&amp;quot; message. Adding CONFIG_DEBUG_OPTIMIZATIONS and CONFIG_DEBUG_THREAD_INFO did not change anything. Note that I included &amp;quot;Enable Debug options&amp;quot; when creating build configuration.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF5340 Seems to flash, but fails to debug using VSC</title><link>https://devzone.nordicsemi.com/thread/403501?ContentTypeID=1</link><pubDate>Fri, 06 Jan 2023 01:46:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3408644-f9a8-4bbe-809a-f96a2c76d9c3</guid><dc:creator>TommyKirscher</dc:creator><description>&lt;p&gt;&lt;span style="font-size:inherit;"&gt;I actually just got it to work in a very janky way. Seems somewhat reliably reproduceable. I can begin debugging if I do the following:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;Get the debugger to launch and leave it open&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;Reboot the kit&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;While the debugger is still on, launch the debugger again&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;VSC will ask if it can erase flash memory, say yes. If you don&amp;#39;t get the prompt, it doesn&amp;#39;t seem to work&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;Press play on the debugger. Step through won&amp;#39;t work, but pausing again will stop the program and show your cursor in the program.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;Still a pretty painful process, and I don&amp;#39;t think that break points work with this method.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>