direct XIP test does not build for nrf54L15dk

When building `nrf/tests/modules/mcuboot/direct_xip` with nRF SDK v2.9.0 for nRF54L15DK the build errors with the following ouput:

Partition manager failed: Error when inspecting mcuboot_secondary_pad, invalid address 0xba000, expected 0xba001,
Failed to partition region flash_primary, size of region: 1462272
Partition Configuration:
mcuboot:
  placement:
    align:
      end: 4096
    before:
    - mcuboot_primary
  size: 65536
mcuboot_pad:
  placement:
    before:
    - mcuboot_primary_app
  size: 2048
mcuboot_secondary_app:
  placement:
    after:
    - mcuboot_secondary_pad
  size: 694273
mcuboot_secondary_pad:
  placement:
    after:
    - mcuboot_primary
    align:
      start: 4096
  size: 2048


Is there a fix in the pipeline for this test/direct xip functionality with dynamic partitioning?

Are you able to provide a working static partition configuration in the meanwhile?

Thank you 

  • Hello,

    It seems a known issue. I got the same error first. After setting this SB_CONFIG_PARTITION_MANAGER=n on sysbuild.conf file, application is built and flashed.

    You can try that?

    BR
    Kazi

  • Thank you for your reply,

    That works only if SB_CONFIG_SECURE_BOOT_APPCORE=n.

    SB_CONFIG_SECURE_BOOT_APPCORE
    =y seems to require partition manager 

  • You are welcome.

    ''That works only if SB_CONFIG_SECURE_BOOT_APPCORE=n.'' can you please elaborate a bit? 

    I did not set this SB_CONFIG_SECURE_BOOT_APPCORE=n in the sysbuild.conf

  • Dynamic partitioning doesn't work for `nrf54L15dk`, so I managed to build with the following `pm_static.yml`:

    mcuboot:
      address: 0x0
      end_address: 0xc000 # should match CONFIG_PM_PARTITION_SIZE_MCUBOOT value
      placement:
        align:
          end: 0x1000
        before:
          - mcuboot_primary
      region: flash_primary
      size: 0xc000 # same as end_address
    
    mcuboot_primary:
      address: 0xc000
      end_address: 0x81000 # address + size
      orig_span: &id001
        - app
        - mcuboot_pad
      region: flash_primary
      size: 0x75000
      span: *id001
    
    mcuboot_pad:
      address: 0xc000
      end_address: 0xc800 # address + size
      placement:
        align:
          start: 0x1000
        before:
          - mcuboot_primary_app
      region: flash_primary
      sharers: 0x1
      size: 0x800 # should match SB_CONFIG_PM_MCUBOOT_PAD value
    
    mcuboot_primary_app:
      address: 0xc800 # end address of mcuboot_pad
      end_address: 0x81000 # end_address of mcuboot_primary
      orig_span: &id002
        - app
      region: flash_primary
      sharers: 0x1
      size: 0x74800 # end_address - address
      span: *id002
    
    app: # same as mcuboot_primary_app
      address: 0xc800
      end_address: 0x81000
      region: flash_primary
      size: 0x74800
    
    mcuboot_secondary:
      address: 0x81000
      end_address: 0xf6000 # address + size
      orig_span: &id003
        - mcuboot_secondary_pad
        - mcuboot_secondary_app
      region: flash_primary
      size: 0x75000
      span: *id003
    
    mcuboot_secondary_pad:
      address: 0x81000
      end_address: 0x81800 # address + size
      placement:
        after:
          - mcuboot_primary
        align:
          start: 0x1000
      region: flash_primary
      share_size:
        - mcuboot_pad
      size: 0x800 # same as mcuboot_pad
    
    mcuboot_secondary_app:
      address: 0x81800 # end address of mcuboot_secondary_pad
      end_address: 0xf6000 # end_address of mcuboot_secondary
      placement:
        after:
          - mcuboot_secondary_pad
      region: flash_primary
      share_size:
        - mcuboot_primary_app
      size: 0x74800 # end_address - address
    
    littlefs_storage:
      address: 0xf6000 # end_address of mcuboot_secondary_app
      end_address: 0x165000
      placement:
        after: mcuboot_secondary
        before: [tfm_storage, end]
      inside: [nonsecure_storage]
      region: flash_primary
      size: 0x6f000
    

  • Hello,

    ''Dynamic partitioning doesn't work for `nrf54L15dk'' Not for all the sample, only for this sample. 

    It seems adding the pm_static.yml file helps to build the sample. I checked with your pm_static.yml file (with default sysbuild.conf file) and was able to build the sample perfectly. 

    So, I can say either setting this SB_CONFIG_PARTITION_MANAGER=n or the yml file can solve the issue for this specific sample.

    Thanks for letting us know the update.

    BR

    Kazi

Related