File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
subsys/mgmt/mcumgr/grp/img_mgmt Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -237,6 +237,14 @@ config MCUMGR_GRP_IMG_SLOT_INFO_HOOKS
237237 This will enable the slot info function hooks which can be used to add additional
238238 information to responses.
239239
240+ config MCUMGR_GRP_IMG_QSPI_XIP_SPLIT_IMAGE
241+ bool "QSPI XIP Split image mode"
242+ depends on MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP
243+ help
244+ This option should not be selected by users and should automatically be selected by
245+ sysbuild if needed. This enables selecting the correct slot when running a QSPI XIP
246+ split image application in DirectXIP mode.
247+
240248module = MCUMGR_GRP_IMG
241249module-str = mcumgr_grp_img
242250source "subsys/logging/Kconfig.template.log_config"
Original file line number Diff line number Diff line change @@ -218,6 +218,14 @@ int img_mgmt_active_slot(int image)
218218 /* Multi image does not support DirectXIP or RAM load currently */
219219#if CONFIG_MCUMGR_GRP_IMG_UPDATABLE_IMAGE_NUMBER > 1
220220 slot = (image << 1 );
221+
222+ #if defined(CONFIG_MCUMGR_GRP_IMG_QSPI_XIP_SPLIT_IMAGE ) || \
223+ defined(CONFIG_MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP ) || \
224+ defined(CONFIG_MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP_WITH_REVERT )
225+ if (FIXED_PARTITION_IS_RUNNING_APP_PARTITION (slot1_partition )) {
226+ slot += 1 ;
227+ }
228+ #endif
221229#elif defined(CONFIG_MCUBOOT_BOOTLOADER_MODE_RAM_LOAD )
222230 /* RAM load requires querying bootloader */
223231 int rc ;
You can’t perform that action at this time.
0 commit comments