warning from partition_manager on NCS 2.5.0

I'm trying to migrate my project from NCS2.4.2 to NCS2.5.0.

At that time, the following warning occurs.

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

What should I do?

Bootloader settings in proj.conf.

CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_SECURE_BOOT=y
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y
CONFIG_MCUMGR_TRANSPORT_BT_AUTHEN=n
CONFIG_MCUMGR_MGMT_NOTIFICATION_HOOKS=y
CONFIG_MCUMGR_GRP_IMG_UPLOAD_CHECK_HOOK=y

Parents
  • Hello,

    It is recommended to use a static partition file to ensure the flash memory layout remains the same across all your builds. You can use the generated $BUILD_DIR/partitions.yml file as your static PM file as explained here: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.0/nrf/scripts/partition_manager/partition_manager.html#configuring-static-partitions 

    Best regards,

    Vidar

  • Please let me know what problems you have when using pm_static.yml.

    Also, in the case of nRF5340, do I need to prepare static partition files for application core and net core?

  • The partition file is generated automatically during the build, and you can find it in the build directory as a file named 'partitions.yml'. When you are ready to lock down the memory layout for your project, make a copy of this file, name it static_partition.yml, and place it in your project root. The build system will start using this next time you perform a pristine build.

  • Yes, I have done that for the application. It gets "statically defined" during the build. How do I do this for mcuboot.


    -- Found partition manager static configuration: C:/devel/source/ncs/napps/Bdg_prod/configuration/b212_cpuapp/pm_static.yml
    Partition 'mcuboot' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_primary' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_pad' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_primary_app' is not included in the dynamic resolving since it is statically defined.
    Partition 'settings_storage' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_primary_1' is not included in the dynamic resolving since it is statically defined.
    Partition 'pcd_sram' is not included in the dynamic resolving since it is statically defined.
    Partition 'rpmsg_nrf53_sram' 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.
    Partition 'mcuboot_secondary_1' is not included in the dynamic resolving since it is statically defined.
    -- Configuring done
    -- G

    I still get the warning 


    CMake Warning at C:/devel/source/ncs/v2.5.0/nrf/cmake/partition_manager.cmake:79 (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. ---
    ---------------------------------------------------------------------

  • Strange, the file has all partitions including the one for mcuboot. Can you try to delete the build folder and then build again to ensure a clean build. It’s worth a try.

  • That did not fix it.

    We have a 'configurations\custombrd\' folder with a folder 'child_image' with a folder for each image bo, mcuboot, and hci_rpmsg. In those folders we have the pr.conf files.

    This started when we migrated to 2.5.0 from 2.4.2

    So we are not using the default pr.conf for mcuboot, bo, hci_rpmsg.

    Are we missing a setting in the mcu_boot configuration?

Reply Children
  • So in our system we have a custom board folder.

    In our project folder, we have "configuration\custombrd"

    Within the "custombrd" folder we have a pm_static_CPUAPP.yml and pm_static_CPUNET.yml.

    we then added this to the makefile

    set(APPLICATION_CONFIG_DIR "configuration/\${BOARD}")
    SET(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/custombrd/pm_static_CPUAPP.yml)
    SET(hci_rpmsg_b0n_OVERLAY_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/configuration/custombrd/child_image/b0/prj.conf")
    SET(hci_rpmsg_PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/custombrd/pm_static_CPUNET.yml)

    we do define a prj.conf file in each of the "child_image\b0", "child_image\hci_rpmsg" and "child_image\mcuboot"

    There is some reference help if you search Zephyr for "pm_static_CPUNET". As usual it is not very clear. 

    Best of luck. We have updated to 2.5.1, with no observed issues yet.

Related