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 Reply
  • 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)

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

  • 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