<?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>Migrating from softdevice to a blank application</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/87682/migrating-from-softdevice-to-a-blank-application</link><description>Hi, My current application is using a softdevice and I need to update it using DFU to an application without softdevice. 
 The new application must start at 0x0 address, so I will need to erase both softdevice and MBR in the process of upgrade. 
 I&amp;#39;ve</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 10 May 2022 07:18:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/87682/migrating-from-softdevice-to-a-blank-application" /><item><title>RE: Migrating from softdevice to a blank application</title><link>https://devzone.nordicsemi.com/thread/367068?ContentTypeID=1</link><pubDate>Tue, 10 May 2022 07:18:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9f9c72f-b40f-434f-bd47-c7fc7b1032ea</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I your last suggestion makes most sense: replace the bootloader with your loader application. Then you update to that as if it was a normal bootloader update, and it would be started by the MBR. Then adjust VTOR to point to it before you erase the MBR and SoftDevice. That way you have full freedom with everything between address 0 and 0x72000.&lt;/p&gt;
&lt;p&gt;PS: Note that the DFU update you are doing here, replacing everything, cannot be done in a 100% safe way. If you get a reset at the wrong point, the device will be bricked and you will need to program it from a debugger in order to recover.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating from softdevice to a blank application</title><link>https://devzone.nordicsemi.com/thread/367014?ContentTypeID=1</link><pubDate>Mon, 09 May 2022 17:30:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b646f970-352b-45dd-b03f-1f4f3d376a9c</guid><dc:creator>SilkT</dc:creator><description>&lt;p&gt;Thank you for your help, Einar!&lt;/p&gt;
&lt;p&gt;With the following flow:&lt;/p&gt;
&lt;p&gt;1.1 Remove the flash protection for MBR and softdevice in the nRF bootloader.&lt;br /&gt;1.2 Upload &amp;#39;loader&amp;#39; application that is combined with blinky at an offset using the regular DFU process.&lt;br /&gt;2.1 In this &amp;#39;loader&amp;#39; application, set the&amp;nbsp;&lt;span&gt;Vector Table Offset Register&amp;nbsp;manually to the start of application (0x26000)&lt;br /&gt;2.2 Delete MBR and softdevice&lt;br /&gt;2.3 Copy the blinky to the 0x0 address&lt;br /&gt;2.4 reboot&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;I&amp;#39;ve successfully updated my BLE application using DFU to a BLEless blinky&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now my task becomes more complicated, because I actually need to update to an application that is larger than blinky and is larger than 0x26000.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;To my understanding, the &amp;#39;loader&amp;#39; application must be located at the 0x26000 address, as it is hardcoded in the softdevice. And it will be overwritten by itself and fail, if I do the same as with blinky.&lt;br /&gt;&lt;br /&gt;How would I overcome this?&lt;br /&gt;&lt;br /&gt;I have an idea of another layer between my loader and the MBR+softdevice. In this layer I would just have a jump to&amp;nbsp;the custom address where I would locate the loader application and it will be possible to do this process. Or maybe it&amp;#39;s possible to replace the Nordic bootloader that is located at 0x72000 by my custom loader.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating from softdevice to a blank application</title><link>https://devzone.nordicsemi.com/thread/366851?ContentTypeID=1</link><pubDate>Mon, 09 May 2022 08:23:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09715f1d-8e4e-44c7-9a92-f7a0027f5152</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I must say that this&amp;nbsp;is a quite radical change of firmware and not something you typically would do over DFU, and frankly not something I have ever contemplated before. That said, it should be possible.&lt;/p&gt;
&lt;p&gt;I believe your are on to something with regard to the interrupt vector table being related to the issue. The architecture of the MBR and SoftDevice is based on those forwarding interrupts further up the chain (see &lt;a href="https://infocenter.nordicsemi.com/topic/sds_s132/SDS/s1xx/processor_avail_interrupt_latency/interrupt_forwarding_to_application.html"&gt;Interrupt forwarding to the application&lt;/a&gt;). So when you delete the MBR and SoftDevice, you also delete the interrupt vector table, and that will cause great problems. The solution should be to use the&amp;nbsp;Vector Table Offset Register (VTOR) first, so that the CPU uses the vector table from wherever you have placed it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>