Skip to content

Commit

Permalink
cmake: partition_manager: Added warning if using single bootloader
Browse files Browse the repository at this point in the history
Add a warning message if static configuration is missing when building
with a single bootloader.

Ref.: NCSIDB-942

Signed-off-by: Sigurd Hellesvik <[email protected]>
  • Loading branch information
hellesvik-nordic authored and nordicjm committed Jul 26, 2023
1 parent fafd6bb commit 4059b61
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions cmake/partition_manager.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,22 @@ if (NOT static_configuration AND CONFIG_PM_IMAGE_NOT_BUILT_FROM_SOURCE)
place the image correctly in flash.")
endif()

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()


# Check if current image is the dynamic partition in its domain.
# I.E. it is the only partition without a statically configured size in this
Expand Down

0 comments on commit 4059b61

Please sign in to comment.