Trouble building with mcuboot.

Hi All,

I am getting build errors for a project. Project specifics below:
- nRF52832 (custom board)
- NCS v2.6.0
- Custom board files and other configuration files attached. pm_static.yaml included as text because file type not supported for upload.
1348.centurion_anywhere_button.zip00355.prj.conf3566.mcuboot.conf

### pm_static.yaml ###
partitions:
  mcuboot:
    address: 0x00000000
    size: 0x000C0000  # 48 KB
    region: flash_primary

  image-0:
    address: 0x000C0000
    size: 0x00032000  # 200 KB
    region: flash_primary

  image-1:
    address: 0x003E0000
    size: 0x00032000  # 200 KB
    region: flash_primary

  image-scratch:
    address: 0x00700000
    size: 0x0000A000  # 40 KB
    region: flash_primary

  storage:
    address: 0x007A0000
    size: 0x00006000  # 24 KB
    region: flash_primary

regions:
  flash_primary:
    device: flash0
    size: 0x00080000  # 512 KB



Attached below is the build error(s) I am receiving. Any insight on what the issue may be would be greatly appreciated!

Parents Reply Children
  • I guess I should try and lay out as many of the steps/progress that we already went through before arriving at this ticket. 

    It started with this ticket:
    (+) Build Error Enabling CONFIG_BOOTLOADER_MCUBOOT and CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU - Nordic Q&A - Nordic DevZone - Nordic DevZone (nordicsemi.com)

    In which the response did not appear to be relevant to the nrf52832 I am using. The Nordic FAE for my region noticed this and reached out to me by email and he started helping me from there.

    Next the FAE had me comment out this portion from my custom board dts file

    /*
    &bprot {
       status = "disabled";
    };
    */

    This got us past the no fprotect build error. Then there was a build error from RAM overflow which I fixed by reducing memory usage in code.

    Next we worked on adding the customer's existing private key file to use instead of the default nordic example one. For some reason this would not work using the prj.conf inclusion/cmakelists.txt inclusion methods. It did seem to work by adding a child_image folder and adding a mcuboot.conf file which is attached to this post for reference.

    Now when building it would get past the previous issues but it would give a warning about not having a pm_static.yml file. This isn't confirmed to be the culprit of the errors shown as the basis for this ticket but we tried adding one anyways which didn't work, and also tried renaming and moving the partitions.yml to be the pm_static.yml. Both of those options removed the warning for not having a pm_static.yml but left us with the errors shown in the picture I attached in the first comment. 


  • dlewis said:
    oving the partitions.yml to be the pm_static.yml.

    Right, this is one of the use-cases.

    In my mind there are two use-cases for pm_static.yml:

    1. Freezing partitioning for DFU. This is required for release.
      1. Not needed for developing.
      2. Done by copying partitions.yml
    2. Adding a custom partition
      1. Only define the custom partition, and the partition manager will try to dynamically partition around this
    dlewis said:
    Now when building it would get past the previous issues but it would give a warning about not having a pm_static.yml file.

    I added this warning, and it is to remind users of the Static partition requirement for DFU.

    This being said, there should be no change in an app which does not use pm_static.yml, and an app that uses the same pm_static.yml as build/partitions.yml. This just freezes the partition, so that you can never change partitioning again.

    In other words, unless you are developing for release now, I do not think pm_static.yml is the solution to your issue.

  • Thanks for the information. The issue seems to be resolved now. I reinstalled vs code and the sdk/toolchain and the issue seemed to have gone away. 

Related