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

  • Hi,

    I have tried the solution for NCS 2.9.0, but it doesn’t seem to be working.

    I created the sysbuild.cmake file and the pm_static_CPUNET.yml inside my project directory (at the same level as prj.conf, CMakeLists.txt, etc.).
    I commented out line 126 in cmake/sysbuild/partition_manager.cmake.

    When doing a pristine build, I can see the status message showing the correct pm_static_CPUNET.yml file location

    -- sysbuild.cmake - hci_ipc_PM_STATIC_YML_FILE: /Users/.../pm_static_CPUNET.yml

    However, if I modify the sectors inside the pm_static_CPUNET.yml, it has no effect.
    (= the partition_manager_report is same as without the changes)

    Best regards,
    Milan

  • Hi, do you use the hci_ipc module for the NET core? Or hci_radio? With the latter, you might have to change the target name in the sysbuild.cmake definition.

    I think this concept is still a bit instransparent... you don't set the static partitioning for the core itself (or for sysbuild), but for the main application running on the core. Which is then forwarded to the linker.

    Best regards,
    Michael

  • Hi Michael,

    We do have IPC Radio, so changing the name in sysbuild.cmake to "ipc_radio_PM_STATIC_YML_FILE" did the trick.

    Interestingly, it doesn’t seem to include the app image region.
    When using the appcore pm_static, I get this output — and it looks legit:


    But for the netcore, the partition related to the app (ipc_radio) is missing.
    Additionally, there’s a warning message:


    Best Regards,
    Milan

  • Hi Milan,

    if I remember correctly, the first screenshot is normal output and I have something similar, too - it just tells you that the partitions are statically defined and the system doesn't try to place them arbitrarily.

    I checked and I have the second screenshot's warning message, too... probably the build system overwrites some arbitrarily generated partitioning file with the configured static partitioning file. At least you can check in the build directory which partition offsets/sizes were actually used in the build.

    Best regards,
    Michael

  • Hi,

    Yes, the first screenshot is correct — the point is that the second screenshot (cpunet) is missing any information about the app_image.

    I would expect to see something like:

    “Partition ‘app_image’ is not included.”

    Currently, if I modify the app memory region in pm_static_CPUNET.yml, the change has no effect.
    However, if I modify the b0n memory region, the change is reflected (e.g., memory overflow errors, etc.).

    Thank you.
    Best Regards,
    Milan

Related