<?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 BLE DFU to a NCS firmware application?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/83455/how-to-add-ble-dfu-to-a-ncs-firmware-application</link><description>Dear Nordic experts, Considering a Bluetooth Mesh application based on NCS 1.7.1 and running on an nRF52832 : What steps need to be done to add DFU over Bluetooth LE ? Is there a user guide somewhere? Although there&amp;#39;s quite some information on Bootloaders</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 25 Jan 2022 17:30:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/83455/how-to-add-ble-dfu-to-a-ncs-firmware-application" /><item><title>RE: How to add BLE DFU to a NCS firmware application?</title><link>https://devzone.nordicsemi.com/thread/349628?ContentTypeID=1</link><pubDate>Tue, 25 Jan 2022 17:30:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ada8284-8bbc-45ca-bc86-7af4cf35ff01</guid><dc:creator>BlueMike</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;Thank you very much for your help. I&amp;#39;ve given up on NCS and started porting the firmware back to the nrf5 sdk for mesh, which seems to be the more future proof approach... Perhaps we&amp;#39;ll add some more features in a future update, and then we would face the same issue again.&lt;br /&gt;&lt;br /&gt;Kind of a pity, I like NCS very much and it was a pleasant experience using it. Anyway, maybe for the next project.&lt;/p&gt;
&lt;p&gt;Again, thanks for your help,&lt;br /&gt;Michael.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add BLE DFU to a NCS firmware application?</title><link>https://devzone.nordicsemi.com/thread/348946?ContentTypeID=1</link><pubDate>Fri, 21 Jan 2022 13:38:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c99bc712-faaf-4e31-b462-0f1e15865ad3</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Mike,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;With the following configuration I can see the size of the chat application is down to about 239kB. But I haven&amp;#39;t tested that with SMP_SVR included how much it would increase in the size of application&amp;#39;s flash.&lt;/p&gt;
&lt;p&gt;I agree with you that it&amp;#39;s currently a blocking issue for DFU update nRF52832 running mesh.&amp;nbsp;&lt;br /&gt;We don&amp;#39;t have a solution as off now besides trying to reduce the functionality of the stack, but it can&amp;#39;t guarantee that it would fit for your application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#
# Copyright (c) 2020 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
CONFIG_NCS_SAMPLES_DEFAULTS=y

# General configuration
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_NVS=y
CONFIG_SETTINGS=y
CONFIG_HWINFO=y
CONFIG_DK_LIBRARY=y

# Bluetooth configuration
CONFIG_BT=y
CONFIG_BT_COMPANY_ID=0x0059
CONFIG_BT_DEVICE_NAME=&amp;quot;Mesh Chat&amp;quot;
CONFIG_BT_L2CAP_TX_MTU=69
CONFIG_BT_L2CAP_TX_BUF_COUNT=8
CONFIG_BT_OBSERVER=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_SETTINGS=y

# Disable unused Bluetooth features
CONFIG_BT_CTLR_DUP_FILTER_LEN=0
CONFIG_BT_CTLR_LE_ENC=n
CONFIG_BT_DATA_LEN_UPDATE=n
CONFIG_BT_PHY_UPDATE=n
CONFIG_BT_CTLR_CHAN_SEL_2=n
CONFIG_BT_CTLR_MIN_USED_CHAN=n
CONFIG_BT_CTLR_PRIVACY=n

# Bluetooth Mesh configuration
CONFIG_BT_MESH=y
CONFIG_BT_MESH_RELAY=y
CONFIG_BT_MESH_FRIEND=y
CONFIG_BT_MESH_ADV_BUF_COUNT=13
CONFIG_BT_MESH_RX_SEG_MAX=10
CONFIG_BT_MESH_TX_SEG_MAX=10
CONFIG_BT_MESH_PB_GATT=y
CONFIG_BT_MESH_GATT_PROXY=y
CONFIG_BT_MESH_DK_PROV=y

# Enable Bluetooth mesh models debug logs
#CONFIG_BT_DEBUG_LOG=y
#CONFIG_BT_MESH_DEBUG=y
#CONFIG_BT_MESH_DEBUG_MODEL=y

# Enable Shell module and use UART as a backend
CONFIG_SHELL=y
CONFIG_SHELL_BACKEND_SERIAL=y
CONFIG_WATCHDOG=n

CONFIG_PINMUX=n

CONFIG_MINIMAL_LIBC_MALLOC=n

CONFIG_BT_DEBUG_NONE=y

CONFIG_BT_GATT_CACHING=n

#CONFIG_BT_GATT_SERVICE_CHANGED=n

CONFIG_BT_GAP_PERIPHERAL_PREF_PARAMS=n

CONFIG_BT_SETTINGS_CCC_LAZY_LOADING=y

CONFIG_BT_HCI_VS_EXT=n

CONFIG_BT_CTLR_PHY_2M=n

CONFIG_BT_BUF_EVT_DISCARDABLE_COUNT=1

CONFIG_BT_BUF_EVT_DISCARDABLE_SIZE=43

CONFIG_BT_BUF_EVT_RX_COUNT=2

CONFIG_BT_CONN_TX_MAX=8

CONFIG_BT_BUF_ACL_TX_COUNT=3
CONFIG_BT_BUF_ACL_TX_SIZE=27


CONFIG_BT_DATA_LEN_UPDATE=n
CONFIG_BT_PHY_UPDATE=n

CONFIG_CONSOLE=n
CONFIG_UART_CONSOLE=n
CONFIG_STDOUT_CONSOLE=n
CONFIG_PRINTK=n
CONFIG_EARLY_CONSOLE=n

CONFIG_LOG=n
CONFIG_ASSERT=n
CONFIG_USE_SEGGER_RTT=n
CONFIG_BT_ASSERT=n 
CONFIG_BT_ASSERT_VERBOSE=n 
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add BLE DFU to a NCS firmware application?</title><link>https://devzone.nordicsemi.com/thread/348457?ContentTypeID=1</link><pubDate>Wed, 19 Jan 2022 10:07:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40bb86b2-5256-48e3-9ae7-21722f18498e</guid><dc:creator>BlueMike</dc:creator><description>&lt;p&gt;Thanks... again...&lt;/p&gt;
&lt;p&gt;The application still exceeds available flash by 40K.&lt;br /&gt;&lt;br /&gt;What an ironic joke: The firmware works perfectly under non stop stress test for more than 14 days. Last feature to add is DFU - what can possibly go wrong?!?&lt;br /&gt;&lt;br /&gt;Hung, please make sure there&amp;#39;s a &lt;span style="color:#800000;"&gt;BIG RED WARNING SIGN&lt;/span&gt; added at &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_bt_mesh_vendor_model.html?highlight=creating%20new%20models"&gt;Creating a new model&lt;/a&gt; telling that there&amp;#39;s no way to get a custom model with BLE DFU onto a 512kb flash soc. &lt;br /&gt;&lt;br /&gt;Case closed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add BLE DFU to a NCS firmware application?</title><link>https://devzone.nordicsemi.com/thread/348436?ContentTypeID=1</link><pubDate>Wed, 19 Jan 2022 09:01:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e0e0b5d-ad5e-4dde-9eb7-52911e0b122c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Mike,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It&amp;#39;s possible to update from nRF5 SDK based application to nRF Connect application. Of course it&amp;#39;s not straight forward but feasible. You can have a look at &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/79571/dfu-update-from-nrf5-sdk-to-nrf-connect-sdk"&gt;this case.&lt;/a&gt;&amp;nbsp;After the update the original bootloader will be replaced by mcuboot (obviously because the softdevice is replaced)&lt;br /&gt;&lt;br /&gt;To compile with prj_minimal.conf, what I did was to simply back up the original prj.conf and rename the minimal file to prj.conf, but you can also do that with the config macro when building, by using&amp;nbsp;&amp;quot;-DCONF_FILE=&amp;#39;prj_minimal.conf&amp;#39;&amp;quot; if you build mcuboot directly, I&amp;#39;m not so sure how you do it when the mcuboot is a child image.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Regarding minimize the BLE stack, you can have a look at the prj_minimal.conf in the peripheral_lbs exmaple. However it&amp;#39;s not a mesh application, so please try:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_WATCHDOG=n

CONFIG_PINMUX=n

CONFIG_MINIMAL_LIBC_MALLOC=n

CONFIG_BT_DEBUG_NONE=y

CONFIG_BT_GATT_CACHING=n

CONFIG_BT_GATT_SERVICE_CHANGED=n

CONFIG_BT_GAP_PERIPHERAL_PREF_PARAMS=n

CONFIG_BT_SETTINGS_CCC_LAZY_LOADING=y

CONFIG_BT_HCI_VS_EXT=n

CONFIG_BT_CTLR_PHY_2M=n

CONFIG_BT_BUF_EVT_DISCARDABLE_COUNT=1

CONFIG_BT_BUF_EVT_DISCARDABLE_SIZE=43

CONFIG_BT_BUF_EVT_RX_COUNT=2

CONFIG_BT_CONN_TX_MAX=2

CONFIG_BT_BUF_ACL_TX_COUNT=3
CONFIG_BT_BUF_ACL_TX_SIZE=27


CONFIG_BT_DATA_LEN_UPDATE=n
CONFIG_BT_PHY_UPDATE=n

CONFIG_CONSOLE=n
CONFIG_UART_CONSOLE=n
CONFIG_STDOUT_CONSOLE=n
CONFIG_PRINTK=n
CONFIG_EARLY_CONSOLE=n

CONFIG_LOG=n
CONFIG_ASSERT=n&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add BLE DFU to a NCS firmware application?</title><link>https://devzone.nordicsemi.com/thread/348379?ContentTypeID=1</link><pubDate>Tue, 18 Jan 2022 18:27:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34c4c09c-ddde-417e-9a18-9234fd1604b6</guid><dc:creator>BlueMike</dc:creator><description>&lt;p&gt;Hi Hung, &lt;/p&gt;
&lt;p&gt;again, thanks for your help!&lt;/p&gt;
&lt;p&gt;My biggest concern are the few thousand devices that are using the nRF5 SDK based application and bootloader, which must be updated to the Zephyr based application. Would it be possible to stick with the old bootloader? It&amp;#39;s handling BLE DFU just fine... Question is, can Zephyr boot with it? I can imagine that the split between softdevice and application could cause complications. What do you think? &lt;br /&gt;As an alternative, would it be doable to replace the nRF5 SDK bootloader with b0/mcuboot?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="color:#000080;"&gt;Have you tried the prj_minimal.conf in the mcu_boot project?&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Not yet. Sorry to ask, but how do you enable it? (When building with NRF Connect plugin in VS Code?)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="color:#000080;"&gt;removing any feature related to 2Mbps, Data length extension?&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That sounds interesting! How do you remove it? &lt;/p&gt;
&lt;p&gt;Is there anything else that could be disabled?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add BLE DFU to a NCS firmware application?</title><link>https://devzone.nordicsemi.com/thread/348364?ContentTypeID=1</link><pubDate>Tue, 18 Jan 2022 16:39:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a9a6e3a-1ba6-4d7e-9a1e-fc171161f360</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Mike,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you tried the prj_minimal.conf in the mcu_boot project ? It will reduce the size of the MCUBoot down to 31kB.&lt;br /&gt;With that and without the&amp;nbsp;immutable bootloader, I can see that the application primary slot is defined from address 0x8000 to 0x44000 meaning you have 240kB for the application. Would your application fit in ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I don&amp;#39;t thinking going for an earlier version of the SDK is a good idea.&amp;nbsp;It doesn&amp;#39;t sound future proof to me.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;We can think about reducing the size of the mesh stack and the BLE stack (this is one of the advantages of Zephyr compare to softdevice that you can choose which features to include in the stack).&amp;nbsp;&lt;br /&gt;For example you can think of removing any feature related to 2Mbps, Data length extension?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I understand the challenge of moving from nRF5 SDK to nRF Connect SDK. It&amp;#39;s really a stiff learning curve that get frustrated sometimes.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add BLE DFU to a NCS firmware application?</title><link>https://devzone.nordicsemi.com/thread/348120?ContentTypeID=1</link><pubDate>Mon, 17 Jan 2022 16:45:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7993ac41-33e0-4052-98f1-321610804a64</guid><dc:creator>BlueMike</dc:creator><description>&lt;p&gt;Oh ***! Switching to the nRF52840 is unfortunately not an option....&lt;/p&gt;
&lt;p&gt;After disabling those nice to have but not strictly necessary features (assert, stack sentinel, log, console, etc), it&amp;#39;s still 88KB too much. A few more KB could be freed by reverting back to NCS 1.7.1. Should I go for an even earlier version to squeeze a few more bytes out?&lt;/p&gt;
&lt;p&gt;How about disabling secure boot? How much memory would that free?&lt;/p&gt;
&lt;p&gt;Just out of intuition, do you think it is possible to get a custom model that includes SMP_SRV and BLE DFU onto a nRF52832? &lt;/p&gt;
&lt;p&gt;You know, what puzzles me is that the firmware application is rather trivial: 100 bytes of data are sent between the firmware and the (Android) app through the GATT proxy. That is way too simple to exceed half a megabyte of flash...&lt;/p&gt;
&lt;p&gt;The first version of the firmware was based on the Mesh SDK, and if somehow possible I&amp;#39;d like to avoid reverting back to it. But anyway, how does the NCS compare to the Mesh SDK in terms of size? What would be the size difference of, let&amp;#39;s say a Generic ON/OFF or LEVEL model, supporting mesh relay, GATT provisioning and GATT proxy?&lt;/p&gt;
&lt;p&gt;And finally there&amp;#39;s the yet to tackle task of replacing the old Mesh SDK based firmware application with the new NCS version... Do you think that&amp;#39;s technically possible?&lt;/p&gt;
&lt;p&gt;Sorry for all these question, but my decision to switch from the mesh sdk to ncs got me into a rather desperate situation...&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BTW., thanks for your help!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add BLE DFU to a NCS firmware application?</title><link>https://devzone.nordicsemi.com/thread/348103?ContentTypeID=1</link><pubDate>Mon, 17 Jan 2022 15:11:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e04c97e-844f-4135-9a5a-93eac003fb76</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Michael,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you have a look &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bootloader/README.html#overview"&gt;here&amp;nbsp;&lt;/a&gt;&amp;nbsp; you can find the memory layout as follows:&amp;nbsp;&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1642432005574v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In your case, the partition.yml shows&amp;nbsp;mcuboot_primary_app is from 0x22200 to 0x50000 which mean it has only 187904 bytes for the application.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I did a quick check with the chat application (without SMP_SVR to receive image via BLE) the application size is already&amp;nbsp; 292616 kB.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;The problem is that MCUBoot is made to only support dual bank update (unless it&amp;#39;s in UART recovery mode) so the primary bank and the secondary bank have to have the same size.&amp;nbsp;&lt;br /&gt;In this case the nRF52832 may not have enough flash size. You may want to consider the nRF52840.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add BLE DFU to a NCS firmware application?</title><link>https://devzone.nordicsemi.com/thread/348001?ContentTypeID=1</link><pubDate>Mon, 17 Jan 2022 11:38:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f98d6bd4-58af-4757-9f16-3eedfcbe3277</guid><dc:creator>BlueMike</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve reverted the project and started to add DFU again from scratch, following the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/app_bootloaders.html"&gt;Bootloaders and Device Firmware Updates&lt;/a&gt;, but again the same. The way this looks, I&amp;#39;ve omitted some (most likely very basic) crucial step.&lt;/p&gt;
&lt;p&gt;Lets have a quick look at the project - just in case: &lt;br /&gt;It&amp;#39;s a Bluetooth Mesh application running a custom mesh model. It was originally built on the chat example from NCS 1.7.1. NCS has been updated to 1.8.0 since. It&amp;#39;s running on a nRF52832, which is connected through an nRF52840 DK. Is there any special treatment needed if the target (nRF52832) is connected through the DK?&lt;br /&gt;&lt;br /&gt;I haven&amp;#39;t played with any of the DFU examples, but will do so now...&lt;br /&gt;&lt;br /&gt;The partitions.yml file (release configuration) looks like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;EMPTY_0:
  address: 0x14200
  end_address: 0x15000
  placement:
    before:
    - s1_pad
  region: flash_primary
  size: 0xe00
EMPTY_1:
  address: 0x15200
  end_address: 0x16000
  placement:
    before:
    - s1_image
  region: flash_primary
  size: 0xe00
app:
  address: 0x22200
  end_address: 0x50000
  region: flash_primary
  size: 0x2de00
b0:
  address: 0x0
  end_address: 0x7000
  placement:
    after:
    - start
  region: flash_primary
  size: 0x7000
b0_container:
  address: 0x0
  end_address: 0x8000
  orig_span: &amp;amp;id001
  - b0
  - provision
  region: flash_primary
  size: 0x8000
  span: *id001
mcuboot:
  address: 0x8200
  end_address: 0x14200
  placement:
    before:
    - mcuboot_primary
  region: flash_primary
  sharers: 0x1
  size: 0xc000
mcuboot_pad:
  address: 0x22000
  end_address: 0x22200
  placement:
    align:
      start: 0x1000
    before:
    - mcuboot_primary_app
  region: flash_primary
  sharers: 0x2
  size: 0x200
mcuboot_primary:
  address: 0x22000
  end_address: 0x50000
  orig_span: &amp;amp;id002
  - mcuboot_pad
  - app
  region: flash_primary
  sharers: 0x1
  size: 0x2e000
  span: *id002
mcuboot_primary_app:
  address: 0x22200
  end_address: 0x50000
  orig_span: &amp;amp;id003
  - app
  region: flash_primary
  size: 0x2de00
  span: *id003
mcuboot_secondary:
  address: 0x50000
  end_address: 0x7e000
  placement:
    after:
    - mcuboot_primary
    align:
      start: 0x1000
  region: flash_primary
  share_size:
  - mcuboot_primary
  size: 0x2e000
provision:
  address: 0x7000
  end_address: 0x8000
  placement:
    after:
    - b0
    align:
      start: 0x1000
  region: flash_primary
  size: 0x1000
s0:
  address: 0x8000
  end_address: 0x14200
  orig_span: &amp;amp;id004
  - s0_pad
  - mcuboot
  region: flash_primary
  size: 0xc200
  span: *id004
s0_image:
  address: 0x8200
  end_address: 0x14200
  orig_span: &amp;amp;id005
  - mcuboot
  region: flash_primary
  size: 0xc000
  span: *id005
s0_pad:
  address: 0x8000
  end_address: 0x8200
  placement:
    after:
    - b0_container
    align:
      start: 0x1000
  region: flash_primary
  share_size:
  - mcuboot_pad
  size: 0x200
s1:
  address: 0x15000
  end_address: 0x21200
  orig_span: &amp;amp;id006
  - s1_pad
  - s1_image
  region: flash_primary
  size: 0xc200
  span: *id006
s1_image:
  address: 0x16000
  end_address: 0x22000
  placement:
    after:
    - s1_pad
    - s0
    align:
      start: 0x1000
  region: flash_primary
  share_size:
  - mcuboot
  size: 0xc000
s1_pad:
  address: 0x15000
  end_address: 0x15200
  placement:
    after:
    - s0
    align:
      start: 0x1000
  region: flash_primary
  share_size:
  - mcuboot_pad
  size: 0x200
settings_storage:
  address: 0x7e000
  end_address: 0x80000
  placement:
    align:
      start: 0x1000
    before:
    - end
  region: flash_primary
  size: 0x2000
spm_app:
  address: 0x22200
  end_address: 0x50000
  orig_span: &amp;amp;id007
  - app
  region: flash_primary
  size: 0x2de00
  span: *id007
sram_primary:
  address: 0x20000000
  end_address: 0x20010000
  region: sram_primary
  size: 0x10000
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Again thanks for your help,&lt;br /&gt;Michael.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add BLE DFU to a NCS firmware application?</title><link>https://devzone.nordicsemi.com/thread/347992?ContentTypeID=1</link><pubDate>Mon, 17 Jan 2022 11:01:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6a5da4f-40c5-49b7-88ed-2314f7a67d51</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Mike,&amp;nbsp;&lt;br /&gt;How large is your application in flash size ?&amp;nbsp;&lt;br /&gt;I can see in the linking log the FLASH size is 32864B, but in the error log it says&amp;nbsp;`FLASH&amp;#39; overflowed by 136676 bytes. It&amp;#39;s quite strange.&amp;nbsp;Could you check the generated partition file in&amp;nbsp;&lt;span&gt;$BUILD_DIR/partitions.yml&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Have you tried to test with one of our example ? for example the peripheral_hr ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add BLE DFU to a NCS firmware application?</title><link>https://devzone.nordicsemi.com/thread/347879?ContentTypeID=1</link><pubDate>Sun, 16 Jan 2022 10:28:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3c2c018-32f6-47d6-b9c6-8805847c6f3a</guid><dc:creator>BlueMike</dc:creator><description>&lt;p&gt;Hi Hung Bui,&lt;br /&gt;&lt;br /&gt;Again, thanks for your help.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I assume you want to test only the MCUBoot, not with the immutable bootloader?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;THB, I&amp;#39;d prefer to test with both, immutable bootloader and MCUBoot. &lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Good to know that partition manager is generated automatically. However, when adding DFU to my project by just following the examples from the link you&amp;#39;ve provided, linking fails because FLASH seems to overflow. The output is:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;[254/254] Linking C executable zephyr/zephyr.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       32864 B        48 KB     66.86%
            SRAM:       23680 B        64 KB     36.13%
        IDT_LIST:          0 GB         2 KB      0.00%
[289/304] Linking C executable zephyr/zephyr_prebuilt.elf
FAILED: zephyr/zephyr_prebuilt.elf zephyr/zephyr_prebuilt.map /*exact command removed for simplicity...*/

/home/mike/nrf-dev/tools/gnuarmemb/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.bfd: zephyr/zephyr_prebuilt.elf section `text&amp;#39; will not fit in region `FLASH&amp;#39;
/home/mike/nrf-dev/tools/gnuarmemb/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.bfd: region `FLASH&amp;#39; overflowed by 136676 bytes
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /home/mike/.local/bin/cmake --build /home/mike/nrf-dev/projects/awesome_project/build_debug
The terminal process terminated with exit code: 1.
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Which lead to the partition manager configuration... Question now is, what&amp;#39;s wrong, and how to fix it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add BLE DFU to a NCS firmware application?</title><link>https://devzone.nordicsemi.com/thread/347816?ContentTypeID=1</link><pubDate>Fri, 14 Jan 2022 15:56:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25679345-3800-4086-8513-6c3fa7c8fe8e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Michael,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I assume you want to test only the MCUBoot, not with the immutable bootloader ?&amp;nbsp;&lt;br /&gt;If it&amp;#39;s the case you just need to follow what described in the guide.&amp;nbsp;&lt;br /&gt;Please make sure you don&amp;#39;t have something like this&amp;nbsp;&lt;span&gt;CONFIG_SECURE_BOOT&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;y in your prj.conf or in the script when you call west.&amp;nbsp;&lt;br /&gt;Note that if you create an overlay mcuboot.conf you would need to put it in the child_image folder of your application project folder.&amp;nbsp;&lt;br /&gt;You shouldn&amp;#39;t see any s1_image.hex because the S0 should not be included so there shouldn&amp;#39;t be S1.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Regarding Partition Manager, it will be generated dynamically and automatically in your build folder. I would suggest to test with that first before you move on and add the pm_static.yml to your application (As far as I know you just need to leave it in the application folder without changing configuration, see &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/74571/how-to-configure-flash-and-ram-partitions/308688"&gt;here.&lt;/a&gt;)&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add BLE DFU to a NCS firmware application?</title><link>https://devzone.nordicsemi.com/thread/347783?ContentTypeID=1</link><pubDate>Fri, 14 Jan 2022 13:49:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cef195e1-0d27-428b-8ed9-7c68c98016fe</guid><dc:creator>BlueMike</dc:creator><description>&lt;p&gt;Hi Hung Bui,&lt;br /&gt;&lt;br /&gt;Thanks for your help. Yes, it&amp;#39;s about DFU over BLE. So let&amp;#39;s use both, NSIB and MCUBoot then...&lt;br /&gt;&lt;br /&gt; I&amp;#39;ve followed the steps from the link. Beside that, I&amp;#39;ve added a configuration file for mcuboot to CMakeLists.txt:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;if (EXISTS &amp;quot;${CMAKE_CURRENT_SOURCE_DIR}/mcuboot.conf&amp;quot;)
    list(APPEND mcuboot_OVERLAY_CONFIG
      &amp;quot;${CMAKE_CURRENT_SOURCE_DIR}/mcuboot.conf&amp;quot;
      )
endif()&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And then created the matching file mcuboot.conf in the project directory with the following content: &lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BOOT_SIGNATURE_KEY_FILE=&amp;quot;/home/mike/nrf-dev/projects/utterly_awesome_project/signing_keys/utterly_awesome_project_key.pem&amp;quot;
CONFIG_MCUBOOT_DOWNGRADE_PREVENTION=y&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Build now fails because s1_image.hex isn&amp;#39;t found. The error message is:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;ninja: error: &amp;#39;zephyr/s1_image.hex&amp;#39;, needed by &amp;#39;zephyr/nrf/subsys/bootloader/generated/s1_image_firmware.signature&amp;#39;, missing and no known rule to make it
FATAL ERROR: command exited with status 1: /home/mike/.local/bin/cmake --build /home/mike/nrf-dev/projects/utterly_awesome_project/build_debug&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Question now is, how do you get the s1_image.hex? Shouldn&amp;#39;t that be built automatically?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;About Partition Manager:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Beside that, another thing I&amp;#39;m uncertain about is the Partition Manager. According to the docs, it&amp;#39;s necessary to include it, so I&amp;#39;ve added these lines to Cmakelists.txt:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;set(PM_STATIC_YML_FILE
	${CMAKE_CURRENT_SOURCE_DIR}/boards/pm_static_${BOARD}.yml
)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And copied (and renamed) pm_static{Board}.yml from the peripheral_lbs example.&lt;br /&gt;&lt;br /&gt;Is this all that needs to be done to setup Partition Manager? Now when building a few messages like this one show up:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Partition &amp;#39;mcuboot_primary_app&amp;#39; is not included in the dynamic resolving since it is statically defined.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The &amp;quot;dynamic resolving&amp;quot; at the above message sounds as if partition manager is able configure the partitions itself. Is that the case? Can the partition manager configuration be skipped?&lt;/p&gt;
&lt;p&gt;I&amp;#39;m still missing the bigger picture, so any clarification is welcome,&lt;br /&gt;Thanke you,&lt;br /&gt;Michael.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add BLE DFU to a NCS firmware application?</title><link>https://devzone.nordicsemi.com/thread/346973?ContentTypeID=1</link><pubDate>Mon, 10 Jan 2022 14:35:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a266ccd2-8c38-4983-9a94-c03ab70be82c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi BlueMike,&amp;nbsp;&lt;br /&gt;I assume you are looking for DFU over BLE for individual node not &amp;quot;Mesh DFU&amp;quot; ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If it&amp;#39;s the case you are correct that you would need MCUBoot and the&amp;nbsp;application firmware to receive image via BLE . Please have a look at &lt;a href="https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/software/posts/ncs-dfu"&gt;this guide&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It&amp;#39;s possible to not include the NSIB but that means you will not able to update the MCUBoot which can be an issue in the long run.&amp;nbsp;&lt;br /&gt;Also please take into account that it&amp;#39;s in general not possible to do &amp;quot;single bank&amp;quot; update meaning&amp;nbsp;the new image is always received on an 2nd slot. You would need a flash space that is 2x the size of the application.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>