<?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>BLE NRF52805 DFU bootloader can&amp;#39;t jump to the app</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/122708/ble-nrf52805-dfu-bootloader-can-t-jump-to-the-app</link><description>Hi, 
 Setup : SDK 17.1.0, SES 8.2, S112, custom buttonless uartless nrf52805 board, non-BLE test apps. 
 Objective : To enable robust wireless image download as next batch of boards will have debug interface removed. Security doesn&amp;#39;t matter at all 
 Problem</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 03 Jul 2025 22:21:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/122708/ble-nrf52805-dfu-bootloader-can-t-jump-to-the-app" /><item><title>RE: BLE NRF52805 DFU bootloader can't jump to the app</title><link>https://devzone.nordicsemi.com/thread/541389?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2025 22:21:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:208d35a3-c232-417b-b338-ac6ec8343659</guid><dc:creator>astomi</dc:creator><description>&lt;p&gt;Well, as expected, it was a typo in the app flash placement. Once I have fixed it to&amp;nbsp;0x00019000, it worked. Duh!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE NRF52805 DFU bootloader can't jump to the app</title><link>https://devzone.nordicsemi.com/thread/541386?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2025 21:01:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df1b743c-3655-4f67-b491-cdc5c304b4f7</guid><dc:creator>astomi</dc:creator><description>&lt;p&gt;To answer my own question. s112 specs &lt;a href="https://docs.nordicsemi.com/bundle/sds_s112/page/SDS/s1xx/mbr_bootloader/bootloader.html"&gt;suggest&lt;/a&gt; that it is done by the bootloader by calling&amp;nbsp; sd_softdevice_vector_table_base_set() and one should expect to find &amp;quot;Setting vector table to main app:&amp;quot; line in the bootloader&amp;#39;s log. But it is not there in my case. Further reading says it is actually hardcoded within softdevice. nrf52810 memory map gives me&amp;nbsp;0x00019000. And it correlates with log &amp;#39;&amp;lt;debug&amp;gt; nrf_dfu_validation: Write address set to 0x00019000&amp;#39;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE NRF52805 DFU bootloader can't jump to the app</title><link>https://devzone.nordicsemi.com/thread/541373?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2025 16:38:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8bed478-8f2b-488c-b8ac-78fb35d3330c</guid><dc:creator>astomi</dc:creator><description>&lt;p&gt;OK, I looked at the code. Apparently everything is hardcoded. Stack and start address are taken from Softdevice vector table, which is set equal to MBR_SIZE, which is hardcoded to 0x1000). But that doesnt&amp;#39; make much sense to me unless I am missing something here - it is supposed to be Stack and Start of my app, not Softdevice. Unless Softdevice vector table has redirects to actual locations - but how? It is very likely&amp;nbsp;that nothing is wrong with bootloader...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE NRF52805 DFU bootloader can't jump to the app</title><link>https://devzone.nordicsemi.com/thread/541367?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2025 15:49:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:584b71ef-e5c3-4177-a857-29685dea814d</guid><dc:creator>astomi</dc:creator><description>&lt;p&gt;Ignore remark above. I forgot it is not a debug buiid but rather a &amp;#39;Debug&amp;#39; Release&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE NRF52805 DFU bootloader can't jump to the app</title><link>https://devzone.nordicsemi.com/thread/541365?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2025 15:44:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e766bdeb-dd79-4a85-b8d3-3eba47dee114</guid><dc:creator>astomi</dc:creator><description>&lt;p&gt;That matches my observations&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE NRF52805 DFU bootloader can't jump to the app</title><link>https://devzone.nordicsemi.com/thread/541364?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2025 15:44:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d69076e-0513-4b70-b615-cfce31fa25a4</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;The&amp;nbsp;input arguments (reset_handler and new_msp)&amp;nbsp;are not pushed&amp;nbsp;on the stack. Check r0 and r1 instead. You can also try to single step from this function to&amp;nbsp;find out when the fault exception is raised.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE NRF52805 DFU bootloader can't jump to the app</title><link>https://devzone.nordicsemi.com/thread/541363?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2025 15:41:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebd1fbd6-4bbd-4728-8464-17a0441441e1</guid><dc:creator>astomi</dc:creator><description>&lt;p&gt;It seems to be some sort of missing config thing.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have traced bootloader execution down to&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;jump_to_addr(new_msp, reset_handler); // Jump directly to the App&amp;#39;s Reset Handler.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;in nrf_bootloader_app_start_final.c. And I have added both parameters to the watch list - neither is recognised.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1751557290601v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE NRF52805 DFU bootloader can't jump to the app</title><link>https://devzone.nordicsemi.com/thread/541362?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2025 15:37:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:adb5b822-c181-4457-b1f6-38dced04c842</guid><dc:creator>Vidar Berg</dc:creator><description>[quote userid="113304" url="~/f/nordic-q-a/122708/ble-nrf52805-dfu-bootloader-can-t-jump-to-the-app/541359"]pc=0x00000a60[/quote]
&lt;p&gt;That&amp;#39;s because you have the breakpoint on Hardfault enabled.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1751557073511v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE NRF52805 DFU bootloader can't jump to the app</title><link>https://devzone.nordicsemi.com/thread/541359?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2025 15:17:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53065b82-05e1-45c7-a489-e985a381b0c5</guid><dc:creator>astomi</dc:creator><description>[quote userid="4240" url="~/f/nordic-q-a/122708/ble-nrf52805-dfu-bootloader-can-t-jump-to-the-app/541325"]please use&amp;nbsp;Segger Embedded Studio version 5.x[/quote]
&lt;p&gt;Built by 5.68 - no changes&lt;/p&gt;
[quote userid="4240" url="~/f/nordic-q-a/122708/ble-nrf52805-dfu-bootloader-can-t-jump-to-the-app/541325"]I recommend you start a debug session in SES[/quote]
&lt;p&gt;pc=0x00000a60&lt;/p&gt;
[quote userid="4240" url="~/f/nordic-q-a/122708/ble-nrf52805-dfu-bootloader-can-t-jump-to-the-app/541325"]you should reserve the first 8 bytes of RAM in your application[/quote]
&lt;p&gt;No changes&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE NRF52805 DFU bootloader can't jump to the app</title><link>https://devzone.nordicsemi.com/thread/541325?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2025 12:35:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bdf8b33a-860e-4a78-ae72-7c158949ab8f</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t think it&amp;#39;s what&amp;#39;s causing the problem with not booting the app in this, but please use&amp;nbsp;Segger Embedded Studio version 5.x to build your app and bootloader as versions 6.20 and later have known compatibility issues with this SDK.&amp;nbsp;&lt;/p&gt;
[quote user=""]&lt;p&gt;If I generate bootloader setting and program them as well, the bootloader never starts DFU even on a blank (erased) chip with the same message as above.&lt;/p&gt;
&lt;p&gt;Judging by the power consumption (about 2.5ma)&amp;nbsp; nrf52805 is stuck in some sort of waiting loop or similar.&lt;/p&gt;[/quote]
&lt;p&gt;I recommend you start a debug session in SES and pause the debugger when you have reached this state. You can then check the Program Counter register (PC) in the register view to determine where the code hangs.&lt;/p&gt;
[quote user=""]Is there some bootloader/app integration guide? Or bootloader is smart enough to relocate off-the-shelf app to jump to?[/quote]
&lt;p&gt;The bootloader is&amp;nbsp;branching to address 0x1000 + 4 which is the address of the Softdevice&amp;#39;s reset handler, so this is correct.&lt;/p&gt;
[quote user=""]What&amp;nbsp;NO_VTOR_CONFIG actually does? Just sets vector table? I presume Softdevce sets vector table so both bootloader and app should be compiled with&amp;nbsp;NO_VTOR_CONFIG?[/quote]
&lt;p&gt;The SES startup code will set the &lt;a href="https://developer.arm.com/documentation/ddi0403/d/System-Level-Architecture/System-Address-Map/System-Control-Space--SCS-/Vector-Table-Offset-Register--VTOR"&gt;VTOR&lt;/a&gt; register to match the start address of the application unless&amp;nbsp;&lt;span&gt;NO_VTOR_CONFIG is set. VTOR needs to be =0 when working with the Softdevice to ensure interrupts are received by the MBR/Softdevice and not just the application.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Another thing to keep in mind is that the MBR/Softdevice uses the first to words of RAM even if the application is not enabling the Softdevice. This means that you should reserve the first 8 bytes of RAM in your application by setting the RAM start address to 0x20000008 or more. E.g.,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1751546061104v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;(Note: RAM_SIZE must not exceed total RAM on device - 8).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Vidar&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>