<?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>DFU and Bootloader Debugging</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13589/dfu-and-bootloader-debugging</link><description>What&amp;#39;s the best way to debug an application that is not starting after an OTA DFU update. The app said the update was successful but nothing booted and it didn&amp;#39;t even seem like the CPU was running. The boot loader wasn&amp;#39;t even advertising DFUTarg. I checked</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 25 Jan 2017 10:00:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13589/dfu-and-bootloader-debugging" /><item><title>RE: DFU and Bootloader Debugging</title><link>https://devzone.nordicsemi.com/thread/51837?ContentTypeID=1</link><pubDate>Wed, 25 Jan 2017 10:00:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68db102b-a515-4b35-a1bc-98b405af97a1</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;@AnnaSBX: Can you create a separate question where you describe your issue in detail?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU and Bootloader Debugging</title><link>https://devzone.nordicsemi.com/thread/51836?ContentTypeID=1</link><pubDate>Mon, 23 Jan 2017 16:26:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:721d614e-e080-4d76-b473-55f3daa1e24b</guid><dc:creator>AnnaSBX</dc:creator><description>&lt;p&gt;But how I can debug it? In my case I think that the bootloader didnt recognize the app and stay in DFU mode. I can not succses to put a breakpoint  and no have an idea how to debug it :(&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU and Bootloader Debugging</title><link>https://devzone.nordicsemi.com/thread/51834?ContentTypeID=1</link><pubDate>Mon, 11 Jul 2016 09:21:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8c40c2e-c06e-42c1-b251-0c8474d4092d</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Darren,&lt;br /&gt;
I apologize for following up this late. Have you been able to solve this issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU and Bootloader Debugging</title><link>https://devzone.nordicsemi.com/thread/51833?ContentTypeID=1</link><pubDate>Wed, 04 May 2016 05:42:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f26cd32-518d-4a10-9d95-36ec085181d9</guid><dc:creator>WestCoastDaz</dc:creator><description>&lt;p&gt;Bjorn,&lt;/p&gt;
&lt;ol start="2"&gt;
&lt;li&gt;No the application wasn&amp;#39;t advertising.  I think maybe the reason is the debugger was set to run to the application main after downloading to the target.  Maybe it was somehow bypassing the boot loader which  is why the interrupts didn&amp;#39;t get forwarded to the application.  Do you think this may have been the cause?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU and Bootloader Debugging</title><link>https://devzone.nordicsemi.com/thread/51831?ContentTypeID=1</link><pubDate>Tue, 03 May 2016 11:03:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:720fde8b-fc72-4de5-8b47-767d3aae8f40</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Yes, since the device does not reset when jumping to the application, the Clock peripheral would be initialized by the bootloader and reinitializing it in the application will lead to a Hardfault.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;No, not really.  The MBR will forward interrupts to the bootloader if a bootloader is present, the bootloader will then check if there is a SD present. If the SD is present the BL will initialize it, resulting in the MBR forwarding interrupts to the SD instead of the BL. However, the BL will also configure the SD to pass on interrupts by calling &lt;code&gt;sd_softdevice_vector_table_base_set(BOOTLOADER_REGION_START)&lt;/code&gt;. Just before the BL jumps to the application it will tell the SD to forward interrupts to the application, i.e. &lt;code&gt;sd_softdevice_vector_table_base_set(CODE_REGION_1_START)&lt;/code&gt;. After this point only the Application should receive interrupts. Does the application advertise?&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU and Bootloader Debugging</title><link>https://devzone.nordicsemi.com/thread/51832?ContentTypeID=1</link><pubDate>Tue, 03 May 2016 03:30:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b6fd830-d81d-41e2-884c-7d5055411529</guid><dc:creator>WestCoastDaz</dc:creator><description>&lt;p&gt;Bjorn,&lt;/p&gt;
&lt;p&gt;Thanks for the tip.  It turned out that the application was hard faulting due to an extra nrf_drv_clock_init() call in our FreeRTOS implementation.  During my debugging I found some strange things I am hoping you can comment on:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The application wouldn&amp;#39;t produce a hardfault when the bootloader wasn&amp;#39;t present.  My guess is this is because the bootloader has set up the clock and this call was redundant when jumping from the bootloader to the application?&lt;/li&gt;
&lt;li&gt;When the app was uploaded via DFU and I attached to the running target from my bootloader project I could debug both the bootloader and the application correctly.  When I tried to attach to the running target from my application project with the bootloader in FLASH it&amp;#39;s like the interrupts were still forwarded to the bootloader in the MBR.  Any idea what would cause this?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU and Bootloader Debugging</title><link>https://devzone.nordicsemi.com/thread/51835?ContentTypeID=1</link><pubDate>Mon, 02 May 2016 12:55:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5bb2fd92-7533-4133-9cf2-64952b09a306</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;I would start by debugging the bootloader and verifying that it reaches &lt;code&gt;bootloader_app_start(DFU_BANK_0_REGION_START)&lt;/code&gt;  and executes without asserting. If the &lt;code&gt;bootloader_app_start()&lt;/code&gt; function executes without asserting, then the bootloader has successfully branched to the application, suggesting that the issue lies in the application. If this is the case, then I would start a debug session with the application and see if it ended up in the hardfault handler.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>