<?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>Trying to debug with MCUBOOT enabled fails to boot.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/115077/trying-to-debug-with-mcuboot-enabled-fails-to-boot</link><description>Hello, I am looking for a way to debug firmware that includes MCUBOOT. There seem to be quite some questions in regards to same problem with no real resolution. I am using various versions of JLink, it seems that the problem occurs when flash breakpoint</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 30 Sep 2024 06:04:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/115077/trying-to-debug-with-mcuboot-enabled-fails-to-boot" /><item><title>RE: Trying to debug with MCUBOOT enabled fails to boot.</title><link>https://devzone.nordicsemi.com/thread/504273?ContentTypeID=1</link><pubDate>Mon, 30 Sep 2024 06:04:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:856b0f44-5ad4-4da2-96a8-6bb5fe5dc56b</guid><dc:creator>MatjazK</dc:creator><description>&lt;p&gt;Looking a bit further into this I found I need two things to make sure this works:&lt;br /&gt;- disable flash breakpoint&lt;br /&gt;- load mcuboots .elf file during debug launch&lt;/p&gt;
&lt;p&gt;for cortex debugs launch.json configuration on VSCode that was resolved by adding following lines to debug launch:&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;pre class="notranslate"&gt;      &lt;span class="pl-ent"&gt;&amp;quot;loadFiles&amp;quot;&lt;/span&gt;: [
        &lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;&amp;quot;&lt;/span&gt;/workspaces/project/app/build/mcuboot/zephyr/zephyr.elf&lt;span class="pl-pds"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;
      ],
      &lt;span class="pl-ent"&gt;&amp;quot;preLaunchCommands&amp;quot;&lt;/span&gt;: [&lt;span class="pl-s"&gt;&lt;span class="pl-pds"&gt;&amp;quot;&lt;/span&gt;monitor flash breakpoints = 0&lt;span class="pl-pds"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;]&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to debug with MCUBOOT enabled fails to boot.</title><link>https://devzone.nordicsemi.com/thread/504132?ContentTypeID=1</link><pubDate>Fri, 27 Sep 2024 09:08:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:299f65db-25a6-4412-8682-cbacde6b8a80</guid><dc:creator>Torsten Robitzki</dc:creator><description>&lt;p&gt;According to the documentation, there is a GDB monitor command to disable flash breakpoints:&amp;nbsp;&lt;a href="https://wiki.segger.com/J-Link_GDB_Server#flash_breakpoints"&gt;https://wiki.segger.com/J-Link_GDB_Server#flash_breakpoints&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to debug with MCUBOOT enabled fails to boot.</title><link>https://devzone.nordicsemi.com/thread/504130?ContentTypeID=1</link><pubDate>Fri, 27 Sep 2024 09:01:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df5f7801-989b-4ec3-a023-13e591519676</guid><dc:creator>MatjazK</dc:creator><description>&lt;p&gt;Any idea how to achieve that? I have tried various things in effort to disable those with no luck.&lt;br /&gt;Another interesting finding is, that using &amp;quot;debug&amp;quot; command breaks bootloader, using &amp;quot;attach&amp;quot; however - works fine. Even when resetting MCU after attach bootloader works fine&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to debug with MCUBOOT enabled fails to boot.</title><link>https://devzone.nordicsemi.com/thread/504128?ContentTypeID=1</link><pubDate>Fri, 27 Sep 2024 08:53:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e23170b6-667d-4c1b-adf7-39c40b0f1d2b</guid><dc:creator>Torsten Robitzki</dc:creator><description>&lt;p&gt;Basically, the Cortex M4 core should have enough hardware breakpoints for basic debugging. I would try to find a way, to disable Seggers software break points, to see if this makes a differences.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>