@@ -39,6 +39,11 @@ function(partition_manager)
3939 if (DEFINED PM_DOMAIN)
4040 string (CONFIGURE "${${image_name} _PM_STATIC_YML_FILE}" user_def_pm_static)
4141 get_property (image_name GLOBAL PROPERTY DOMAIN_APP_${PM_DOMAIN} )
42+ sysbuild_get(${image_name} _BOARD IMAGE ${image_name} VAR BOARD CACHE )
43+
44+ if (DEFINED ${image_name} _BOARD)
45+ set (ncs_file_board BOARD ${${image_name} _BOARD})
46+ endif ()
4247 else ()
4348 string (CONFIGURE "${PM_STATIC_YML_FILE} " user_def_pm_static)
4449 get_property (image_name GLOBAL PROPERTY DOMAIN_APP_APP)
@@ -52,14 +57,16 @@ function(partition_manager)
5257
5358 ncs_file(CONF_FILES ${${image_name} _APPLICATION_CONFIG_DIR}
5459 PM conf_dir_pm_static
55- DOMAIN ${DOMAIN }
60+ DOMAIN ${PM_DOMAIN }
5661 BUILD ${CONF_FILE_BUILD_TYPE}
62+ ${ncs_file_board}
5763 )
5864
5965 ncs_file(CONF_FILES ${BOARD_DIR}
6066 PM board_dir_pm_static
61- DOMAIN ${DOMAIN }
67+ DOMAIN ${PM_DOMAIN }
6268 BUILD ${CONF_FILE_BUILD_TYPE}
69+ ${ncs_file_board}
6370 )
6471
6572 if (EXISTS "${user_def_pm_static} " AND NOT IS_DIRECTORY "${user_def_pm_static} " )
@@ -80,17 +87,25 @@ function(partition_manager)
8087 # user with a warning to do a pristine build if it differs to avoid having stale
8188 # configuration used for MCUboot images
8289 file (MD5 ${static_configuration_file} static_configuration_checksum)
83- if (NOT DEFINED STATIC_PM_FILE_HASH OR NOT "${STATIC_PM_FILE_HASH} " STREQUAL "${static_configuration_checksum} " )
84- if (DEFINED STATIC_PM_FILE_HASH)
90+ if (DEFINED PM_DOMAIN)
91+ set (static_configuration_checksum_var STATIC_PM_FILE_HASH_${PM_DOMAIN} )
92+ set (static_configuration_extra_text for domain ${PM_DOMAIN} )
93+ else ()
94+ set (static_configuration_checksum_var STATIC_PM_FILE_HASH)
95+ set (static_configuration_extra_text)
96+ endif ()
97+
98+ if (NOT DEFINED ${static_configuration_checksum_var} OR NOT "${${static_configuration_checksum_var} }" STREQUAL "${static_configuration_checksum} " )
99+ if (DEFINED ${static_configuration_checksum_var} )
85100 message (WARNING "Static partition manager file has changed since this project was last configured, "
86101 "this may cause images to use the original static partition manager file "
87102 "configuration data, which is incorrect. It is recommended that a pristine build be "
88103 "performed when a static partition manager file is updated."
89104 )
90105 endif ()
91106
92- set (STATIC_PM_FILE_HASH "${static_configuration_checksum} " CACHE INTERNAL
93- "nRF Connect SDK static partition manager file hash" FORCE
107+ set (${static_configuration_checksum_var} "${static_configuration_checksum} " CACHE INTERNAL
108+ "nRF Connect SDK static partition manager file hash ${static_configuration_extra_text} " FORCE
94109 )
95110 endif ()
96111
0 commit comments