Skip to content

Commit 99b9896

Browse files
committed
[nrf noup] subsys: Correctly identify active radio slot
In case of Direct XIP and multiple images, the radio active slot changes accordingly. Signed-off-by: Tomasz Chyrowicz <[email protected]>
1 parent eb227d8 commit 99b9896

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,9 @@ int img_mgmt_active_slot(int image)
236236
#if CONFIG_MCUMGR_GRP_IMG_UPDATABLE_IMAGE_NUMBER > 1
237237
slot = (image << 1);
238238

239-
#if CONFIG_MCUMGR_GRP_IMG_QSPI_XIP_SPLIT_IMAGE
239+
#if defined(CONFIG_MCUMGR_GRP_IMG_QSPI_XIP_SPLIT_IMAGE) || \
240+
defined(CONFIG_MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP) || \
241+
defined(CONFIG_MCUBOOT_BOOTLOADER_MODE_DIRECT_XIP_WITH_REVERT)
240242
if (FIXED_PARTITION_IS_RUNNING_APP_PARTITION(slot1_partition)) {
241243
slot += 1;
242244
}

0 commit comments

Comments
 (0)