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

Parents
  • 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

  • This message shows 3 times. The last time its all good.

    PUT A LOT OF STUFF HERE SO WE EASILY CAN FIND THIS IN THE LOGS AAAAAAAAAAAAAAAAAAAAAAAAAAAA
    Static configuration:
    CONFIG_BOOTLOADER_MCUBOOT:
    CONFIG_SECURE_BOOT:
    PUT A LOT OF STUFF HERE SO WE EASILY CAN FIND THIS IN THE LOGS AAAAAAAAAAAAAAAAAAAAAAAAAAAA
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Users//Projects/Programing/nRF/build/hci_ipc/b0n
    === child image b0n - CPUNET (inherited) end ===

    CMake Warning at C:/ncs/v2.6.0/nrf/subsys/bootloader/cmake/debug_keys.cmake:36 (message):

    --------------------------------------------------------------
    --- WARNING: Using generated NSIB public/private key-pair. ---
    --- It should not be used for production. ---
    --- See CONFIG_SB_SIGNING_KEY_FILE ---
    --------------------------------------------------------------

    Call Stack (most recent call first):
    C:/ncs/v2.6.0/nrf/subsys/bootloader/cmake/provision_hex.cmake:47 (include)
    C:/ncs/v2.6.0/nrf/subsys/CMakeLists.txt:20 (include)


    -- libmetal version: 1.4.0 (C:/ncs/v2.6.0/zephyr/samples/bluetooth/hci_ipc)
    -- Build type:
    -- Host: Windows/AMD64
    -- Target: Generic/arm
    -- Machine: arm
    -- open-amp version: 1.4.0 (C:/ncs/v2.6.0/modules/lib/open-amp/open-amp)
    -- Host: Windows/AMD64
    -- Target: Generic/arm
    -- Machine: arm
    -- C_FLAGS : -Wall -Wextra
    PUT A LOT OF STUFF HERE SO WE EASILY CAN FIND THIS IN THE LOGS AAAAAAAAAAAAAAAAAAAAAAAAAAAA
    Static configuration:
    CONFIG_BOOTLOADER_MCUBOOT:
    CONFIG_SECURE_BOOT: y
    PUT A LOT OF STUFF HERE SO WE EASILY CAN FIND THIS IN THE LOGS AAAAAAAAAAAAAAAAAAAAAAAAAAAA
    CMake Warning at C:/ncs/v2.6.0/nrf/cmake/partition_manager.cmake:85 (message):

    ---------------------------------------------------------------------
    --- 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. ---
    ---------------------------------------------------------------------

    Call Stack (most recent call first):
    C:/ncs/v2.6.0/zephyr/cmake/modules/kernel.cmake:248 (include)
    C:/ncs/v2.6.0/zephyr/cmake/modules/zephyr_default.cmake:138 (include)
    C:/ncs/v2.6.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
    C:/ncs/v2.6.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:97 (include_boilerplate)
    CMakeLists.txt:5 (find_package)


    -- Configuring done
    -- Generating done

    PUT A LOT OF STUFF HERE SO WE EASILY CAN FIND THIS IN THE LOGS AAAAAAAAAAAAAAAAAAAAAAAAAAAA
    Static configuration:
    CONFIG_BOOTLOADER_MCUBOOT:
    CONFIG_SECURE_BOOT:
    PUT A LOT OF STUFF HERE SO WE EASILY CAN FIND THIS IN THE LOGS AAAAAAAAAAAAAAAAAAAAAAAAAAAA
    MCUBoot bootloader key file: C:/Users/ivanr2/Desktop/Projects/Programing/nRF/private.key
    -- Configuring done
    -- Generating done

  • sorry, 4 times with the last one
    PUT A LOT OF STUFF HERE SO WE EASILY CAN FIND THIS IN THE LOGS AAAAAAAAAAAAAAAAAAAAAAAAAAAA
    Static configuration: --static-config;C:/Users/ivanr2/Desktop/Projects/Programing/nRF/pm_static.yml
    CONFIG_BOOTLOADER_MCUBOOT: y
    CONFIG_SECURE_BOOT:
    PUT A LOT OF STUFF HERE SO WE EASILY CAN FIND THIS IN THE LOGS AAAAAAAAAAAAAAAAAAAAAAAAAAAA
    Partition 'littlefs_storage' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_secondary' is not included in the dynamic resolving since it is statically defined.

Reply
  • sorry, 4 times with the last one
    PUT A LOT OF STUFF HERE SO WE EASILY CAN FIND THIS IN THE LOGS AAAAAAAAAAAAAAAAAAAAAAAAAAAA
    Static configuration: --static-config;C:/Users/ivanr2/Desktop/Projects/Programing/nRF/pm_static.yml
    CONFIG_BOOTLOADER_MCUBOOT: y
    CONFIG_SECURE_BOOT:
    PUT A LOT OF STUFF HERE SO WE EASILY CAN FIND THIS IN THE LOGS AAAAAAAAAAAAAAAAAAAAAAAAAAAA
    Partition 'littlefs_storage' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_secondary' is not included in the dynamic resolving since it is statically defined.

Children
Related