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
Parents Reply Children
  • 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

  • Hi, 

    That is precisely what I've. I'm using the L9_e5, not the L9_e3.

    Best regards,

  • I took the same sample:

    https://github.com/NordicDeveloperAcademy/ncs-inter/tree/main/l9/l9_e5_sol

    did not changes, and built for nrf54l15dk/nrf54l15/cpuapp

     

    This is the output:

    ** Booting My Application v2.9.0-5ab89f397924 ***
    *** Using nRF Connect SDK v3.1.1-e2a97fe2578a ***
    *** Using Zephyr OS v4.1.99-ff8f0c579eeb ***
    Starting Bluetooth Peripheral LBS sample
    I: 2 Sectors of 4096 bytes
    I: alloc wra: 0, fc0
    I: data wra: 0, 0
    I: SoftDevice Controller build revision: 
    I: fc de 41 eb a2 d1 42 24 |..A...B$
    I: 00 b5 f8 57 9f ac 9d 9e |...W....
    I: aa c9 b4 34             |...4    
    I: HW Platform: Nordic Semiconductor (0x0002)
    I: HW Variant: nRF54Lx (0x0005)
    I: Firmware: Standard Bluetooth controller (0x00) Version 252.16862 Build 1121034987
    I: No ID address. App must call settings_load()
    Bluetooth initialized
    I: HCI transport: SDC
    I: Identity: F7:36:2B:14:6E:A9 (random)
    I: HCI: version 6.1 (0x0f) revision 0x3069, manufacturer 0x0059
    I: LMP: version 6.1 (0x0f) subver 0x3069
    Advertising successfully started
    
    

     

    Here you can see mcuboot is booting the application successfully.

     

    What are your added changes on top of this sample?

    Can you please share your overall build log?

     

    Kind regards,

    Håkon

Related