@@ -37,6 +37,11 @@ function(dfu_app_zip_package)
3737
3838 if (NOT SB_CONFIG_MCUBOOT_BUILD_DIRECT_XIP_VARIANT)
3939 # Application
40+ math (EXPR internal_slot_primary "${internal_slot_primary} + 1" )
41+ math (EXPR internal_slot_secondary "${internal_slot_secondary} + 1" )
42+ math (EXPR external_slot_primary "${external_slot_primary} + 1" )
43+ math (EXPR external_slot_secondary "${external_slot_secondary} + 1" )
44+
4045 set (generate_script_app_params
4146 "${app_internal_update_name} load_address=$<TARGET_PROPERTY:partition_manager,PM_APP_ADDRESS>"
4247 "${app_internal_update_name} image_index=${SB_CONFIG_MCUBOOT_APPLICATION_IMAGE_NUMBER} "
@@ -109,6 +114,9 @@ function(dfu_app_zip_package)
109114
110115 if (NOT SB_CONFIG_MCUBOOT_BUILD_DIRECT_XIP_VARIANT)
111116 # Application
117+ math (EXPR slot_primary "${slot_primary} + 1" )
118+ math (EXPR slot_secondary "${slot_secondary} + 1" )
119+
112120 set (generate_script_app_params
113121 "${app_update_name} load_address=$<TARGET_PROPERTY:partition_manager,PM_APP_ADDRESS>"
114122 "${app_update_name} image_index=${SB_CONFIG_MCUBOOT_APPLICATION_IMAGE_NUMBER} "
@@ -166,6 +174,8 @@ function(dfu_app_zip_package)
166174
167175 mcuboot_image_number_to_slot(net_update_slot_primary ${SB_CONFIG_MCUBOOT_NETWORK_CORE_IMAGE_NUMBER} n)
168176 mcuboot_image_number_to_slot(net_update_slot_secondary ${SB_CONFIG_MCUBOOT_NETWORK_CORE_IMAGE_NUMBER} y)
177+ math (EXPR net_update_slot_primary "${net_update_slot_primary} + 1" )
178+ math (EXPR net_update_slot_secondary "${net_update_slot_secondary} + 1" )
169179
170180 set (generate_script_app_params
171181 ${generate_script_app_params}
@@ -186,6 +196,8 @@ function(dfu_app_zip_package)
186196 # nRF7x Wifi patch
187197 mcuboot_image_number_to_slot(nrf70_patches_slot_primary ${SB_CONFIG_MCUBOOT_WIFI_PATCHES_IMAGE_NUMBER} n)
188198 mcuboot_image_number_to_slot(nrf70_patches_slot_secondary ${SB_CONFIG_MCUBOOT_WIFI_PATCHES_IMAGE_NUMBER} y)
199+ math (EXPR nrf70_patches_slot_primary "${nrf70_patches_slot_primary} + 1" )
200+ math (EXPR nrf70_patches_slot_secondary "${nrf70_patches_slot_secondary} + 1" )
189201
190202 list (APPEND generate_script_app_params
191203 "nrf70.binimage_index=${SB_CONFIG_MCUBOOT_WIFI_PATCHES_IMAGE_NUMBER} "
0 commit comments