Unexpected warning message: partition_manager.cmake says I do not use pm_static.yml, even though it is there.

Hello,

I am using a nRF5340 with mcuboot and multiple customer-specific partitions.
I did not finish creating a separate board definition yet. Currently, we are using the nRF5340-DK board definition and remove development kit specific items while adding our components. Just for reference.
Concerning the partitions, I created pm_static.yml in out project's base directory (where src/, build/ and child_image/ directories also reside). The partition handling seemed to work in our main application.

When I perform a pristine build, I receive an error message, telling me that I would not use a static partition configuration (pm_static.yml). although it is there.

[{  "resource": "/c:/ncs/v2.5.2/nrf/cmake/partition_manager.cmake",
    "owner": "nrf-connect",
    "severity": 4,
    "message": "CMake Warning at C:/ncs/v2.5.2/nrf/cmake/partition_manager.cmake:79 (message):",
    "source": "cmake",
    "startLineNumber": 79,
    "startColumn": 1,
    "endLineNumber": 79,
    "endColumn": 2147483647
}]

...and if I double-click on the message, I see this piece of code in partition_manager.cmake:

if (NOT static_configuration AND
  (CONFIG_BOOTLOADER_MCUBOOT OR CONFIG_SECURE_BOOT))
      message(WARNING "
        ---------------------------------------------------------------------
        --- WARNING: Using a bootloader without pm_static.yml.            ---
        --- There are cases where a deployed product can consist of       ---
        --- multiple images, and only a subset of these images can be     ---
        --- upgraded through a firmware update mechanism. In such cases,  ---
        --- the upgradable images must have partitions that are static    ---
        --- and are matching the partition map used by the bootloader     ---
        --- programmed onto the device.                                   ---
        ---------------------------------------------------------------------
        \n"
      )
endif()

What went wrong here? Is my pm_static.yml applied successfully?

Best regards,
Michael

  • Hello Michael,

    What went wrong here? Is my pm_static.yml applied successfully?

    Interesting. I added this warning, so I would very much like to figure out why it is wrong.

    Could you add the following in partition_manager.cmake, just before the if()?

    message("PUT A LOT OF STUFF HERE SO WE EASILY CAN FIND THIS IN THE LOGS AAAAAAAAAAAAAAAAAAAAAAAAAAAA")
    message("Static configuration: ${static_configuration}")
    message("CONFIG_BOOTLOADER_MCUBOOT: ${CONFIG_BOOTLOADER_MCUBOOT}")
    message("CONFIG_SECURE_BOOT: ${CONFIG_SECURE_BOOT}")
    message("PUT A LOT OF STUFF HERE SO WE EASILY CAN FIND THIS IN THE LOGS AAAAAAAAAAAAAAAAAAAAAAAAAAAA")
    if (NOT static_configuration AND
    ...

    Regards,
    Sigurd Hellesvik

Related