MCUBoot not a compatible amount of sectors NRF54L15

Hi guys,

I'm trying to do FOTA updates on my board and I was able so far to download the image but not able to apply it.

I've followed the academy FOTA over WiFi example but during bootup I see the following warning message:

[0:0:0.8,150] <wrn> mcuboot: Cannot upgrade: not a compatible amount of sectors
[0:0:0.8,156] <dbg> mcuboot: slot0 sectors: 180, slot1 sectors: 163, usable slot0 sectors: 179
What could be the issue here? On the partition manager I see both mcu_primary and mcu_secondary with the same size.
Please check my pm_static.yml:
EMPTY_0:
  address: 0xd800
  end_address: 0xe000
  placement:
    after:
    - mcuboot
  region: flash_primary
  size: 0x800
EMPTY_1:
  address: 0x176000
  end_address: 0x177000
  placement:
    after:
    - mcuboot_secondary
  region: flash_primary
  size: 0x1000
app:
  address: 0xe800
  end_address: 0xc2000
  region: flash_primary
  size: 0xb3800
bootconf:
  address: 0xffd080
  end_address: 0xffd084
  region: bootconf
  size: 0x4
mcuboot:
  address: 0x0
  end_address: 0xd800
  placement:
    align:
      end: 0x1000
    before:
    - mcuboot_primary
  region: flash_primary
  size: 0xd800
mcuboot_pad:
  address: 0xe000
  end_address: 0xe800
  placement:
    align:
      start: 0x1000
    before:
    - mcuboot_primary_app
  region: flash_primary
  size: 0x800
mcuboot_primary:
  address: 0xe000
  end_address: 0xc2000
  orig_span: &id001
  - mcuboot_pad
  - app
  region: flash_primary
  sharers: 0x1
  size: 0xb4000
  span: *id001
mcuboot_primary_app:
  address: 0xe800
  end_address: 0xc2000
  orig_span: &id002
  - app
  region: flash_primary
  size: 0xb3800
  span: *id002
mcuboot_secondary:
  address: 0xc2000
  end_address: 0x176000
  placement:
    after:
    - mcuboot_primary
    align:
      start: 0x1000
  region: flash_primary
  share_size:
  - mcuboot_primary
  size: 0xb4000
otp:
  address: 0xffd500
  end_address: 0xffd9fc
  region: otp
  size: 0x4fc
sram_primary:
  address: 0x20000000
  end_address: 0x20040000
  region: sram_primary
  size: 0x40000
zms_storage:
  address: 0x177000
  end_address: 0x17d000
  placement:
    after:
    - app
    align:
      start: 0x1000
    before:
    - end
  region: flash_primary
  size: 0x6000
Also my sysbuild.conf:
SB_CONFIG_BOOTLOADER_MCUBOOT=y
SB_CONFIG_PARTITION_MANAGER=y
Any ideias? I'm trying to have a stable version with FOTA so that I can move to the production pilot.
Best regards,
 
Fernando Fontes
  • Hi,

     

    This exercise is mainly for the nRF7002-DK, which has a nRF5340+nRF7002 device.

    To setup a DFU wise project for the nRF54L-series device(s), please see here:

    https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-9-bootloaders-and-dfu-fota/topic/exercise-5-fota-over-bluetooth-low-energy/

     

    I understand that you want to do DFU over Wi-Fi, but the setup-wise process around sysbuild/devicetree/mcuboot etc, is similar here.

     

    Kind regards,

    Håkon

  • Hi, 

    Thank you for the reply.

    Ok, but where can I see the pm_static.yml for the FOTA over bluetooth example? 

    Best regards,

    Fernando Fontes

  • Hi,

     

    Fernando Fontes said:

    Ok, but where can I see the pm_static.yml for the FOTA over bluetooth example? 

    The generated partition layout will be found in build/partitions.yml file.

    If you want to statically store this, copy it to application_folder/pm_static.yml

     

    Kind regards,

    Håkon

  • Ok,


    But flashing the application on l9/l9_e5 gives me exactly the same output:

    *** Booting MCUboot v2.1.0-dev-9b4ae4cbc9e2 ***
    *** Using nRF Connect SDK v3.1.1-e2a97fe2578a ***
    *** Using Zephyr OS v4.1.99-ff8f0c579eeb ***
    [0:0:0.1,306] <inf> mcuboot: Starting bootloader
    [0:0:0.1,408] <wrn> mcuboot: Cannot upgrade: not a compatible amount of sectors
    [0:0:0.1,414] <wrn> mcuboot: slot0 sectors: 182, slot1 sectors: 161, usable slot0 sectors: 181

    Maybe it's my custom dts files the issue?

    These are the partitions on the zephyr.dts generated file:


    				partitions {
    					compatible = "fixed-partitions"; /* in zephyr/dts/vendor/nordic/nrf54l15_partition.dtsi:9 */
    					#address-cells = < 0x1 >;        /* in zephyr/dts/vendor/nordic/nrf54l15_partition.dtsi:10 */
    					#size-cells = < 0x1 >;           /* in zephyr/dts/vendor/nordic/nrf54l15_partition.dtsi:11 */
    
    					/* node '/soc/rram-controller@5004b000/rram@0/partitions/partition@0' defined in zephyr/dts/vendor/nordic/nrf54l15_partition.dtsi:13 */
    					boot_partition: partition@0 {
    						label = "mcuboot";     /* in zephyr/dts/vendor/nordic/nrf54l15_partition.dtsi:14 */
    						reg = < 0x0 0x10000 >; /* in zephyr/dts/vendor/nordic/nrf54l15_partition.dtsi:15 */
    					};
    
    					/* node '/soc/rram-controller@5004b000/rram@0/partitions/partition@10000' defined in zephyr/dts/vendor/nordic/nrf54l15_partition.dtsi:18 */
    					slot0_partition: partition@10000 {
    						label = "image-0";         /* in zephyr/dts/vendor/nordic/nrf54l15_partition.dtsi:19 */
    						reg = < 0x10000 0xa6000 >; /* in zephyr/dts/vendor/nordic/nrf54l15_partition.dtsi:20 */
    					};
    
    					/* node '/soc/rram-controller@5004b000/rram@0/partitions/partition@b6000' defined in zephyr/dts/vendor/nordic/nrf54l15_partition.dtsi:23 */
    					slot1_partition: partition@b6000 {
    						label = "image-1";         /* in zephyr/dts/vendor/nordic/nrf54l15_partition.dtsi:24 */
    						reg = < 0xb6000 0xa6000 >; /* in zephyr/dts/vendor/nordic/nrf54l15_partition.dtsi:25 */
    					};
    
    					/* node '/soc/rram-controller@5004b000/rram@0/partitions/partition@15c000' defined in zephyr/dts/vendor/nordic/nrf54l15_partition.dtsi:28 */
    					storage_partition: partition@15c000 {
    						label = "storage";         /* in zephyr/dts/vendor/nordic/nrf54l15_partition.dtsi:29 */
    						reg = < 0x15c000 0x9000 >; /* in zephyr/dts/vendor/nordic/nrf54l15_partition.dtsi:30 */
    					};
    				};

    Please be aware that I don't have an external flash as the DK has.

    Best regards,

  • Hi,

     

    Fernando Fontes said:

    Maybe it's my custom dts files the issue?

    These are the partitions on the zephyr.dts generated file:

    It is highly likely related to your mcuboot configuration.

    Can you try to only have this line set?

    https://github.com/NordicDeveloperAcademy/ncs-inter/blob/main/l9/l9_e3_sol/spi/sysbuild.conf#L2

     

    And remove/rename the sysbuild folder?

    https://github.com/NordicDeveloperAcademy/ncs-inter/tree/main/l9/l9_e3_sol/spi/sysbuild

     

    Kind regards,

    Håkon

Related