Adding demo bootloader for nrf54L15

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

Using LBS sample, NCS 3.1.0, toolchain 3.1.0 and finally  No configure step for 'mcuboot', as mention in sysbuild.conf have only this

SB_CONFIG_BOOTLOADER_MCUBOOT=y

in prj.conf

CONFIG_NCS_SAMPLES_DEFAULTS=y

CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME="Nordic_LBS"

# Enable the LBS service
CONFIG_BT_LBS=y
CONFIG_BT_LBS_POLL_BUTTON=y
CONFIG_DK_LIBRARY=y

CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y

Not sure what goes wrong (and feel that documentation changes too fast ... too many versions in a short time)

Parents Reply
  • so if set for flpr why is used for cpuapp during generation of partition.yml ?

    Link to pm_static_nrf54l15dk_nrf54l05_cpuapp_release.yml gives 404, not sure should I log to , add repo , ?!

    BTW. it is not a problem of calculating partition etc. This is normal day. But I feel that documentation and zephyr are a little bit underdeveloped. It supposedly "solves" a lot of issues, but if something doesn't work, you have to dig deeper (today I came across a library for the HDC2080 again, it supposedly exists, but only a little, and the rest needs to be added anyway... so maybe it would be easier to write it from scratch without all that overhead...)

Children
  • No, it doesn't set as flpr is not supported for nRF54L05.

    That's an internal link. Here is the content:

    mcuboot:
      address: 0x0
      region: flash_primary
      size: 0x6000
    
    mcuboot_primary:
      address: 0x6000
      orig_span: &id001
      - app
      - mcuboot_pad
      region: flash_primary
      size: 0x3a000
      span: *id001
    mcuboot_pad:
      address: 0x6000
      region: flash_primary
      size: 0x800
    app:
      address: 0x6800
      region: flash_primary
      size: 0x39800
    mcuboot_primary_app:
      address: 0x6800
      orig_span: &id002
      - app
      region: flash_primary
      size: 0x39800
      span: *id002
    
    mcuboot_secondary:
      address: 0x40000
      orig_span: &id003
      - mcuboot_secondary_pad
      - mcuboot_secondary_app
      region: flash_primary
      size: 0x3a000
      span: *id003
    mcuboot_secondary_pad:
      address: 0x40000
      region: flash_primary
      size: 0x800
    mcuboot_secondary_app:
      address: 0x40800
      region: flash_primary
      size: 0x39800
    
    settings_storage:
      address: 0x7a000
      region: flash_primary
      size: 0x3000

  • thank you.

    Yes, now when I shrink code via config and could run build with default partitions, I observed for L05 that fill region in a good way, not sure why they created two empty blocks but maybe this is solution (SIC!) for the gaps 

    EMPTY_0:
      address: 0xd800
      end_address: 0xe000
      placement:
        after:
        - mcuboot
      region: flash_primary
      size: 0x800
    EMPTY_1:
      address: 0x7c000
      end_address: 0x7d000
      placement:
        after:
        - mcuboot_secondary
      region: flash_primary
      size: 0x1000
    app:
      address: 0xe800
      end_address: 0x45000
      region: flash_primary
      size: 0x36800
    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: 0x45000
      orig_span: &id001
      - mcuboot_pad
      - app
      region: flash_primary
      sharers: 0x1
      size: 0x37000
      span: *id001
    mcuboot_primary_app:
      address: 0xe800
      end_address: 0x45000
      orig_span: &id002
      - app
      region: flash_primary
      size: 0x36800
      span: *id002
    mcuboot_secondary:
      address: 0x45000
      end_address: 0x7c000
      placement:
        after:
        - mcuboot_primary
        align:
          start: 0x1000
        align_next: 0x1000
      region: flash_primary
      share_size:
      - mcuboot_primary
      size: 0x37000
    otp:
      address: 0xffd500
      end_address: 0xffd9fc
      region: otp
      size: 0x4fc
    sram_primary:
      address: 0x20000000
      end_address: 0x20018000
      region: sram_primary
      size: 0x18000

    not sure why (I based on this info, because earlier I tested this on L15) they stick to 0x165000 which is not full 1.5M (3*7d000)

    EMPTY_0:
      address: 0x162000
      end_address: 0x163000
      placement:
        after:
        - mcuboot_secondary
      region: flash_primary
      size: 0x1000
    app:
      address: 0xe800
      end_address: 0xb8000
      region: flash_primary
      size: 0xa9800
    bootconf:
      address: 0xffd080
      end_address: 0xffd084
      region: bootconf
      size: 0x4
    mcuboot:
      address: 0x0
      end_address: 0xe000
      placement:
        align:
          end: 0x1000
        before:
        - mcuboot_primary
      region: flash_primary
      size: 0xe000
    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: 0xb8000
      orig_span: &id001
      - mcuboot_pad
      - app
      region: flash_primary
      sharers: 0x1
      size: 0xaa000
      span: *id001
    mcuboot_primary_app:
      address: 0xe800
      end_address: 0xb8000
      orig_span: &id002
      - app
      region: flash_primary
      size: 0xa9800
      span: *id002
    mcuboot_secondary:
      address: 0xb8000
      end_address: 0x162000
      placement:
        after:
        - mcuboot_primary
        align:
          start: 0x1000
      region: flash_primary
      share_size:
      - mcuboot_primary
      size: 0xaa000
    otp:
      address: 0xffd500
      end_address: 0xffd9fc
      region: otp
      size: 0x4fc
    settings_storage:
      address: 0x163000
      end_address: 0x165000
      placement:
        after:
        - app
        align:
          start: 0x1000
        before:
        - end
      region: flash_primary
      size: 0x2000
    sram_primary:
      address: 0x20000000
      end_address: 0x2002f000
      region: sram_primary
      size: 0x2f000

    this is also auto-generated from a simple L15 configuration (thus I guess that for l05 could be same but now I see that they use full available memory so set as the biggest end address 7d000)

  • reichel said:
    I observed for L05 that fill region in a good way, not sure why they created two empty blocks but maybe this is solution (SIC!) for the gaps 

    The EMPTY blocks are for alignment.  Since the gap size between mcuboot and flash_primary for alignment is 0x800, I set CONFIG_PM_PARTITION_SIZE_MCUBOOT=0xd000 in sysbuild/mcuboot.conf for L05 to reduce the mcuboot, which results in a partition without empty blocks.

      

Related