<?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 to add standard bootloader and softdevice to custom project</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93422/how-to-add-standard-bootloader-and-softdevice-to-custom-project</link><description>Hi, 
 Using Windows 10 and SES 
 SEGGER Embedded Studio for ARM Release 6.34a Build 2022083102.51023 Windows x64 2014-2022 SEGGER Microcontroller GmbH 1997-2022 Rowley Associates Ltd. segger-as: version 2.11 segger-cc: version 14.2.1 segger-cc-ng: version</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 22 Nov 2022 13:34:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93422/how-to-add-standard-bootloader-and-softdevice-to-custom-project" /><item><title>RE: How to add standard bootloader and softdevice to custom project</title><link>https://devzone.nordicsemi.com/thread/396937?ContentTypeID=1</link><pubDate>Tue, 22 Nov 2022 13:34:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f22431f-7123-4d60-be5e-eb47028155aa</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Happy to help. &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;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add standard bootloader and softdevice to custom project</title><link>https://devzone.nordicsemi.com/thread/396801?ContentTypeID=1</link><pubDate>Tue, 22 Nov 2022 07:18:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee4294ad-5ae3-4564-9f8b-94ffe9b88727</guid><dc:creator>AndreasLiebenberg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I managed to deploy and it eventually works.&amp;nbsp; I think the trick was to not add the softdevice again as you suggested.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add standard bootloader and softdevice to custom project</title><link>https://devzone.nordicsemi.com/thread/393703?ContentTypeID=1</link><pubDate>Wed, 02 Nov 2022 14:34:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:193d075d-3bd0-4426-9680-5689aba7b07e</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
[quote user="AndreasLiebenberg"]As far as I understand the SD needed&amp;nbsp;with this version of the software and SDK is&amp;nbsp;s140_nrf52_6.1.1_softdevice.hex[/quote][quote user="AndreasLiebenberg"]&lt;p&gt;mergehex -m merged.hex s140_nrf52_6.1.1_softdevice.hex -o merged_output.hex&lt;/p&gt;
&lt;p&gt;Then I generate the .zip with:&lt;/p&gt;
&lt;p&gt;nrfutil pkg generate --hw-version 52 --application-version 0 --application merged_output.hex --sd-req 0xB6 --sd-id 0xB6 app_dfu_package.zip&lt;/p&gt;[/quote]
&lt;p&gt;Seem your app needs to work with&amp;nbsp;&lt;span&gt;s140_nrf52_6.1.1_softdevice, and you already have it on the board before updating the package. Then, it doesn&amp;#39;t need to merge with SD and package it.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="AndreasLiebenberg"]pc_ble_driver_py.exceptions.NordicSemiException: Response Code InsufficientResources[/quote]
&lt;p&gt;Please provide the log from bootloader with debug version and nRF Toolbox.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="AndreasLiebenberg"]pc_ble_driver_py.exceptions.NordicSemiException: Response Code InsufficientResources[/quote]
&lt;p&gt;Response Code InsufficientResources indicate the space is not enough. You could try to just update the app if SD in the pacakge is the same as the one on the device.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote user="AndreasLiebenberg"]Why would the Softdevice size be 0, do I have a sequence or still wrong command somewhere problem?&amp;nbsp;[/quote]
&lt;p&gt;I think that because acc_bluetooth_beacon.hex doesn&amp;#39;t include SD, but that result and flow is right since we generate setting for the app without SD.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add standard bootloader and softdevice to custom project</title><link>https://devzone.nordicsemi.com/thread/393635?ContentTypeID=1</link><pubDate>Wed, 02 Nov 2022 12:10:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6f4cbd4-f678-4251-996f-30aecbaf935d</guid><dc:creator>AndreasLiebenberg</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;/p&gt;
&lt;p&gt;Thanks for the useful info, not sure if I am further, but this is what I see when follow instruction from your info:&amp;nbsp; (I must say, every piece of documentation gives different ways to do the same thing.&amp;nbsp; I am at 4th version now, but still not working)&lt;/p&gt;
&lt;p&gt;I changed my commands to build the .zip package to:&lt;/p&gt;
&lt;p&gt;nrfutil settings generate --family NRF52840 --application acc_bluetooth_beacon.hex --application-version 0 --bootloader-version 0 --bl-settings-version 2 bootloader_setting.hex&lt;/p&gt;
&lt;p&gt;Then I merge my App with the generated settings.hex with:&lt;/p&gt;
&lt;p&gt;mergehex -m acc_bluetooth_beacon.hex settings.hex -o merged.hex&lt;/p&gt;
&lt;p&gt;Then I merge the softdevice with:&lt;/p&gt;
&lt;p&gt;mergehex -m merged.hex s140_nrf52_6.1.1_softdevice.hex -o merged_output.hex&lt;/p&gt;
&lt;p&gt;Then I generate the .zip with:&lt;/p&gt;
&lt;p&gt;nrfutil pkg generate --hw-version 52 --application-version 0 --application merged_output.hex --sd-req 0xB6 --sd-id 0xB6 app_dfu_package.zip&lt;/p&gt;
&lt;p&gt;All seems successful, but&amp;nbsp;deployment via Android nRF Toolbox fails on all steps after pressing start.&lt;/p&gt;
&lt;p&gt;If I try deployment vir nrfutil it fails with:&lt;/p&gt;
&lt;p&gt;ages\Python37\site-packages\nordicsemi\dfu\dfu_transport_serial.py&amp;quot;, line 505, in __get_response&lt;br /&gt; get_dict_key(DfuTransport.RES_CODE, resp[2])))&lt;br /&gt;pc_ble_driver_py.exceptions.NordicSemiException: Response Code InsufficientResources&lt;/p&gt;
&lt;p&gt;What is alaso confusing is that the DFU settings generated is:&lt;/p&gt;
&lt;p&gt;Bootloader DFU Settings:&lt;br /&gt;* File: bootloader_setting.hex&lt;br /&gt;* Family: NRF52840&lt;br /&gt;* Start Address: 0x000FF000&lt;br /&gt;* CRC: 0x1744AB5F&lt;br /&gt;* Settings Version: 0x00000002 (2)&lt;br /&gt;* App Version: 0x00000000 (0)&lt;br /&gt;* Bootloader Version: 0x00000000 (0)&lt;br /&gt;* Bank Layout: 0x00000000&lt;br /&gt;* Current Bank: 0x00000000&lt;br /&gt;* Application Size: 0x0001D42C (119852 bytes)&lt;br /&gt;* Application CRC: 0xC0609A19&lt;br /&gt;* Bank0 Bank Code: 0x00000001&lt;br /&gt;* Softdevice Size: 0x00000000 (0 bytes)&lt;br /&gt;* Boot Validation CRC: 0xFA4AC3D7&lt;br /&gt;* SD Boot Validation Type: 0x00000000 (0)&lt;br /&gt;* App Boot Validation Type: 0x00000001 (1)&lt;/p&gt;
&lt;p&gt;Why would the Softdevice size be 0, do I have a sequence or still wrong command somewhere problem?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add standard bootloader and softdevice to custom project</title><link>https://devzone.nordicsemi.com/thread/393523?ContentTypeID=1</link><pubDate>Tue, 01 Nov 2022 15:51:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c50d31e-554e-4057-843e-86e81dbd9db5</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
[quote user="AndreasLiebenberg"]How do I test it without DFU?&amp;nbsp; Do&amp;nbsp;you mean running it in Segger Debugger?[/quote]
&lt;p&gt;You can flash the app and SD to see it can run as the expected or not. Maybe check the log. Please confirm with&amp;nbsp;&lt;span&gt;Acconneer&amp;nbsp;how to verify it.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
[quote user="AndreasLiebenberg"]I assume this is the SD and bootloader combined?[/quote]
&lt;p&gt;What is the&amp;nbsp;&lt;span&gt;production_sw.hex?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I would suggest take a look at this tutorial &lt;a href="https://devzone.nordicsemi.com/guides/short-range-guides/b/software-development-kit/posts/getting-started-with-nordics-secure-dfu-bootloader#h61sjziauupw1j397q9s9ldr01q4j6d5"&gt;Getting started with Nordic&amp;#39;s Secure DFU bootloader, a step by step guide&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add standard bootloader and softdevice to custom project</title><link>https://devzone.nordicsemi.com/thread/393507?ContentTypeID=1</link><pubDate>Tue, 01 Nov 2022 14:56:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:079b82ca-e17a-4897-92b3-7cde0440902b</guid><dc:creator>AndreasLiebenberg</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;/p&gt;
&lt;p&gt;It is a normal sample available for a few years, Acconneer claims it works.&amp;nbsp; How do I test it without DFU?&amp;nbsp; Do&amp;nbsp;you mean running it in Segger Debugger?&lt;/p&gt;
&lt;p&gt;As far as I understand the SD needed&amp;nbsp;with this version of the software and SDK is&amp;nbsp;s140_nrf52_6.1.1_softdevice.hex&lt;/p&gt;
&lt;p&gt;I reset the hardware with the following:&lt;/p&gt;
&lt;p&gt;nrfjprog -f nrf52 --erasepage 0xFE000-0x100000&lt;br /&gt;nrfjprog -f nrf52 --program production_sw.hex --sectorerase --verify&lt;br /&gt;nrfjprog -f nrf52 --reset&lt;/p&gt;
&lt;p&gt;I assume this is the SD and bootloader combined?&lt;/p&gt;
&lt;p&gt;Where/how do I get the bootloader log for you?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add standard bootloader and softdevice to custom project</title><link>https://devzone.nordicsemi.com/thread/393487?ContentTypeID=1</link><pubDate>Tue, 01 Nov 2022 13:47:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a725c104-8c1c-4d60-9bd6-bf171c4f2300</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
[quote user=""]After lots of up and down with Acconneer we are convinced something is going wrong with how the deployment package is built.&amp;nbsp;[/quote]
&lt;p&gt;Could you make sure the application can work without issue before starting DFU?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What SD version does this application work with?&lt;/p&gt;
[quote user=""]nrfutil settings generate --family NRF52 --application acc_bluetooth_beacon.hex --application-version 1 --bootloader-version&amp;nbsp;2 --bl-settings-version 1 settings.hex[/quote]
&lt;p&gt;&lt;span&gt;For nRF52840, you use --family NRF52840. See&amp;nbsp;&lt;strong&gt;&lt;a href="https://devzone.nordicsemi.com/guides/short-range-guides/b/software-development-kit/posts/getting-started-with-nordics-secure-dfu-bootloader#h61sjziauupw1j397q9s9ldr01q4j6d5"&gt;Combine application, bootloader and softdevice image - Bootloader setting&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
[quote user=""]nrfutil pkg generate --hw-version 52 --application-version 1 --application merged_output.hex --sd-req 0xB6 --sd-id 0xB6 app_dfu_package.zip[/quote]
&lt;p&gt;Do you update SD? What is the SD version on the board to be replaced? Are you using open bootloader? The package seems doesn&amp;#39;t sign with the key.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Are you using the bootloader from the SDK? Could you provide the log from the bootloader?&amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>