Skip to content
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

Update Infineon CYW30739 TE8 fixes. #18733

Merged
merged 9 commits into from
Jun 1, 2022

Conversation

hsusid
Copy link
Contributor

@hsusid hsusid commented May 23, 2022

Problem

  • The platform CYW30739 needs updates to support TE8.

Change overview

  • DoFactoryReset would clear the key-value storage.
  • Enable OTA requestor for CYW30739 apps.
  • Refine the flash layout for the OTA functions.
  • Disable loggings for lighting and lock app.
  • Reuse Matter heap APIs for CYW30739 OpenThread implementation.
  • Enable MBEDTLS_CCM_ALT, MBEDTLS_AES_ALT, and MBEDTLS_SHA256_ALT.
  • Group keys into factory keys and config keys.
  • Fix CYW30739Config write methods.
  • Correct the storage entry count for additional keys.
  • Add and process OTA image header for CYW30739.
  • Implement network-interfaces and reboot-count.
  • Fix currentLevel value mismatch.
  • Implement PICS_MANUAL_OCCUPANCY_CHANGE.
  • Instantiate identify object for lighting app.
  • Implement IsFirstImageRun and ConfirmCurrentImage methods of OTAImageProcessorImpl.
  • Compress large "Data" entries in DS.
  • Change CHIP_CONFIG_MAX_FABRICS to 5 from 4.
  • Add a debug arg for CYW30739 SDK.
  • Implement SupportedCalendarTypes and SupportedLocales.
  • Implement Door lock cluster.

Testing

  • TE8 test cases.

@hsusid hsusid requested a review from andy31415 May 25, 2022 04:31
@hsusid hsusid force-pushed the matter-te8-updates branch from 27d892a to 367d01d Compare May 30, 2022 13:03
@hsusid
Copy link
Contributor Author

hsusid commented May 30, 2022

rebase

@github-actions
Copy link

github-actions bot commented May 30, 2022

PR #18733: Size comparison from 4d84a4a to 367d01d

Increases above 0.2%:

platform target config section 4d84a4a 367d01d change % change
cyw30739 light cyw930739m2evb_01 .bss 79136 83984 4848 6.1
.data 704 740 36 5.1
.text 0 112 112 inf
lock cyw930739m2evb_01 .bss 77696 84144 6448 8.3
.data 672 708 36 5.4
.text 0 112 112 inf
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 570838 596138 25300 4.4
.data 612 616 4 0.7
Increases (3 builds for cyw30739)
platform target config section 4d84a4a 367d01d change % change
cyw30739 light cyw930739m2evb_01 .bss 79136 83984 4848 6.1
.data 704 740 36 5.1
.text 0 112 112 inf
lock cyw930739m2evb_01 .bss 77696 84144 6448 8.3
.data 672 708 36 5.4
.text 0 112 112 inf
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 570838 596138 25300 4.4
.data 612 616 4 0.7
Decreases (3 builds for cyw30739)
platform target config section 4d84a4a 367d01d change % change
cyw30739 light cyw930739m2evb_01 (read/write) 621506 601426 -20080 -3.2
.app_xip_area 525012 460388 -64624 -12.3
lock cyw930739m2evb_01 (read/write) 630214 597590 -32624 -5.2
.app_xip_area 535192 456424 -78768 -14.7
ota-requestor-no-progress-logging cyw930739m2evb_01 .app_xip_area 465896 456088 -9808 -2.1
.bss 87296 83116 -4180 -4.8
Full report (30 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section 4d84a4a 367d01d change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 647575 647575 0 0.0
(read/write) 158928 158928 0 0.0
.bss 74612 74612 0 0.0
.data 3400 3400 0 0.0
.rodata 84159 84159 0 0.0
.text 563180 563180 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 613591 613591 0 0.0
(read/write) 158156 158156 0 0.0
.bss 73900 73900 0 0.0
.data 3340 3340 0 0.0
.rodata 73471 73471 0 0.0
.text 539884 539884 0 0.0
lock-ftd LP_CC2652R7 (read only) 679559 679559 0 0.0
(read/write) 163296 163296 0 0.0
.bss 72636 72636 0 0.0
.data 3264 3264 0 0.0
.rodata 96135 96135 0 0.0
.text 582940 582940 0 0.0
lock-mtd LP_CC2652R7 (read only) 628967 628967 0 0.0
(read/write) 145752 145752 0 0.0
.bss 68372 68372 0 0.0
.data 3264 3264 0 0.0
.rodata 96015 96015 0 0.0
.text 532460 532460 0 0.0
pump-app LP_CC2652R7 (read only) 675971 675971 0 0.0
(read/write) 168052 168052 0 0.0
.bss 73036 73036 0 0.0
.data 3300 3300 0 0.0
.rodata 88611 88611 0 0.0
.text 586876 586876 0 0.0
pump-controller-app LP_CC2652R7 (read only) 653907 653907 0 0.0
(read/write) 189972 189972 0 0.0
.bss 72892 72892 0 0.0
.data 3260 3260 0 0.0
.rodata 83347 83347 0 0.0
.text 570080 570080 0 0.0
shell LP_CC2652R7 (read only) 640606 640606 0 0.0
(read/write) 154484 154484 0 0.0
.bss 76964 76964 0 0.0
.data 3404 3404 0 0.0
.rodata 81142 81142 0 0.0
.text 559232 559232 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 621506 601426 -20080 -3.2
.app_xip_area 525012 460388 -64624 -12.3
.bss 79136 83984 4848 6.1
.data 704 740 36 5.1
.rodata 0 0 0 0.0
.text 0 112 112 inf
lock cyw930739m2evb_01 (read/write) 630214 597590 -32624 -5.2
.app_xip_area 535192 456424 -78768 -14.7
.bss 77696 84144 6448 8.3
.data 672 708 36 5.4
.rodata 0 0 0 0.0
.text 0 112 112 inf
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 570838 596138 25300 4.4
.app_xip_area 465896 456088 -9808 -2.1
.bss 87296 83116 -4180 -4.8
.data 612 616 4 0.7
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 914272 914272 0 0.0
(read/write) 133216 133216 0 0.0
.bss 131120 131120 0 0.0
.data 2092 2092 0 0.0
.text 914264 914264 0 0.0
BRD4161A+rpc (read only) 948508 948508 0 0.0
(read/write) 149904 149904 0 0.0
.bss 147608 147608 0 0.0
.data 2296 2296 0 0.0
.text 948500 948500 0 0.0
BRD4161A+rs911x (read only) 788836 788836 0 0.0
(read/write) 129488 129488 0 0.0
.bss 127388 127388 0 0.0
.data 2100 2100 0 0.0
.text 788828 788828 0 0.0
lock-app BRD4161A+wf200 (read only) 954064 954064 0 0.0
(read/write) 128268 128268 0 0.0
.bss 126204 126204 0 0.0
.data 2064 2064 0 0.0
.text 954056 954056 0 0.0
window-app BRD4161A (read only) 899216 899216 0 0.0
(read/write) 133280 133280 0 0.0
.bss 131192 131192 0 0.0
.data 2088 2088 0 0.0
.text 899208 899208 0 0.0
esp32 all-clusters-app c3devkit (read only) 1004814 1004814 0 0.0
(read/write) 1479522 1479522 0 0.0
.dram0.bss 69176 69176 0 0.0
.dram0.data 14648 14648 0 0.0
.flash.rodata 210256 210256 0 0.0
.flash.text 1004814 1004814 0 0.0
.iram0.text 62954 62954 0 0.0
m5stack (read only) 1059995 1059995 0 0.0
(read/write) 481744 481744 0 0.0
.dram0.bss 74696 74696 0 0.0
.dram0.data 34208 34208 0 0.0
.flash.rodata 240844 240844 0 0.0
.flash.text 1054611 1054611 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 680676 680676 0 0.0
.bss 80200 80200 0 0.0
.data 2008 2008 0 0.0
.text 596764 596764 0 0.0
lock k32w061+release (read/write) 732092 732092 0 0.0
.bss 80632 80632 0 0.0
.data 1976 1976 0 0.0
.text 647780 647780 0 0.0
linux chip-tool-no-interactive-ipv6only arm64 (read only) 9422028 9422028 0 0.0
(read/write) 668785 668785 0 0.0
.bss 42257 42257 0 0.0
.data 1176 1176 0 0.0
.data.rel.ro 606528 606528 0 0.0
.dynamic 528 528 0 0.0
.got 15016 15016 0 0.0
.init 24 24 0 0.0
.init_array 184 184 0 0.0
.rodata 459956 459956 0 0.0
.text 7434004 7434004 0 0.0
thermostat-no-ble arm64 (read only) 2365900 2365900 0 0.0
(read/write) 177313 177313 0 0.0
.bss 87969 87969 0 0.0
.data 1520 1520 0 0.0
.data.rel.ro 80016 80016 0 0.0
.dynamic 528 528 0 0.0
.got 4800 4800 0 0.0
.init 24 24 0 0.0
.init_array 376 376 0 0.0
.rodata 148156 148156 0 0.0
.text 1988624 1988624 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2424480 2424480 0 0.0
.bss 202652 202652 0 0.0
.data 5872 5872 0 0.0
.text 1387124 1387124 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1185703 1185703 0 0.0
bss 139308 139308 0 0.0
rodata 153488 153488 0 0.0
text 814036 814036 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1133579 1133579 0 0.0
bss 138600 138600 0 0.0
rodata 129972 129972 0 0.0
text 786264 786264 0 0.0
p6 all-clusters-app default (read/write) 2539952 2539952 0 0.0
.bss 137136 137136 0 0.0
.data 2800 2800 0 0.0
.text 1498216 1498216 0 0.0
all-clusters-minimal-app default (read/write) 2484712 2484712 0 0.0
.bss 136424 136424 0 0.0
.data 2744 2744 0 0.0
.text 1442976 1442976 0 0.0
light-app default (read/write) 2420192 2420192 0 0.0
.bss 129464 129464 0 0.0
.data 2600 2600 0 0.0
.text 1378456 1378456 0 0.0
lock-app default (read/write) 2438216 2438216 0 0.0
.bss 129280 129280 0 0.0
.data 2568 2568 0 0.0
.text 1396480 1396480 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 779464 779464 0 0.0
bss 70596 70596 0 0.0
noinit 40416 40416 0 0.0
text 551326 551326 0 0.0
lighting-app tlsr9518adk80d (read/write) 799492 799492 0 0.0
bss 70856 70856 0 0.0
noinit 40416 40416 0 0.0
text 568060 568060 0 0.0

@andy31415
Copy link
Contributor

/rebase

hsusid added 9 commits June 1, 2022 00:19
* DoFactoryReset would clear the key-value storage.
* Enable OTA requestor for CYW30739 apps.
* Refine the flash layout for the OTA functions.
* Disable loggings for lighting and lock app.
* Reuse Matter heap APIs for CYW30739 OpenThread implementation.
* Enable MBEDTLS_CCM_ALT, MBEDTLS_AES_ALT, and MBEDTLS_SHA256_ALT.
* Group keys into factory keys and config keys.
* Fix CYW30739Config write methods.
* Correct the storage entry count for additional keys.
* Add and process OTA image header for CYW30739.
* Implement network-interfaces and reboot-count.
* Fix currentLevel value mismatch.
* Implement PICS_MANUAL_OCCUPANCY_CHANGE.
* Instantiate identify object for lighting app.
* Implement IsFirstImageRun and ConfirmCurrentImage methods of OTAImageProcessorImpl.
* Compress large "Data" entries in DS.
* Change CHIP_CONFIG_MAX_FABRICS to 5 from 4.
* Add a debug arg for CYW30739 SDK.
* Implement SupportedCalendarTypes and SupportedLocales.
* Implement Door lock cluster.
@hsusid hsusid force-pushed the matter-te8-updates branch from 367d01d to 8e52733 Compare May 31, 2022 16:21
@hsusid
Copy link
Contributor Author

hsusid commented May 31, 2022

rebase again to see if CI would be fixed.

@github-actions
Copy link

github-actions bot commented May 31, 2022

PR #18733: Size comparison from a35c4c4 to 8e52733

Increases above 0.2%:

platform target config section a35c4c4 8e52733 change % change
cyw30739 light cyw930739m2evb_01 .bss 79064 83912 4848 6.1
.data 708 744 36 5.1
.text 0 112 112 inf
lock cyw930739m2evb_01 .bss 77624 84072 6448 8.3
.data 676 712 36 5.3
.text 0 112 112 inf
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 571010 596286 25276 4.4
.data 616 620 4 0.6
Increases (3 builds for cyw30739)
platform target config section a35c4c4 8e52733 change % change
cyw30739 light cyw930739m2evb_01 .bss 79064 83912 4848 6.1
.data 708 744 36 5.1
.text 0 112 112 inf
lock cyw930739m2evb_01 .bss 77624 84072 6448 8.3
.data 676 712 36 5.3
.text 0 112 112 inf
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 571010 596286 25276 4.4
.data 616 620 4 0.6
Decreases (3 builds for cyw30739)
platform target config section a35c4c4 8e52733 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 621958 601710 -20248 -3.3
.app_xip_area 525536 460736 -64800 -12.3
lock cyw930739m2evb_01 (read/write) 630658 597858 -32800 -5.2
.app_xip_area 535708 456756 -78952 -14.7
ota-requestor-no-progress-logging cyw930739m2evb_01 .app_xip_area 466132 456308 -9824 -2.1
.bss 87224 83044 -4180 -4.8
Full report (30 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section a35c4c4 8e52733 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 648371 648371 0 0.0
(read/write) 158900 158900 0 0.0
.bss 74580 74580 0 0.0
.data 3404 3404 0 0.0
.rodata 84267 84267 0 0.0
.text 563868 563868 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 615211 615211 0 0.0
(read/write) 158072 158072 0 0.0
.bss 73812 73812 0 0.0
.data 3344 3344 0 0.0
.rodata 73659 73659 0 0.0
.text 541316 541316 0 0.0
lock-ftd LP_CC2652R7 (read only) 679915 679915 0 0.0
(read/write) 162908 162908 0 0.0
.bss 72604 72604 0 0.0
.data 3268 3268 0 0.0
.rodata 96211 96211 0 0.0
.text 583220 583220 0 0.0
lock-mtd LP_CC2652R7 (read only) 629331 629331 0 0.0
(read/write) 145724 145724 0 0.0
.bss 68340 68340 0 0.0
.data 3268 3268 0 0.0
.rodata 96099 96099 0 0.0
.text 532740 532740 0 0.0
pump-app LP_CC2652R7 (read only) 676351 676351 0 0.0
(read/write) 167640 167640 0 0.0
.bss 73004 73004 0 0.0
.data 3304 3304 0 0.0
.rodata 88687 88687 0 0.0
.text 587180 587180 0 0.0
pump-controller-app LP_CC2652R7 (read only) 654271 654271 0 0.0
(read/write) 189576 189576 0 0.0
.bss 72860 72860 0 0.0
.data 3264 3264 0 0.0
.rodata 83423 83423 0 0.0
.text 570368 570368 0 0.0
shell LP_CC2652R7 (read only) 641378 641378 0 0.0
(read/write) 154456 154456 0 0.0
.bss 76932 76932 0 0.0
.data 3408 3408 0 0.0
.rodata 81250 81250 0 0.0
.text 559896 559896 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 621958 601710 -20248 -3.3
.app_xip_area 525536 460736 -64800 -12.3
.bss 79064 83912 4848 6.1
.data 708 744 36 5.1
.rodata 0 0 0 0.0
.text 0 112 112 inf
lock cyw930739m2evb_01 (read/write) 630658 597858 -32800 -5.2
.app_xip_area 535708 456756 -78952 -14.7
.bss 77624 84072 6448 8.3
.data 676 712 36 5.3
.rodata 0 0 0 0.0
.text 0 112 112 inf
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 571010 596286 25276 4.4
.app_xip_area 466132 456308 -9824 -2.1
.bss 87224 83044 -4180 -4.8
.data 616 620 4 0.6
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 914900 914900 0 0.0
(read/write) 133184 133184 0 0.0
.bss 131088 131088 0 0.0
.data 2096 2096 0 0.0
.text 914892 914892 0 0.0
BRD4161A+rpc (read only) 949152 949152 0 0.0
(read/write) 149880 149880 0 0.0
.bss 147576 147576 0 0.0
.data 2300 2300 0 0.0
.text 949144 949144 0 0.0
BRD4161A+rs911x (read only) 789360 789360 0 0.0
(read/write) 129460 129460 0 0.0
.bss 127356 127356 0 0.0
.data 2104 2104 0 0.0
.text 789352 789352 0 0.0
lock-app BRD4161A+wf200 (read only) 954460 954460 0 0.0
(read/write) 128240 128240 0 0.0
.bss 126172 126172 0 0.0
.data 2068 2068 0 0.0
.text 954452 954452 0 0.0
window-app BRD4161A (read only) 899828 899828 0 0.0
(read/write) 133252 133252 0 0.0
.bss 131160 131160 0 0.0
.data 2092 2092 0 0.0
.text 899820 899820 0 0.0
esp32 all-clusters-app c3devkit (read only) 1005550 1005550 0 0.0
(read/write) 1479602 1479602 0 0.0
.dram0.bss 69144 69144 0 0.0
.dram0.data 14656 14656 0 0.0
.flash.rodata 210368 210368 0 0.0
.flash.text 1005550 1005550 0 0.0
.iram0.text 62954 62954 0 0.0
m5stack (read only) 1060719 1060719 0 0.0
(read/write) 481816 481816 0 0.0
.dram0.bss 74664 74664 0 0.0
.dram0.data 34208 34208 0 0.0
.flash.rodata 240948 240948 0 0.0
.flash.text 1055335 1055335 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 681124 681124 0 0.0
.bss 80168 80168 0 0.0
.data 2012 2012 0 0.0
.text 597240 597240 0 0.0
lock k32w061+release (read/write) 732612 732612 0 0.0
.bss 80600 80600 0 0.0
.data 1980 1980 0 0.0
.text 648328 648328 0 0.0
linux chip-tool-no-interactive-ipv6only arm64 (read only) 9415420 9415420 0 0.0
(read/write) 667105 667105 0 0.0
.bss 42257 42257 0 0.0
.data 1176 1176 0 0.0
.data.rel.ro 604872 604872 0 0.0
.dynamic 528 528 0 0.0
.got 14992 14992 0 0.0
.init 24 24 0 0.0
.init_array 184 184 0 0.0
.rodata 459972 459972 0 0.0
.text 7431124 7431124 0 0.0
thermostat-no-ble arm64 (read only) 2366756 2366756 0 0.0
(read/write) 177441 177441 0 0.0
.bss 87921 87921 0 0.0
.data 1528 1528 0 0.0
.data.rel.ro 80192 80192 0 0.0
.dynamic 528 528 0 0.0
.got 4792 4792 0 0.0
.init 24 24 0 0.0
.init_array 376 376 0 0.0
.rodata 148164 148164 0 0.0
.text 1988960 1988960 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2425016 2425016 0 0.0
.bss 202620 202620 0 0.0
.data 5872 5872 0 0.0
.text 1387660 1387660 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1186615 1186615 0 0.0
bss 139276 139276 0 0.0
rodata 153592 153592 0 0.0
text 814836 814836 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1135331 1135331 0 0.0
bss 138508 138508 0 0.0
rodata 130156 130156 0 0.0
text 787836 787836 0 0.0
p6 all-clusters-app default (read/write) 2540960 2540960 0 0.0
.bss 137104 137104 0 0.0
.data 2808 2808 0 0.0
.text 1499224 1499224 0 0.0
all-clusters-minimal-app default (read/write) 2486928 2486928 0 0.0
.bss 136328 136328 0 0.0
.data 2744 2744 0 0.0
.text 1445192 1445192 0 0.0
light-app default (read/write) 2420872 2420872 0 0.0
.bss 129432 129432 0 0.0
.data 2600 2600 0 0.0
.text 1379136 1379136 0 0.0
lock-app default (read/write) 2438912 2438912 0 0.0
.bss 129248 129248 0 0.0
.data 2568 2568 0 0.0
.text 1397176 1397176 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 779820 779820 0 0.0
bss 70564 70564 0 0.0
noinit 40416 40416 0 0.0
text 551624 551624 0 0.0
lighting-app tlsr9518adk80d (read/write) 799864 799864 0 0.0
bss 70824 70824 0 0.0
noinit 40416 40416 0 0.0
text 568366 568366 0 0.0

1 + /* For the admin key count */
CHIP_CONFIG_MAX_FABRICS + 1 /* For the session key count */
;
static constexpr uint8_t mMaxEntryCount = 1 + /* global event id counter */
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not accounting for the various unbounded things like CASE resumption storage, group storage, etc.... Followup?

@bzbarsky-apple bzbarsky-apple merged commit 131b13c into project-chip:master Jun 1, 2022
@hsusid hsusid deleted the matter-te8-updates branch June 2, 2022 09:31
@vringar vringar mentioned this pull request Jun 3, 2022
CodeChronos928 added a commit to CodeChronos928/connectedhomeip that referenced this pull request Jun 12, 2022
This reverts commit 131b13c.

git submodule fetch issues:

fatal: remote error: upload-pack: not our ref ab7601a74bdffc7374353c1e19b22388bb3dcedd
fatal: Fetched in submodule path 'third_party/cyw30739_sdk/repos/30739A0', but it did not contain ab7601a74bdffc7374353c1e19b22388bb3dcedd. Direct fetching of that commit failed.
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.

3 participants