WARNING: Using a bootloader without pm_static.yml on ncs v2.5.2

Procedures to reproduce this issue are as follows.

1. Unzipping caf_flash.zip to C:\ncs\v2.5.2\nrf\samples folder.

2. cd C:\ncs\v2.5.2\nrf\samples\caf_flash

3. west build -b nrf5340dk_nrf5340_cpuapp

The following are log messages of west build.

C:\ncs\v2.5.2\nrf\samples\caf_flash>west build -b nrf5340dk_nrf5340_cpuapp
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: C:/ncs/v2.5.2/nrf/samples/caf_flash
-- CMake version: 3.20.5
-- Using NCS Toolchain 2.5.20231017.848171396279 for building. (C:/ncs/toolchains/c57af46cb7/cmake)
...
CMake Warning at C:/ncs/v2.5.2/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.                                   ---
          ---------------------------------------------------------------------

Parents
  • Thanks for your reply! I have added pm_static.yml to C:\ncs\v2.5.2\nrf\samples\caf_pm_static\configuration\nrf5340dk_nrf5340_cpuapp folder and added set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static.yml) to C:\ncs\v2.5.2\nrf\samples\caf_pm_static\CMakeLists.txt file. But this issue still occurred.

    Procedures to reproduce this issue are as follows.

    1. Unzipping caf_pm_static.zip to C:\ncs\v2.5.2\nrf\samples folder.

    2. cd C:\ncs\v2.5.2\nrf\samples\caf_pm_static

    3. west build -b nrf5340dk_nrf5340_cpuapp

    The following are log messages of west build.

  • Thanks for your reply! I copied pm_static.yml file from C:\ncs\v2.5.2\nrf\applications\nrf_desktop\configuration\nrf5340dk_nrf5340_cpuapp. But why west build still have the following warning messages.

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

  • Does it work if you put it inside the nrf_desktop folder instead?

  • Thanks for your reply! Running west build command under nrf_desktop folder doesn't have this issue.

    -- Found partition manager static configuration: C:/ncs/v2.5.2/nrf/applications/nrf_desktop/configuration/nrf5340dk_nrf5340_cpuapp/pm_static.yml
    Partition 'b0_container' is not included in the dynamic resolving since it is statically defined.
    Partition 'b0' is not included in the dynamic resolving since it is statically defined.
    Partition 'provision' is not included in the dynamic resolving since it is statically defined.
    Partition 's0' is not included in the dynamic resolving since it is statically defined.
    Partition 's0_image' is not included in the dynamic resolving since it is statically defined.
    Partition 's1' is not included in the dynamic resolving since it is statically defined.
    Partition 's1_image' 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.
    Dropping partition 's0_pad' since its size is 0.
    Dropping partition 's1_pad' since its size is 0.

  • I have fixed this issue by changing CMakeLists.txt as follows.

    cmake_minimum_required(VERSION 3.20.0)
    
    set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static.yml)
    message(STATUS "PM_STATIC_YML_FILE: ${PM_STATIC_YML_FILE}")
    
    find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
    project(NONE)
    
    
    # NORDIC SDK APP START
    target_sources(app PRIVATE
      src/main.c
    )
    # NORDIC SDK APP END
    
    # Add include directory for board specific CAF def files
    zephyr_include_directories(
      configuration/${BOARD}
      )
    
    target_sources_ifdef(CONFIG_CAF_SAMPLE_LED_STATE
      app PRIVATE src/modules/led_state.c)

  • Im getting the same error and this did not fix it. 
    my pm_static.yml is in root of the project so I modified the cmake file to 

    cmake_minimum_required(VERSION 3.20.0)
    
    set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/pm_static.yml)
    message(STATUS "PM_STATIC_YML_FILE: ${PM_STATIC_YML_FILE}")
    
    find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
    project(none)
    
    
    # NORDIC SDK APP START
    target_sources(app PRIVATE
      src/main.c
    )
    # NORDIC SDK APP END
    
    # Add include directory for board specific CAF def files
    zephyr_include_directories(
      boards/${BOARD}
      )

    The generated path is correct

    But still getting warning:

    CMake Warning at C:/ncs/v2.6.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.                                   ---
              ---------------------------------------------------------------------

Reply
  • Im getting the same error and this did not fix it. 
    my pm_static.yml is in root of the project so I modified the cmake file to 

    cmake_minimum_required(VERSION 3.20.0)
    
    set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/pm_static.yml)
    message(STATUS "PM_STATIC_YML_FILE: ${PM_STATIC_YML_FILE}")
    
    find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
    project(none)
    
    
    # NORDIC SDK APP START
    target_sources(app PRIVATE
      src/main.c
    )
    # NORDIC SDK APP END
    
    # Add include directory for board specific CAF def files
    zephyr_include_directories(
      boards/${BOARD}
      )

    The generated path is correct

    But still getting warning:

    CMake Warning at C:/ncs/v2.6.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.                                   ---
              ---------------------------------------------------------------------

Children
  • fixed with adding \" \" when applying value to variable

    cmake_minimum_required(VERSION 3.20.0)
    
    set(PM_STATIC_YML_FILE \"${CMAKE_CURRENT_SOURCE_DIR}/pm_static.yml\")
    message(STATUS >>>>>>> "PM_STATIC_YML_FILE: ${PM_STATIC_YML_FILE}")
    
    #INFO this fixes the prj.conf issue with custom Private MCU BOOT Key
    set(mcuboot_CONFIG_BOOT_SIGNATURE_KEY_FILE \"${CMAKE_CURRENT_SOURCE_DIR}/private.key\")
    
    find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
    
    project(none)
    
    FILE(GLOB app_sources src/*.c)
    
    target_sources(app PRIVATE
      ${app_sources}
      )

Related