Skip to content

Conversation

@jmartinez-silabs
Copy link
Member

Summary

The Cluster Revision should not be set by a Zap config. It shall follow the spec changes and xml updates we do, based on the spec/alchemy results.

This PR is one of a series I'll complete over the next couple of days.
What is done :
Set the Cluster Revision attribute of the Identify cluster to always be external by listing the attribute in

- src/app/zap-templates/zcl/zcl-with-test-extensions.json
- src/app/zap-templates/zcl/zcl.json

Implement the Read handler for the Cluster Revision Attribute in
src/app/clusters/identify-server/identify-server.cpp
Use the generated constant Identify::kRevision, from clusters/Identify/Metadata.h, as the ClusterRevision value to be encoded.

The Identify.xml was out of sync with the spec by 1 revision. Changes are small so I integrated it in this pr.
Commit 2 Updates src/app/zap-templates/zcl/data-model/chip/identify-cluster.xml using alchemy
alchemy zap --sdkRoot=./connectedhomeip --specRoot=./connectedhomeip-spec './connectedhomeip-spec/src/app_clusters/Identify.adoc'

Finally, in a separate commit. I ran ./scripts/tools/zap_regen_all.py to update all .zap and .matter files as the attribute changes from RAM to External

Related issues

n/a

Testing

Build and commission the SIlabs Lighting-app. Use chip-tool to read the ClusterRevision of the Identify cluster.

[1759770260.905] [107892:107894] [TOO] Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_FFFD DataVersion: 216795879
[1759770260.905] [107892:107894] [TOO]   ClusterRevision: 6

Readability checklist

commit 1 is my manual changes
commit 2 is alchemy generation changes
commit 3 is zap regen changes

@jmartinez-silabs jmartinez-silabs marked this pull request as ready for review October 6, 2025 17:37
@jmartinez-silabs jmartinez-silabs requested review from a team as code owners October 6, 2025 17:37
Copilot AI review requested due to automatic review settings October 6, 2025 17:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements external cluster revision handling for the Identify cluster to align with specification changes. The revision is updated from 5 to 6 and the implementation moves from RAM storage to external read handlers.

  • Makes the Identify cluster's ClusterRevision attribute external and implements read handler using generated constants
  • Updates the cluster XML to sync with spec revision 6 using alchemy
  • Regenerates all .zap and .matter files to reflect the external attribute configuration

Reviewed Changes

Copilot reviewed 126 out of 126 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/app/zap-templates/zcl/zcl.json Adds Identify cluster to external attributes list
src/app/zap-templates/zcl/zcl-with-test-extensions.json Adds Identify cluster to external attributes list
src/app/zap-templates/zcl/data-model/chip/identify-cluster.xml Updates cluster revision from 5 to 6 and other spec alignment changes
src/app/clusters/identify-server/identify-server.h Adds IdentifyAttrAccess class declaration for external attribute handling
src/app/clusters/identify-server/identify-server.cpp Implements read handler for ClusterRevision attribute using Identify::kRevision constant
zzz_generated/app-common/clusters/Identify/Metadata.h Updates revision constant from 5 to 6
zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h Removes ClusterRevision accessor declarations
zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp Removes ClusterRevision accessor implementations
scripts/tools/zap/tests/outputs/.../endpoint_config.h Updates attribute configuration to external storage
examples/.../...matter Updates cluster revision from 5 to 6 and changes from ram to callback attributes
Comments suppressed due to low confidence (1)

@github-actions
Copy link

github-actions bot commented Oct 6, 2025

PR #41287: Size comparison from b0f2fa3 to 75f1bb3

Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section b0f2fa3 75f1bb3 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1105078 1105374 296 0.0
RAM 178738 178754 16 0.0
bl702 lighting-app bl702+eth FLASH 659582 659874 292 0.0
RAM 134801 134817 16 0.0
bl702+wifi FLASH 835650 835942 292 0.0
RAM 124285 124301 16 0.0
bl706+mfd+rpc+littlefs FLASH 1068794 1069086 292 0.0
RAM 117117 117133 16 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 899020 899312 292 0.0
RAM 105460 105476 16 0.0
lighting-app bl702l+mfd+littlefs FLASH 981812 981848 36 0.0
RAM 109612 109628 16 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 769208 769412 204 0.0
RAM 103184 103200 16 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 780868 781064 196 0.0
RAM 108352 108360 8 0.0
pump-app LP_EM_CC1354P10_6 FLASH 726840 727044 204 0.0
RAM 97252 97268 16 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 711316 711504 188 0.0
RAM 97468 97484 16 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 553942 554146 204 0.0
RAM 204968 204976 8 0.0
lock CC3235SF_LAUNCHXL FLASH 586674 586878 204 0.0
RAM 205200 205216 16 0.0
efr32 lock-app BRD4187C FLASH 961000 961160 160 0.0
RAM 126220 126224 4 0.0
BRD4338a FLASH 756832 757064 232 0.0
RAM 255520 255540 20 0.0
window-app BRD4187C FLASH 1055236 1055460 224 0.0
RAM 122416 122420 4 0.0
esp32 all-clusters-app c3devkit DRAM 103024 103032 8 0.0
FLASH 1788902 1789084 182 0.0
IRAM 83862 83862 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 928944 929128 184 0.0
RAM 160991 160999 8 0.0
nxp contact mcxw71+release FLASH 691552 691792 240 0.0
RAM 61424 61440 16 0.0
lighting mcxw71+release FLASH 723104 723344 240 0.0
RAM 68076 68092 16 0.0
lock mcxw71+release FLASH 770344 770584 240 0.0
RAM 61788 61804 16 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1670812 1671044 232 0.0
RAM 213060 213068 8 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1589252 1589484 232 0.0
RAM 210324 210340 16 0.0
light cy8ckit_062s2_43012 FLASH 1456116 1456348 232 0.0
RAM 197040 197056 16 0.0
lock cy8ckit_062s2_43012 FLASH 1488412 1488644 232 0.0
RAM 224760 224776 16 0.0
qpg lighting-app qpg6200+debug FLASH 835216 835392 176 0.0
RAM 127592 127612 20 0.0
lock-app qpg6200+debug FLASH 771972 772156 184 0.0
RAM 118552 118572 20 0.0
realtek light-switch-app rtl8777g FLASH 705184 705376 192 0.0
RAM 106756 106776 20 0.0
lighting-app rtl8777g FLASH 756376 756568 192 0.0
RAM 127120 127132 12 0.0
stm32 light STM32WB5MM-DK FLASH 468884 469060 176 0.0
RAM 141192 141200 8 0.0
telink bridge-app tl7218x FLASH 708284 708446 162 0.0
RAM 90340 90356 16 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 795816 795978 162 0.0
RAM 40896 40908 12 0.0
light-app-ota-shell-factory-data tl7218x FLASH 787012 787174 162 0.0
RAM 93540 93552 12 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 713818 713980 162 0.0
RAM 51712 51724 12 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 747122 747284 162 0.0
RAM 70760 70772 12 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 723974 724136 162 0.0
RAM 34460 34472 12 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 601240 601402 162 0.0
RAM 108588 108600 12 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 819632 819798 166 0.0
RAM 91936 91948 12 0.0

@andy31415
Copy link
Contributor

This is probably completely superseeded by #41232 . However it also is probably low risk and shows that doing the right thing adds a flash overhead by itself.

I guess merge will not be too bad and then we see overhead of code driven compared to AAI on the other PR ... so we can merge this one.

@codecov
Copy link

codecov bot commented Oct 6, 2025

Codecov Report

❌ Patch coverage is 28.57143% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.97%. Comparing base (cfa7f13) to head (7ad735e).
⚠️ Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
...c/app/clusters/identify-server/identify-server.cpp 28.57% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #41287      +/-   ##
==========================================
+ Coverage   50.96%   50.97%   +0.01%     
==========================================
  Files        1378     1378              
  Lines      100597   100610      +13     
  Branches    13023    13018       -5     
==========================================
+ Hits        51267    51284      +17     
+ Misses      49330    49326       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jmartinez-silabs jmartinez-silabs force-pushed the identity_cluster_revision branch from 74ceb39 to 6ec64bd Compare October 7, 2025 01:44
@github-actions
Copy link

github-actions bot commented Oct 7, 2025

PR #41287: Size comparison from 42525d0 to 6ec64bd

Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section 42525d0 6ec64bd change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1105078 1105374 296 0.0
RAM 178738 178754 16 0.0
bl702 lighting-app bl702+eth FLASH 659582 659874 292 0.0
RAM 134801 134817 16 0.0
bl702+wifi FLASH 835650 835942 292 0.0
RAM 124285 124301 16 0.0
bl706+mfd+rpc+littlefs FLASH 1068794 1069086 292 0.0
RAM 117117 117133 16 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 899020 899312 292 0.0
RAM 105460 105476 16 0.0
lighting-app bl702l+mfd+littlefs FLASH 981812 981848 36 0.0
RAM 109612 109628 16 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 769208 769412 204 0.0
RAM 103184 103200 16 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 780868 781064 196 0.0
RAM 108352 108360 8 0.0
pump-app LP_EM_CC1354P10_6 FLASH 726840 727044 204 0.0
RAM 97252 97268 16 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 711316 711504 188 0.0
RAM 97468 97484 16 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 553942 554146 204 0.0
RAM 204968 204976 8 0.0
lock CC3235SF_LAUNCHXL FLASH 586674 586878 204 0.0
RAM 205200 205216 16 0.0
efr32 lock-app BRD4187C FLASH 961000 961160 160 0.0
RAM 126220 126224 4 0.0
BRD4338a FLASH 756768 757000 232 0.0
RAM 255520 255540 20 0.0
window-app BRD4187C FLASH 1055236 1055460 224 0.0
RAM 122416 122420 4 0.0
esp32 all-clusters-app c3devkit DRAM 103024 103032 8 0.0
FLASH 1788902 1789084 182 0.0
IRAM 83862 83862 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 928944 929128 184 0.0
RAM 160991 160999 8 0.0
nxp contact mcxw71+release FLASH 691552 691792 240 0.0
RAM 61424 61440 16 0.0
lighting mcxw71+release FLASH 723104 723344 240 0.0
RAM 68076 68092 16 0.0
lock mcxw71+release FLASH 770344 770584 240 0.0
RAM 61788 61804 16 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1670812 1671044 232 0.0
RAM 213060 213068 8 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1589252 1589484 232 0.0
RAM 210324 210340 16 0.0
light cy8ckit_062s2_43012 FLASH 1456116 1456348 232 0.0
RAM 197040 197056 16 0.0
lock cy8ckit_062s2_43012 FLASH 1488412 1488644 232 0.0
RAM 224760 224776 16 0.0
qpg lighting-app qpg6200+debug FLASH 835216 835392 176 0.0
RAM 127592 127612 20 0.0
lock-app qpg6200+debug FLASH 771972 772156 184 0.0
RAM 118552 118572 20 0.0
realtek light-switch-app rtl8777g FLASH 705184 705376 192 0.0
RAM 106756 106776 20 0.0
lighting-app rtl8777g FLASH 756376 756568 192 0.0
RAM 127120 127132 12 0.0
stm32 light STM32WB5MM-DK FLASH 468884 469060 176 0.0
RAM 141192 141200 8 0.0
telink bridge-app tl7218x FLASH 708284 708446 162 0.0
RAM 90340 90356 16 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 795816 795978 162 0.0
RAM 40896 40908 12 0.0
light-app-ota-shell-factory-data tl7218x FLASH 787012 787174 162 0.0
RAM 93540 93552 12 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 713818 713980 162 0.0
RAM 51712 51724 12 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 747122 747284 162 0.0
RAM 70760 70772 12 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 723974 724136 162 0.0
RAM 34460 34472 12 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 601240 601402 162 0.0
RAM 108588 108600 12 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 819632 819798 166 0.0
RAM 91936 91948 12 0.0

@mergify mergify bot removed the conflict label Oct 8, 2025
@github-actions
Copy link

github-actions bot commented Oct 8, 2025

PR #41287: Size comparison from cfa7f13 to 7ad735e

Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section cfa7f13 7ad735e change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1105094 1105382 288 0.0
RAM 178738 178754 16 0.0
bl702 lighting-app bl702+eth FLASH 659594 659886 292 0.0
RAM 134801 134817 16 0.0
bl702+wifi FLASH 835662 835954 292 0.0
RAM 124285 124301 16 0.0
bl706+mfd+rpc+littlefs FLASH 1068806 1069098 292 0.0
RAM 117117 117133 16 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 899020 899312 292 0.0
RAM 105460 105476 16 0.0
lighting-app bl702l+mfd+littlefs FLASH 981824 981860 36 0.0
RAM 109612 109628 16 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 769224 769420 196 0.0
RAM 103184 103200 16 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 780868 781048 180 0.0
RAM 108344 108360 16 0.0
pump-app LP_EM_CC1354P10_6 FLASH 726856 727052 196 0.0
RAM 97252 97268 16 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 711316 711504 188 0.0
RAM 97468 97484 16 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 553942 554146 204 0.0
RAM 204968 204976 8 0.0
lock CC3235SF_LAUNCHXL FLASH 586674 586862 188 0.0
RAM 205200 205208 8 0.0
efr32 lock-app BRD4187C FLASH 960968 961160 192 0.0
RAM 126220 126224 4 0.0
BRD4338a FLASH 755664 755888 224 0.0
RAM 255480 255500 20 0.0
window-app BRD4187C FLASH 1055268 1055500 232 0.0
RAM 122416 122420 4 0.0
esp32 all-clusters-app c3devkit DRAM 103008 103016 8 0.0
FLASH 1789070 1789256 186 0.0
IRAM 83862 83862 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 928944 929132 188 0.0
RAM 160979 160987 8 0.0
nxp contact mcxw71+release FLASH 691552 691792 240 0.0
RAM 61424 61440 16 0.0
lighting mcxw71+release FLASH 723120 723360 240 0.0
RAM 68076 68092 16 0.0
lock mcxw71+release FLASH 770344 770584 240 0.0
RAM 61788 61804 16 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1670868 1671100 232 0.0
RAM 213044 213052 8 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1589292 1589540 248 0.0
RAM 210316 210332 16 0.0
light cy8ckit_062s2_43012 FLASH 1456124 1456356 232 0.0
RAM 197040 197056 16 0.0
lock cy8ckit_062s2_43012 FLASH 1488452 1488684 232 0.0
RAM 224752 224768 16 0.0
qpg lighting-app qpg6200+debug FLASH 835208 835392 184 0.0
RAM 127592 127604 12 0.0
lock-app qpg6200+debug FLASH 771956 772156 200 0.0
RAM 118552 118572 20 0.0
realtek light-switch-app rtl8777g FLASH 705184 705376 192 0.0
RAM 106756 106776 20 0.0
lighting-app rtl8777g FLASH 756392 756576 184 0.0
RAM 127120 127132 12 0.0
stm32 light STM32WB5MM-DK FLASH 468892 469076 184 0.0
RAM 141192 141200 8 0.0
telink bridge-app tl7218x FLASH 708284 708446 162 0.0
RAM 90340 90356 16 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 795816 795978 162 0.0
RAM 40896 40908 12 0.0
light-app-ota-shell-factory-data tl7218x FLASH 787012 787174 162 0.0
RAM 93540 93552 12 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 713818 713980 162 0.0
RAM 51712 51724 12 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 747122 747284 162 0.0
RAM 70760 70772 12 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 723974 724136 162 0.0
RAM 34460 34472 12 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 601240 601402 162 0.0
RAM 108588 108600 12 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 819632 819798 166 0.0
RAM 91936 91948 12 0.0

@mergify mergify bot merged commit b4b4e6a into project-chip:master Oct 9, 2025
75 of 76 checks passed
@jmartinez-silabs jmartinez-silabs deleted the identity_cluster_revision branch October 9, 2025 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants