-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[app] Allow to define external clusters in chip_data_model.* #27886
Conversation
zap_cluster_list.py raises an error when the ZAP file enables a cluster that is not implemented in the SDK. This forces users to patch the SDK in order to use custom, vendor-specific clusters. Add EXTERNAL_CLUSTERS argument to chip_configure_data_model() CMake function that takes a list of external cluster names for which the default implementation should not included nor required. Usage example: chip_configure_data_model(app INCLUDE_SERVER ZAP_FILE lock-app.zap EXTERNAL_CLUSTERS BASIC_INFORMATION_CLUSTER MY_CUSTOM_CLUSTER ) Replace the existing zap_clusters_with_custom_implementation argument of chip_data_model() GN template with new one: external_clusters. The previous argument took a list of cluster implementation directories to be skipped, so it was only useful for bypassing the default implementations, but could not be used for custom, vendor-specific clusters. The new argument addresses both scenarios. Usage example: chip_data_model("lock-common") { zap_file = "lock-app.zap" ... external_clusters = [ "BASIC_INFORMATION_CLUSTER", "MY_CUSTOM_CLUSTER", ] }
PR #27886: Size comparison from aaa2542 to f5dd895 Increases (13 builds for bl602, bl702, bl702l, psoc6, qpg, telink)
Decreases (12 builds for bl602, cc32xx, cyw30739, esp32, psoc6, telink)
Full report (58 builds for bl602, bl702, bl702l, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
I'm not sure without trying (which will take a moment). Does your change also allow for overriding existing standard cluster implementations? That's not exactly the same thing as allowing extra custom clusters, but that's what led to #22042, telling the SDK not to include specific cluster implementations, so these can be re-implemented outside of the SDK. |
Yes, the new argument addresses both scenarios you mentioned. So the difference for you will be that instead of configuring:
you will have to write the following:
The previous approach assumed that |
@Damian-Nordic: Thanks for the explanation. In the meantime I managed to successfully rebuild my target (p44mbrd bridge) having custom level-control, color-control and identity servers with the PR applied, with less complications than expected, works fine :-) So: I'm fully OK with the change! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is great!
zap_cluster_list.py raises an error when the ZAP file enables a cluster that is not implemented in the SDK. This forces users to patch the SDK in order to use custom, vendor-specific clusters.
Add EXTERNAL_CLUSTERS argument to chip_configure_data_model() CMake function that takes a list of external cluster names for which the default implementation should not included nor required.
Usage example:
Replace the existing zap_clusters_with_custom_implementation argument of chip_data_model() GN template with new one: external_clusters. The previous argument took a list of cluster implementation directories to be skipped, so it was only useful for bypassing the default implementations, but could not be used for custom, vendor-specific clusters. The new argument addresses both scenarios.
Usage example: