<?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>MCUBOOT DFU Over Bluetooth Fails During Firmware Download – Need Help</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119462/mcuboot-dfu-over-bluetooth-fails-during-firmware-download-need-help</link><description>&amp;quot;I&amp;#39;m trying to perform DFU using MCUBOOT over Bluetooth. The device enters DFU mode and connects successfully, but when I start the firmware download, I get an error: 
 Starting Bluetooth Peripheral LBS example I: SoftDevice Controller build revision</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 Mar 2025 09:16:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119462/mcuboot-dfu-over-bluetooth-fails-during-firmware-download-need-help" /><item><title>RE: MCUBOOT DFU Over Bluetooth Fails During Firmware Download – Need Help</title><link>https://devzone.nordicsemi.com/thread/525667?ContentTypeID=1</link><pubDate>Tue, 04 Mar 2025 09:16:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17f0a209-fed4-4f84-9824-fcb2b2165d2f</guid><dc:creator>JoEi</dc:creator><description>&lt;p&gt;Hi Dalvadi,&lt;/p&gt;
&lt;p&gt;ok, so far I haven&amp;#39;t seen this error.&lt;/p&gt;
&lt;p&gt;Could you try this partition config instead?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;app:
  address: 0xc200
  end_address: 0x7e000
  region: flash_primary
  size: 0x71e00
mcuboot:
  address: 0x0
  end_address: 0xc000
  placement:
    align:
      end: 0x1000
    before:
    - mcuboot_primary
  region: flash_primary
  size: 0xc000
mcuboot_pad:
  address: 0xc000
  end_address: 0xc200
  placement:
    align:
      start: 0x1000
    before:
    - mcuboot_primary_app
  region: flash_primary
  size: 0x200
mcuboot_primary:
  address: 0xc000
  end_address: 0x7e000
  orig_span: &amp;amp;id001
  - mcuboot_pad
  - app
  region: flash_primary
  sharers: 0x1
  size: 0x72000
  span: *id001
mcuboot_primary:
  address: 0xc200
  end_address: 0x7e000
  orig_span: &amp;amp;id002
  - app
  region: flash_primary
  size: 0x71e00
  span: *id002
mcuboot_secondary:
  address: 0x7e000
  end_address: 0xf1000
  placement:
    after:
    - mcuboot_primary
    align:
      start: 0x1000
  region: flash_primary
  size: 0x73000
second_storage:
  address: 0xf1000
  end_address: 0xf5000
  placement:
    align:
      start: 0x1000
    after:
    - mcuboot_secondary
  region: flash_primary
  size: 0x4000
zboss_nvram:
  address: 0xf5000
  end_address: 0xfd000
  placement:
    after:
    - second_storage
    align:
      start: 0x1000
  region: flash_primary
  size: 0x8000
zboss_product_config:
  address: 0xfd000
  end_address: 0xfe000
  placement:
    after:
    - zboss_nvram
    align:
      start: 0x1000
  region: flash_primary
  size: 0x1000
settings_storage:
  address: 0xfe000
  end_address: 0x100000
  placement:
    align:
      start: 0x1000
    before:
    - end
  region: flash_primary
  size: 0x2000
sram_primary:
  address: 0x20000000
  end_address: 0x20040000
  region: sram_primary
  size: 0x40000&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Alternatively you could remove pm_static.yml, rebuild your project and take a look at build/partitions.yml. This is the automatically generated partition config. You can than copy this file, rename it and use it as a new pm_static.yml and make changes according to your needs&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Johannes&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBOOT DFU Over Bluetooth Fails During Firmware Download – Need Help</title><link>https://devzone.nordicsemi.com/thread/525629?ContentTypeID=1</link><pubDate>Tue, 04 Mar 2025 04:38:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d8e5548-ee76-4bb2-9cd7-06a32c034cbc</guid><dc:creator>Dalvadi Anil</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Johannes,&lt;br /&gt;&lt;br /&gt;I try using this but not work for me getting this error.&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;
-- Found partition manager static configuration: /Users/nistantritech/Documents/Project/firmware_project/hazelnut_zigbee-master/ESPZIG_Single_Project/pm_static.yml
Partition &amp;#39;zboss_nvram&amp;#39; is not included in the dynamic resolving since it is statically defined.
Partition &amp;#39;zboss_product_config&amp;#39; is not included in the dynamic resolving since it is statically defined.
Partition &amp;#39;settings_storage&amp;#39; is not included in the dynamic resolving since it is statically defined.
Partition manager failed: Incorrect amount of gaps found in static configuration. There must be exactly one gap in the static configuration to support placing the dynamic partitions (such as &amp;#39;app&amp;#39;). Gaps found (0): The most common solution to this problem is to fill the smallest of these gaps with statically defined partition(s) until there is only one gap left. Alternatively re-order the already defined static partitions so that only one gap remains.
Failed to partition region flash_primary, size of region: 1048576
Partition Configuration:
app:
  size: 466432
mcuboot:
  size: 49152
mcuboot_pad:
  size: 512
mcuboot_primary:
  size: 466944
mcuboot_secondary:
  size: 471040
second_storage:
  placement:
    align:
      start: 4096
    before:
    - zboss_nvram
  size: 16384
settings_storage:
  placement:
    align:
      start: 4096
    before:
    - end
  size: 8192
zboss_nvram:
  placement:
    after:
    - second_storage
    align:
      start: 4096
  size: 32768
zboss_product_config:
  placement:
    after:
    - zboss_nvram
  size: 4096

CMake Error at /opt/nordic/ncs/v2.7.0/nrf/cmake/partition_manager.cmake:354 (message):
  Partition Manager failed, aborting.  Command:
  /opt/nordic/ncs/toolchains/f8037e9b83/opt/python@3.9/bin/python3.9;/opt/nordic/ncs/v2.7.0/nrf/scripts/partition_manager.py;--input-files;/Users/nistantritech/Documents/Project/firmware_project/hazelnut_zigbee-master/ESPZIG_Single_Project/build_1/zephyr/include/generated/pm.yml;/Users/nistantritech/Documents/Project/firmware_project/hazelnut_zigbee-master/ESPZIG_Single_Project/build_1/modules/nrf/subsys/partition_manager/pm.yml.settings;/Users/nistantritech/Documents/Project/firmware_project/hazelnut_zigbee-master/ESPZIG_Single_Project/build_1/modules/nrf/subsys/partition_manager/pm.yml.zboss;--regions;sram_primary;flash_primary;--output-partitions;/Users/nistantritech/Documents/Project/firmware_project/hazelnut_zigbee-master/ESPZIG_Single_Project/build_1/partitions.yml;--output-regions;/Users/nistantritech/Documents/Project/firmware_project/hazelnut_zigbee-master/ESPZIG_Single_Project/build_1/regions.yml;--static-config;/Users/nistantritech/Documents/Project/firmware_project/hazelnut_zigbee-master/ESPZIG_Single_Project/pm_static.yml;--sram_primary-size;0x40000;--sram_primary-base-address;0x20000000;--sram_primary-placement-strategy;complex;--sram_primary-dynamic-partition;sram_primary;--flash_primary-size;0x100000;--flash_primary-base-address;0x0;--flash_primary-placement-strategy;complex;--flash_primary-device;flash_controller;--flash_primary-default-driver-kconfig;CONFIG_SOC_FLASH_NRF
Call Stack (most recent call first):
  /opt/nordic/ncs/v2.7.0/zephyr/cmake/modules/kernel.cmake:253 (include)
  /opt/nordic/ncs/v2.7.0/zephyr/cmake/modules/zephyr_default.cmake:141 (include)
  /opt/nordic/ncs/v2.7.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  /opt/nordic/ncs/v2.7.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:9 (find_package)


-- Configuring incomplete, errors occurred!
See also &amp;quot;/Users/nistantritech/Documents/Project/firmware_project/hazelnut_zigbee-master/ESPZIG_Single_Project/build_1/CMakeFiles/CMakeOutput.log&amp;quot;.
See also &amp;quot;/Users/nistantritech/Documents/Project/firmware_project/hazelnut_zigbee-master/ESPZIG_Single_Project/build_1/CMakeFiles/CMakeError.log&amp;quot;.
FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/f8037e9b83/bin/cmake -DWEST_PYTHON=/opt/nordic/ncs/toolchains/f8037e9b83/opt/python@3.9/bin/python3.9 -B/Users/nistantritech/Documents/Project/firmware_project/hazelnut_zigbee-master/ESPZIG_Single_Project/build_1 -GNinja -DBOARD=nrf21540dk/nrf52840 -DNCS_TOOLCHAIN_VERSION=NONE -DCONF_FILE=prj.conf -DDTC_OVERLAY_FILE=nrf21540dk_nrf52840.overlay -DBOARD_ROOT=/Users/nistantritech/Documents/Project/firmware_project/hazelnut_zigbee-master/ESPZIG_Single_Project -S/Users/nistantritech/Documents/Project/firmware_project/hazelnut_zigbee-master/ESPZIG_Single_Project

 *  The terminal process terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. &lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;br data-start="416" data-end="419" /&gt;Dalvadi&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBOOT DFU Over Bluetooth Fails During Firmware Download – Need Help</title><link>https://devzone.nordicsemi.com/thread/525572?ContentTypeID=1</link><pubDate>Mon, 03 Mar 2025 15:49:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0913574-44d1-4f18-9abd-7de75fbab449</guid><dc:creator>JoEi</dc:creator><description>&lt;p&gt;Hi Dalvadi,&lt;/p&gt;
&lt;p&gt;in your case I think it should look something like this:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;mcuboot:
  address: 0x0
  size: 0xc000
  region: flash_primary

mcuboot_pad:
  address: 0xc000
  size: 0x200
  region: flash_primary

mcuboot_primary:
  address: 0xc000
  size: 0x72000
  region: flash_primary

app:
  address: 0xc200
  size: 0x71E00
  region: flash_primary

mcuboot_secondary:
  address: 0x7e000
  size: 0x73000
  region: flash_primary

second_storage:
  address: 0xf1000
  size: 0x4000
  region: flash_primary
  placement:
    align:
      start: 0x1000
    before:
    - zboss_nvram

zboss_nvram:
  address: 0xf5000
  size: 0x8000
  region: flash_primary
  placement:
    after:
    - second_storage
    align:
      start: 0x1000

zboss_product_config:
  address: 0xfd000
  size: 0x1000
  region: flash_primary
  placement:
    after:
    - zboss_nvram

settings_storage:
  address: 0xfe000
  size: 0x2000
  region: flash_primary
  placement:
    align:
      start: 0x1000
    before:
    - end

sram_primary:
  address: 0x20000000
  end_address: 0x20040000
  region: sram_primary
  size: 0x40000&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Johannes&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBOOT DFU Over Bluetooth Fails During Firmware Download – Need Help</title><link>https://devzone.nordicsemi.com/thread/525460?ContentTypeID=1</link><pubDate>Mon, 03 Mar 2025 09:47:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5893a1f0-9bc7-49f4-b37e-d592d309367f</guid><dc:creator>Dalvadi Anil</dc:creator><description>&lt;p data-start="0" data-end="14"&gt;Hi Johannes,&lt;/p&gt;
&lt;p data-start="16" data-end="226"&gt;Thank you for your suggestion. You are correct that the secondary partition exceeds the 1MB flash limit of the nRF52840. I am using additional storage for data logging, and I also need to support DFU updates.&lt;/p&gt;
&lt;p data-start="228" data-end="401"&gt;Can you provide a correct &lt;code data-start="254" data-end="269"&gt;pm_static.yml&lt;/code&gt; configuration that includes some storage space and supports DFU updates while staying within the 1MB flash limit of the nRF52840?&lt;/p&gt;
&lt;p data-start="403" data-end="426" data-is-last-node="" data-is-only-node=""&gt;Best regards,&lt;br data-start="416" data-end="419" /&gt;Dalvadi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBOOT DFU Over Bluetooth Fails During Firmware Download – Need Help</title><link>https://devzone.nordicsemi.com/thread/525444?ContentTypeID=1</link><pubDate>Mon, 03 Mar 2025 08:06:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44fe52f9-4b8a-4823-a9ae-03d52d81f51b</guid><dc:creator>JoEi</dc:creator><description>&lt;p&gt;Hi Dalvadi,&lt;/p&gt;
&lt;p&gt;it seems to me that your pm_static.yml is configured wrong.&lt;br /&gt;The nRF52840 has 1MB flash so the max address usable is 0xFFFFF.&lt;br /&gt;According to your pm_static your secondary partition starts at 0xFD000 and goes till 0x1EE000 which already exceeds the 1MB flash.&lt;/p&gt;
&lt;p&gt;May I ask how you got this pm_static?&lt;br /&gt;&lt;br /&gt;Kind regards&lt;br /&gt;Johannes&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>