<?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>Overwrite Softdevice by application using Thread Secure DFU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/89664/overwrite-softdevice-by-application-using-thread-secure-dfu</link><description>Hi everyone, 
 I would like to overwrite my SoftDevice wchich I don&amp;#39;t use in my application. I found information about updates without Softdevice. 
 
 Its possible to update application without SD? I would like to change start app address from 0x26000</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 07 Jul 2022 07:16:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/89664/overwrite-softdevice-by-application-using-thread-secure-dfu" /><item><title>RE: Overwrite Softdevice by application using Thread Secure DFU</title><link>https://devzone.nordicsemi.com/thread/375935?ContentTypeID=1</link><pubDate>Thu, 07 Jul 2022 07:16:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9f15620-188a-4835-ab19-c29efde753a1</guid><dc:creator>PBeS</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I was able to prepare update with overwrite SD. This is my steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Prepare BL with sd-req 0x00, 0xAE and disable BLE support&lt;/li&gt;
&lt;li&gt;DFU BL&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Prepare APP with disabled BLE and set start app address to 0x1000 in ld script,&lt;/li&gt;
&lt;li&gt;DFU APP&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;I did dump of MCU&amp;nbsp;flash and my app start from 0x1000 address. It&amp;#39;s exactly what I wanted.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;br /&gt;Vidar,&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;thanks&lt;/span&gt;&lt;span style="font-family:inherit;"&gt; for the right tips&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Overwrite Softdevice by application using Thread Secure DFU</title><link>https://devzone.nordicsemi.com/thread/375774?ContentTypeID=1</link><pubDate>Wed, 06 Jul 2022 12:03:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67903aaa-a71f-4a50-8422-08c2b6b00f1b</guid><dc:creator>PBeS</dc:creator><description>&lt;p&gt;Yes, I saw it. I was change my app with sd-req 0x00,0xAE,0xCA and BL didin&amp;#39;t activate update after downloading. Im trying to update BL with sd-req 0x00, 0xAE and i will try again. In&amp;nbsp; your opinion is that good direction?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Overwrite Softdevice by application using Thread Secure DFU</title><link>https://devzone.nordicsemi.com/thread/375770?ContentTypeID=1</link><pubDate>Wed, 06 Jul 2022 11:58:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2012a8ef-4161-46d9-a687-6ab4afb2102b</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Then the app will not be allowed to overwrite the Softdevice. From&amp;nbsp; the nrf_dfu_ver_valdation.c::sd_req_ok() check:&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/pastedimage1657108698455v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Overwrite Softdevice by application using Thread Secure DFU</title><link>https://devzone.nordicsemi.com/thread/375766?ContentTypeID=1</link><pubDate>Wed, 06 Jul 2022 11:54:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:232b175c-11c5-46dc-83ee-c7ba148b8c90</guid><dc:creator>PBeS</dc:creator><description>&lt;p&gt;No, first BL was build with BLE support and flash&amp;nbsp;via serial.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Overwrite Softdevice by application using Thread Secure DFU</title><link>https://devzone.nordicsemi.com/thread/375761?ContentTypeID=1</link><pubDate>Wed, 06 Jul 2022 11:44:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a2a1300-7566-4ce9-ac70-f1e5d3353465</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I see. And is the bootloader built without BLE support as well (i.e. without BLE_STACK_SUPPORT_REQD flag and BLE dfu transport)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Overwrite Softdevice by application using Thread Secure DFU</title><link>https://devzone.nordicsemi.com/thread/375754?ContentTypeID=1</link><pubDate>Wed, 06 Jul 2022 11:25:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e369221e-cdac-446f-b17a-ee924adaf1dc</guid><dc:creator>PBeS</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote userid="4240" url="~/f/nordic-q-a/89664/overwrite-softdevice-by-application-using-thread-secure-dfu/375749"]Are you doing DFU over serial so the bootloaader is not depentent on the Softdevice for receiving the images?[/quote]
&lt;p&gt;I try to do DFU over Thread.&lt;/p&gt;
&lt;p&gt;My old BL&amp;nbsp;has configured sd_req = 0xAE (SD.6.1.0). Should I&amp;nbsp;update BL with sd_req = 0x00 and then try update APP again?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Overwrite Softdevice by application using Thread Secure DFU</title><link>https://devzone.nordicsemi.com/thread/375749?ContentTypeID=1</link><pubDate>Wed, 06 Jul 2022 11:14:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e686607f-5464-4cfd-b32e-71ff6c25e331</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote userid="105977" url="~/f/nordic-q-a/89664/overwrite-softdevice-by-application-using-thread-secure-dfu/375739"]In my opinion, update bl+sd can brick device, because app start address is different than storedin flash.[/quote]
&lt;p&gt;The app is always marked as invalid after a bl+sd update. This prevents the new bootloader from potentially booting a corrupted or incompatible app. There is also the app boot validation&amp;nbsp; (&lt;span class="item"&gt;&lt;a title="Boot validation" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/lib_secure_boot.html?cp=8_1_3_5_0_8_1#secure_boot_validation"&gt;Boot validation)&lt;/a&gt; that verifies the integrity of the image before booting it.&lt;/span&gt;&lt;/p&gt;
[quote userid="105977" url="~/f/nordic-q-a/89664/overwrite-softdevice-by-application-using-thread-secure-dfu/375739"]Could you tell me if&amp;nbsp;this&amp;nbsp;nrfutil pkg generate --hw-version 52 --sd-req 0x00 --application-version 60608 --application app.hex --key-file board_dfu_upgrade_key.pem customer-pkg.zip should overwrite SD by APP if I set flash addr to 0x1000?&amp;nbsp;[/quote]
&lt;p&gt;The bootloader has no way of knowing if the binary has been linked to the correct start address. Whether the app gets allowed to overwrite the Softdevice is determined by the sd-req field and if the bootloader is configured to support it.&lt;/p&gt;
&lt;p&gt;&lt;span class="item"&gt;Are you doing DFU over serial so the bootloaader is not depentent on the Softdevice for receiving the images?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Overwrite Softdevice by application using Thread Secure DFU</title><link>https://devzone.nordicsemi.com/thread/375739?ContentTypeID=1</link><pubDate>Wed, 06 Jul 2022 10:56:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61c5ce95-9b4b-4f35-a5a3-2ac1dd78e7cd</guid><dc:creator>PBeS</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;Thanks for reply.&lt;/p&gt;
&lt;p&gt;Yes, I have NRF_DFU_APP_DOWNGRADE_PREVENTION disabled.&lt;/p&gt;
&lt;p&gt;In my old app there is s140_nrf52_6.1.0 (SDK-2) included. New APP doesn&amp;#39;t need SD so I would like to remove It. In the other case if I would like to update SD to s140_nrf52_7.0.1 (SDK-4) app start address should be move:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;MEMORY
{
  FLASH (rx) : ORIGIN = 0x26000, LENGTH = 0xC3000&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;to&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;MEMORY
{
  FLASH (rx) : ORIGIN = 0x27000, LENGTH = 0xC2000&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In my opinion, update bl+sd can brick device, because app start address is different than storedin flash.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you tell me if&amp;nbsp;this&amp;nbsp;nrfutil pkg generate --hw-version 52 --sd-req 0x00 --application-version 60608 --application app.hex --key-file board_dfu_upgrade_key.pem customer-pkg.zip should overwrite SD by APP if I set flash addr to 0x1000?&amp;nbsp;&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><item><title>RE: Overwrite Softdevice by application using Thread Secure DFU</title><link>https://devzone.nordicsemi.com/thread/375728?ContentTypeID=1</link><pubDate>Wed, 06 Jul 2022 10:18:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea72df04-8bbf-4b4b-953b-179dfbafd8ee</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It is possible to replace the Softdevice through DFU if the bootloader is correctly configured for it. Have you disabled the NRF_DFU_APP_DOWNGRADE_PREVENTION setting in your bootloader? The bootloader will refuse the update otherwise.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>