Generation of MCUboot and application addresses, offsets, and padding when pm_static.yml is not present (Peripheral LBS Sample).

I am using peipheral lbs sample and modifying it for my project use. By default it doesnot has pm_static.yml where addresses could have been defined. Once i build the modified application it results in partitions.yml file and pm.config file. These files have all the relevant placement data of mcuboot, primary and secondary partitions, padding etc. From where these files are getting the relevant data ?
I have checked the following files but couldnt get much info. 

  • C:/ncs/v2.7.0/nrf/cmake/partition_manager.cmake
  • files in C:/ncs/v2.7.0/nrf/subsys/partition_manager/
  • files in C:/ncs/v2.7.0/zephyr/boards/nordic/nrf52dk/
  • .dts file for nrf52dk , this one has some info but not all of it
1- From where these files partitions.yml file and pm.config are getting the relevant addresses, offsets and size of mcuboot and app?
2- I want to have and understanding of this process. The purpose is to know how to flash bootloader and app separately on relevant addresses.
3- Where can I find documentation or literature explaining how to define and use macros in pm_static.yml for configuring flash partitions?
4- Which CMake file in NCS is responsible for merging the bootloader and application into the final firmware image?
Parents
  • build/partitions.yml

    app:
      address0xc200
      end_address0x45000
      regionflash_primary
      size0x38e00
    mcuboot:
      address0x0
      end_address0xc000
      placement:
        before:
        - mcuboot_primary
      regionflash_primary
      size0xc000
    mcuboot_pad:
      address0xc000
      end_address0xc200
      placement:
        align:
          start0x1000
        before:
        - mcuboot_primary_app
      regionflash_primary
      size0x200
    mcuboot_primary:
      address0xc000
      end_address0x45000
      orig_span&id001
      - mcuboot_pad
      - app
      regionflash_primary
      sharers0x1
      size0x39000
      span*id001
    mcuboot_primary_app:
      address0xc200
      end_address0x45000
      orig_span&id002
      - app
      regionflash_primary
      size0x38e00
      span*id002
    mcuboot_secondary:
      address0x45000
      end_address0x7e000
      placement:
        after:
        - mcuboot_primary
        align:
          start0x1000
      regionflash_primary
      share_size:
      - mcuboot_primary
      size0x39000
    settings_storage:
      address0x7e000
      end_address0x80000
      placement:
        align:
          start0x1000
        before:
        - end
      regionflash_primary
      size0x2000
    sram_primary:
      address0x20000000
      end_address0x20010000
      regionsram_primary
      size0x10000
Reply
  • build/partitions.yml

    app:
      address0xc200
      end_address0x45000
      regionflash_primary
      size0x38e00
    mcuboot:
      address0x0
      end_address0xc000
      placement:
        before:
        - mcuboot_primary
      regionflash_primary
      size0xc000
    mcuboot_pad:
      address0xc000
      end_address0xc200
      placement:
        align:
          start0x1000
        before:
        - mcuboot_primary_app
      regionflash_primary
      size0x200
    mcuboot_primary:
      address0xc000
      end_address0x45000
      orig_span&id001
      - mcuboot_pad
      - app
      regionflash_primary
      sharers0x1
      size0x39000
      span*id001
    mcuboot_primary_app:
      address0xc200
      end_address0x45000
      orig_span&id002
      - app
      regionflash_primary
      size0x38e00
      span*id002
    mcuboot_secondary:
      address0x45000
      end_address0x7e000
      placement:
        after:
        - mcuboot_primary
        align:
          start0x1000
      regionflash_primary
      share_size:
      - mcuboot_primary
      size0x39000
    settings_storage:
      address0x7e000
      end_address0x80000
      placement:
        align:
          start0x1000
        before:
        - end
      regionflash_primary
      size0x2000
    sram_primary:
      address0x20000000
      end_address0x20010000
      regionsram_primary
      size0x10000
Children
No Data
Related