From 3eb687c87d7e6ccaa16a05c02d9c16892ba00195 Mon Sep 17 00:00:00 2001 From: Adrian Gielniewski Date: Wed, 19 Feb 2025 11:11:47 +0100 Subject: [PATCH 1/2] Fix ICD management server cluster dependecies Add ICDConfigurationData to app sources when ICD management server cluster is included in sample, but ICD support is disabled, e.g. lock-app on some platforms. Related to: #32321 Signed-off-by: Adrian Gielniewski --- src/app/chip_data_model.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/app/chip_data_model.cmake b/src/app/chip_data_model.cmake index b05fccc1cb1c01..bf802331723b54 100644 --- a/src/app/chip_data_model.cmake +++ b/src/app/chip_data_model.cmake @@ -24,6 +24,15 @@ include("${CHIP_ROOT}/src/data-model-providers/codegen/model.cmake") function(chip_configure_cluster APP_TARGET CLUSTER) file(GLOB CLUSTER_SOURCES "${CHIP_APP_BASE_DIR}/clusters/${CLUSTER}/*.cpp") target_sources(${APP_TARGET} PRIVATE ${CLUSTER_SOURCES}) + + # Add clusters dependencies + if (CLUSTER STREQUAL "icd-management-server") + # Add ICDConfigurationData when ICD management server cluster is included, + # but ICD support is disabled, e.g. lock-app on some platforms + if(NOT CONFIG_CHIP_ENABLE_ICD_SUPPORT) + target_sources(${APP_TARGET} PRIVATE ${CHIP_APP_BASE_DIR}/icd/server/ICDConfigurationData.cpp) + endif() + endif() endfunction() # From b877df05edfb07356ec9b58da2436e39ee4d7aa9 Mon Sep 17 00:00:00 2001 From: Adrian Gielniewski Date: Wed, 19 Feb 2025 11:40:31 +0100 Subject: [PATCH 2/2] Add TODO comments for #32321 Add TODO comments for issue related to ICD management server. Signed-off-by: Adrian Gielniewski --- src/app/chip_data_model.cmake | 1 + src/app/clusters/icd-management-server/icd-management-server.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/app/chip_data_model.cmake b/src/app/chip_data_model.cmake index bf802331723b54..d48c4c43f5db95 100644 --- a/src/app/chip_data_model.cmake +++ b/src/app/chip_data_model.cmake @@ -27,6 +27,7 @@ function(chip_configure_cluster APP_TARGET CLUSTER) # Add clusters dependencies if (CLUSTER STREQUAL "icd-management-server") + # TODO(#32321): Remove after issue is resolved # Add ICDConfigurationData when ICD management server cluster is included, # but ICD support is disabled, e.g. lock-app on some platforms if(NOT CONFIG_CHIP_ENABLE_ICD_SUPPORT) diff --git a/src/app/clusters/icd-management-server/icd-management-server.cpp b/src/app/clusters/icd-management-server/icd-management-server.cpp index cec4fbd54859ec..f99da627f1caf0 100644 --- a/src/app/clusters/icd-management-server/icd-management-server.cpp +++ b/src/app/clusters/icd-management-server/icd-management-server.cpp @@ -466,6 +466,7 @@ bool emberAfIcdManagementClusterUnregisterClientCallback(CommandHandler * comman bool emberAfIcdManagementClusterStayActiveRequestCallback(CommandHandler * commandObj, const ConcreteCommandPath & commandPath, const Commands::StayActiveRequest::DecodableType & commandData) { +// TODO(#32321): Remove #if after issue is resolved // Note: We only need this #if statement for platform examples that enable the ICD management server without building the sample // as an ICD. Since this is not spec compliant, we should remove this #if statement once we stop compiling the ICD management // server in those examples.