<?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>How do Debug DFU?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/9427/how-do-debug-dfu</link><description>I&amp;#39;ve followed the instructions here to try and get my J-Link debugger to run in bootloader. 
 I am using a newer SDK and SD (than the post was written for) so that may have something to do with why I can&amp;#39;t get the debugger to run. 
 I&amp;#39;m using:
Custom</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 01 Oct 2015 22:59:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/9427/how-do-debug-dfu" /><item><title>RE: How do Debug DFU?</title><link>https://devzone.nordicsemi.com/thread/34800?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2015 22:59:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0eac5e9-1a2b-4b77-b417-1c9c9f692f0c</guid><dc:creator>c cook</dc:creator><description>&lt;p&gt;This worked but in order to get the debugger to work in the DFU I had to:
1- Build the DFU in Keil uVision 5 and enter the debug mode (which loaded the DFU source code into Keil&amp;#39;s debugger).
2- Exit the debugger, and use the nNRgo Studio&amp;#39;s Program Bootloader tab to load the bootloader
3- Go back to uVision and click the debugger button.  At which point I could use the debugger.&lt;/p&gt;
&lt;p&gt;I do not understand why, but in order to get the debugger to run I had to load the DFU with nRFgo Studio.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do Debug DFU?</title><link>https://devzone.nordicsemi.com/thread/34799?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2015 14:06:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f9e7d16-681b-4558-a7e7-da3a104103c0</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I use the default bootloader in SDK 9.0.0 for SD 310 and follow the instruction given on the &lt;a href="https://devzone.nordicsemi.com/question/18039/bootloader-debugging/"&gt;given thread&lt;/a&gt;, and I am able to debug the bootloader. What difficulties are you facing exactly? Are you seeing any errors or is a breakpoint in the bootloader main function just not hit when you start the debugger?&lt;/p&gt;
&lt;p&gt;It is possible that you need more space for the bootloader than given in the linked thread if you have made any modifications to the default bootloader in the SDK. To check if that is the issue, you could set&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define BOOTLOADER_REGION_START 0x00030000
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and set IROM start to be 0x00030000 and IROM size to 0xFC00&lt;/p&gt;
&lt;p&gt;Optimally, you can see how much ROM (flash space) the bootloader occupies when it is not compressed by &lt;a href="https://devzone.nordicsemi.com/question/23059/how-to-monitor-flash-and-ram-usage-after-compilation/"&gt;summing the Code, RO-data and RW-data sizes&lt;/a&gt; that is given when you compile uncompressed bootloader&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update 2.10.2015&lt;/strong&gt;
You must erase the chip by e.g. pressing &amp;quot;ERASE ALL&amp;quot; in nRFgo Studio, then program softdevice again, then the bootloader. Have you done that?&lt;/p&gt;
&lt;p&gt;Keil runs nrfjprog.exe in the the background when programming the bootloader. I have the following arguments set in Keil to program the bootloader&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Capture-_2D00_-Keil-nrfjprog-arguments-for-programming-bootloader.JPG" alt="image description" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>