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

We should call correct API for factory reset in CLI command #31505

Conversation

jadhavrohit924
Copy link
Contributor

We should call ScheduleFactoryReset() and not the InitiateFactoryReset() API for factory reset in CLI command

Copy link

github-actions bot commented Jan 18, 2024

PR #31505: Size comparison from 71a1ce3 to 740bb6f

Full report (8 builds for cc32xx, mbed, nrfconnect, qpg)
platform target config section 71a1ce3 740bb6f change % change
cc32xx air-purifier CC3235SF_LAUNCHXL (read only) 568138 568138 0 0.0
(read/write) 207744 207744 0 0.0
.bss 201028 201028 0 0.0
.data 1592 1592 0 0.0
.rodata 84034 84034 0 0.0
.text 481980 481980 0 0.0
lock CC3235SF_LAUNCHXL (read only) 621474 621474 0 0.0
(read/write) 208144 208144 0 0.0
.bss 201504 201504 0 0.0
.data 1520 1520 0 0.0
.rodata 105898 105898 0 0.0
.text 513452 513452 0 0.0
mbed lock-app-release cy8cproto_062_4343w (read only) 6224 6224 0 0.0
(read/write) 2527072 2527072 0 0.0
.bss 220240 220240 0 0.0
.data 5208 5208 0 0.0
.text 1489756 1489756 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1090540 1090540 0 0.0
bss 129560 129560 0 0.0
rodata 110220 110220 0 0.0
text 802936 802936 0 0.0
nrf7002dk_nrf5340_cpuapp (read only) 4 4 0 0.0
(read/write) 1212196 1212196 0 0.0
bss 121770 121770 0 0.0
rodata 140832 140832 0 0.0
text 799100 799100 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1041468 1041468 0 0.0
bss 129300 129300 0 0.0
rodata 98924 98924 0 0.0
text 765424 765424 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1118432 1118432 0 0.0
.bss 102064 102064 0 0.0
.data 808 808 0 0.0
.text 630812 630812 0 0.0
lock-app qpg6105+debug (read/write) 1082408 1082408 0 0.0
.bss 98360 98360 0 0.0
.data 852 852 0 0.0
.text 594784 594784 0 0.0

@jadhavrohit924 jadhavrohit924 force-pushed the bugfix/factoryreset-cli branch from 740bb6f to c0cae19 Compare January 18, 2024 10:09
Copy link

github-actions bot commented Jan 18, 2024

PR #31505: Size comparison from 71a1ce3 to c0cae19

Increases (8 builds for cyw30739, esp32, linux)
platform target config section 71a1ce3 c0cae19 change % change
cyw30739 light cyw930739m2evb_01 (read/write) 562335 562471 136 0.0
.app_xip_area 452489 452625 136 0.0
lock cyw930739m2evb_01 (read/write) 544439 544583 144 0.0
.app_xip_area 429857 430001 144 0.0
ota-requestor cyw930739m2evb_01 (read/write) 563247 563391 144 0.0
.app_xip_area 454857 455001 144 0.0
switch cyw930739m2evb_01 (read/write) 558903 559055 152 0.0
.app_xip_area 447281 447433 152 0.0
esp32 all-clusters-app m5stack (read only) 1235255 1235263 8 0.0
.flash.text 1229091 1229099 8 0.0
linux shell debug (read only) 2836289 2836833 544 0.0
.text 2479650 2480194 544 0.0
tv-app debug (read only) 5413713 5414257 544 0.0
.text 4902595 4903139 544 0.0
tv-casting-app debug (read only) 9827817 9828361 544 0.0
.text 8988659 8989203 544 0.0
Full report (52 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg)
platform target config section 71a1ce3 c0cae19 change % change
bl602 lighting-app bl602 (read/write) 1420342 1420342 0 0.0
.bss 85184 85184 0 0.0
.data 9488 9488 0 0.0
.rodata 157048 157048 0 0.0
.text 1087984 1087984 0 0.0
bl602+mfd (read/write) 1435070 1435070 0 0.0
.bss 85352 85352 0 0.0
.data 9456 9456 0 0.0
.rodata 156008 156008 0 0.0
.text 1103608 1103608 0 0.0
bl602+rpc (read/write) 1468078 1468078 0 0.0
.bss 93216 93216 0 0.0
.data 9856 9856 0 0.0
.rodata 164616 164616 0 0.0
.text 1119732 1119732 0 0.0
bl702 lighting-app bl702 (read only) 3478 3478 0 0.0
(read/write) 1185131 1185131 0 0.0
.bss 11133 11133 0 0.0
.data 3656 3656 0 0.0
.rodata 106420 106420 0 0.0
.text 957392 957392 0 0.0
bl702+mfd (read only) 3478 3478 0 0.0
(read/write) 1196263 1196263 0 0.0
.bss 11309 11309 0 0.0
.data 3640 3640 0 0.0
.rodata 105360 105360 0 0.0
.text 969456 969456 0 0.0
bl702+rpc (read only) 3478 3478 0 0.0
(read/write) 1276767 1276767 0 0.0
.bss 19597 19597 0 0.0
.data 4216 4216 0 0.0
.rodata 121792 121792 0 0.0
.text 1032202 1032202 0 0.0
bl706-eth (read/write) 1004253 1004253 0 0.0
.bss 23692 23692 0 0.0
.data 3232 3232 0 0.0
.rodata 99752 99752 0 0.0
.text 749798 749798 0 0.0
bl706-wifi (read/write) 1235654 1235654 0 0.0
.bss 10577 10577 0 0.0
.data 3672 3672 0 0.0
.rodata 120732 120732 0 0.0
.text 978442 978442 0 0.0
bl702l lighting-app bl702l (read only) 512 512 0 0.0
(read/write) 1154776 1154776 0 0.0
.bss 16328 16328 0 0.0
.data 5024 5024 0 0.0
.rodata 100424 100424 0 0.0
.text 950518 950518 0 0.0
bl702l+mfd (read only) 512 512 0 0.0
(read/write) 1165972 1165972 0 0.0
.bss 16504 16504 0 0.0
.data 5000 5000 0 0.0
.rodata 99364 99364 0 0.0
.text 962638 962638 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 (read only) 778296 778296 0 0.0
(read/write) 168380 168380 0 0.0
.bss 90452 90452 0 0.0
.data 3524 3524 0 0.0
.rodata 88904 88904 0 0.0
.text 689128 689128 0 0.0
lock-ftd LP_EM_CC1354P10_6 (read only) 794184 794184 0 0.0
(read/write) 178608 178608 0 0.0
.bss 100628 100628 0 0.0
.data 3552 3552 0 0.0
.rodata 83112 83112 0 0.0
.text 710804 710804 0 0.0
lock-mtd LP_EM_CC1354P10_6 (read only) 782488 782488 0 0.0
(read/write) 173064 173064 0 0.0
.bss 95084 95084 0 0.0
.data 3552 3552 0 0.0
.rodata 109760 109760 0 0.0
.text 672460 672460 0 0.0
pump-app LP_EM_CC1354P10_6 (read only) 735120 735120 0 0.0
(read/write) 167384 167384 0 0.0
.bss 89232 89232 0 0.0
.data 3512 3512 0 0.0
.rodata 84488 84488 0 0.0
.text 650368 650368 0 0.0
pump-controller-app LP_EM_CC1354P10_6 (read only) 720776 720776 0 0.0
(read/write) 167564 167564 0 0.0
.bss 89416 89416 0 0.0
.data 3508 3508 0 0.0
.rodata 80328 80328 0 0.0
.text 640184 640184 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL (read only) 568138 568138 0 0.0
(read/write) 207744 207744 0 0.0
.bss 201028 201028 0 0.0
.data 1592 1592 0 0.0
.rodata 84034 84034 0 0.0
.text 481980 481980 0 0.0
lock CC3235SF_LAUNCHXL (read only) 621474 621474 0 0.0
(read/write) 208144 208144 0 0.0
.bss 201504 201504 0 0.0
.data 1520 1520 0 0.0
.rodata 105898 105898 0 0.0
.text 513452 513452 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 562335 562471 136 0.0
.app_xip_area 452489 452625 136 0.0
.bss 64688 64688 0 0.0
.data 732 732 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 544439 544583 144 0.0
.app_xip_area 429857 430001 144 0.0
.bss 69384 69384 0 0.0
.data 772 772 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor cyw930739m2evb_01 (read/write) 563247 563391 144 0.0
.app_xip_area 454857 455001 144 0.0
.bss 63272 63272 0 0.0
.data 696 696 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
switch cyw930739m2evb_01 (read/write) 558903 559055 152 0.0
.app_xip_area 447281 447433 152 0.0
.bss 66392 66392 0 0.0
.data 804 804 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
esp32 all-clusters-app c3devkit (read only) 1191460 1191460 0 0.0
(read/write) 1742640 1742640 0 0.0
.dram0.bss 72864 72864 0 0.0
.dram0.data 13588 13588 0 0.0
.flash.rodata 246656 246656 0 0.0
.flash.text 1191460 1191460 0 0.0
.iram0.text 75530 75530 0 0.0
m5stack (read only) 1235255 1235263 8 0.0
(read/write) 527600 527600 0 0.0
.dram0.bss 79720 79720 0 0.0
.dram0.data 35132 35132 0 0.0
.flash.rodata 276828 276828 0 0.0
.flash.text 1229091 1229099 8 0.0
.iram0.text 125403 125403 0 0.0
k32w contact k32w0+release (read only) 606912 606912 0 0.0
(read/write) 81172 81172 0 0.0
.bss 68952 68952 0 0.0
.data 2236 2236 0 0.0
.text 606376 606376 0 0.0
k32w1+release (read only) 1024 1024 0 0.0
(read/write) 692196 692196 0 0.0
.bss 67608 67608 0 0.0
.data 2788 2788 0 0.0
.text 578328 578328 0 0.0
light k32w0+release (read only) 596272 596272 0 0.0
(read/write) 79188 79188 0 0.0
.bss 67016 67016 0 0.0
.data 2188 2188 0 0.0
.text 595736 595736 0 0.0
k32w1+release (read only) 1024 1024 0 0.0
(read/write) 784008 784008 0 0.0
.bss 77284 77284 0 0.0
.data 2000 2000 0 0.0
.text 661272 661272 0 0.0
lock k32w0+release (read only) 577664 577664 0 0.0
(read/write) 78644 78644 0 0.0
.bss 66496 66496 0 0.0
.data 2164 2164 0 0.0
.text 577128 577128 0 0.0
linux air-purifier-app debug (read only) 2536189 2536189 0 0.0
(read/write) 127192 127192 0 0.0
.bss 46272 46272 0 0.0
.data 2144 2144 0 0.0
.data.rel.ro 72856 72856 0 0.0
.dynamic 608 608 0 0.0
.got 4552 4552 0 0.0
.init 27 27 0 0.0
.init_array 752 752 0 0.0
.rodata 179688 179688 0 0.0
.text 2181221 2181221 0 0.0
all-clusters-app debug (read only) 5540377 5540377 0 0.0
(read/write) 464088 464088 0 0.0
.bss 131664 131664 0 0.0
.data 4448 4448 0 0.0
.data.rel.ro 320728 320728 0 0.0
.dynamic 624 624 0 0.0
.got 5336 5336 0 0.0
.init 27 27 0 0.0
.init_array 1280 1280 0 0.0
.rodata 321628 321628 0 0.0
.text 4800563 4800563 0 0.0
all-clusters-minimal-app debug (read only) 4965345 4965345 0 0.0
(read/write) 234704 234704 0 0.0
.bss 127216 127216 0 0.0
.data 4384 4384 0 0.0
.data.rel.ro 96040 96040 0 0.0
.dynamic 624 624 0 0.0
.got 5296 5296 0 0.0
.init 27 27 0 0.0
.init_array 1112 1112 0 0.0
.rodata 271949 271949 0 0.0
.text 4461107 4461107 0 0.0
bridge-app debug (read only) 4427353 4427353 0 0.0
(read/write) 215976 215976 0 0.0
.bss 117816 117816 0 0.0
.data 6144 6144 0 0.0
.data.rel.ro 85312 85312 0 0.0
.dynamic 624 624 0 0.0
.got 5264 5264 0 0.0
.init 27 27 0 0.0
.init_array 808 808 0 0.0
.rodata 219509 219509 0 0.0
.text 3989299 3989299 0 0.0
chip-tool debug (read only) 11959449 11959449 0 0.0
(read/write) 512952 512952 0 0.0
.bss 94200 94200 0 0.0
.data 5058 5058 0 0.0
.data.rel.ro 406480 406480 0 0.0
.dynamic 624 624 0 0.0
.got 5784 5784 0 0.0
.init 27 27 0 0.0
.init_array 760 760 0 0.0
.rodata 433721 433721 0 0.0
.text 10824659 10824659 0 0.0
chip-tool-ipv6only arm64 (read only) 11519104 11519104 0 0.0
(read/write) 582272 582272 0 0.0
.bss 103256 103256 0 0.0
.data 4472 4472 0 0.0
.data.rel.ro 445856 445856 0 0.0
.dynamic 512 512 0 0.0
.got 20224 20224 0 0.0
.init 24 24 0 0.0
.init_array 240 240 0 0.0
.rodata 343932 343932 0 0.0
.text 10292988 10292988 0 0.0
lighting-app debug+rpc+ui (read only) 5314329 5314329 0 0.0
(read/write) 224904 224904 0 0.0
.bss 118880 118880 0 0.0
.data 4800 4800 0 0.0
.data.rel.ro 93728 93728 0 0.0
.dynamic 672 672 0 0.0
.got 5880 5880 0 0.0
.init 27 27 0 0.0
.init_array 928 928 0 0.0
.rodata 341332 341332 0 0.0
.text 4728355 4728355 0 0.0
lock-app debug (read only) 4512441 4512441 0 0.0
(read/write) 203600 203600 0 0.0
.bss 113248 113248 0 0.0
.data 4096 4096 0 0.0
.data.rel.ro 79544 79544 0 0.0
.dynamic 624 624 0 0.0
.got 5216 5216 0 0.0
.init 27 27 0 0.0
.init_array 840 840 0 0.0
.rodata 247445 247445 0 0.0
.text 4054995 4054995 0 0.0
ota-provider-app debug (read only) 4176833 4176833 0 0.0
(read/write) 192680 192680 0 0.0
.bss 113248 113248 0 0.0
.data 4256 4256 0 0.0
.data.rel.ro 69312 69312 0 0.0
.dynamic 624 624 0 0.0
.got 4528 4528 0 0.0
.init 27 27 0 0.0
.init_array 704 704 0 0.0
.rodata 201781 201781 0 0.0
.text 3783203 3783203 0 0.0
ota-requestor-app debug (read only) 4267713 4267713 0 0.0
(read/write) 196960 196960 0 0.0
.bss 114144 114144 0 0.0
.data 4656 4656 0 0.0
.data.rel.ro 72288 72288 0 0.0
.dynamic 624 624 0 0.0
.got 4464 4464 0 0.0
.init 27 27 0 0.0
.init_array 760 760 0 0.0
.rodata 205589 205589 0 0.0
.text 3865971 3865971 0 0.0
shell debug (read only) 2836289 2836833 544 0.0
(read/write) 154328 154328 0 0.0
.bss 62184 62184 0 0.0
.data 1344 1344 0 0.0
.data.rel.ro 85032 85032 0 0.0
.dynamic 592 592 0 0.0
.got 4088 4088 0 0.0
.init 27 27 0 0.0
.init_array 1064 1064 0 0.0
.rodata 184544 184544 0 0.0
.text 2479650 2480194 544 0.0
thermostat-no-ble arm64 (read only) 4358600 4358600 0 0.0
(read/write) 246720 246720 0 0.0
.bss 121624 121624 0 0.0
.data 3328 3328 0 0.0
.data.rel.ro 102776 102776 0 0.0
.dynamic 512 512 0 0.0
.got 12088 12088 0 0.0
.init 24 24 0 0.0
.init_array 416 416 0 0.0
.rodata 155932 155932 0 0.0
.text 3860124 3860124 0 0.0
tv-app debug (read only) 5413713 5414257 544 0.0
(read/write) 349128 349128 0 0.0
.bss 243136 243136 0 0.0
.data 6464 6464 0 0.0
.data.rel.ro 92248 92248 0 0.0
.dynamic 624 624 0 0.0
.got 5512 5512 0 0.0
.init 27 27 0 0.0
.init_array 1120 1120 0 0.0
.rodata 273493 273493 0 0.0
.text 4902595 4903139 544 0.0
tv-casting-app debug (read only) 9827817 9828361 544 0.0
(read/write) 341632 341632 0 0.0
.bss 155936 155936 0 0.0
.data 2912 2912 0 0.0
.data.rel.ro 175936 175936 0 0.0
.dynamic 624 624 0 0.0
.got 5064 5064 0 0.0
.init 27 27 0 0.0
.init_array 1144 1144 0 0.0
.rodata 368776 368776 0 0.0
.text 8988659 8989203 544 0.0
mbed lock-app-release cy8cproto_062_4343w (read only) 6224 6224 0 0.0
(read/write) 2527072 2527072 0 0.0
.bss 220240 220240 0 0.0
.data 5208 5208 0 0.0
.text 1489756 1489756 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1090540 1090540 0 0.0
bss 129560 129560 0 0.0
rodata 110220 110220 0 0.0
text 802936 802936 0 0.0
nrf7002dk_nrf5340_cpuapp (read only) 4 4 0 0.0
(read/write) 1212196 1212196 0 0.0
bss 121770 121770 0 0.0
rodata 140832 140832 0 0.0
text 799100 799100 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1041468 1041468 0 0.0
bss 129300 129300 0 0.0
rodata 98924 98924 0 0.0
text 765424 765424 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 835520 835520 0 0.0
(read/write) 1784204 1784204 0 0.0
.bss 195180 195180 0 0.0
.data 2640 2640 0 0.0
.text 1577996 1577996 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read only) 837816 837816 0 0.0
(read/write) 1708284 1708284 0 0.0
.bss 192908 192908 0 0.0
.data 2616 2616 0 0.0
.text 1504372 1504372 0 0.0
light cy8ckit_062s2_43012 (read only) 844504 844504 0 0.0
(read/write) 1632716 1632716 0 0.0
.bss 186404 186404 0 0.0
.data 2432 2432 0 0.0
.text 1435492 1435492 0 0.0
lock cy8ckit_062s2_43012 (read only) 817384 817384 0 0.0
(read/write) 1659596 1659596 0 0.0
.bss 213500 213500 0 0.0
.data 2456 2456 0 0.0
.text 1435252 1435252 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1118432 1118432 0 0.0
.bss 102064 102064 0 0.0
.data 808 808 0 0.0
.text 630812 630812 0 0.0
lock-app qpg6105+debug (read/write) 1082408 1082408 0 0.0
.bss 98360 98360 0 0.0
.data 852 852 0 0.0
.text 594784 594784 0 0.0

@@ -42,7 +43,7 @@ int DeviceHelpHandler(int argc, char ** argv)
static CHIP_ERROR FactoryResetHandler(int argc, char ** argv)
{
streamer_printf(streamer_get(), "Performing factory reset ... \r\n");
DeviceLayer::ConfigurationMgr().InitiateFactoryReset();
chip::Server::GetInstance().ScheduleFactoryReset();
Copy link
Contributor

Choose a reason for hiding this comment

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

This was done this way to avoid dependency between src/lib and app as app was supposed to be the top-level component. I guess the best way to workaround it would be moving the shell commands to the app directory but not sure how much work that would be...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, okay. Closing the PR

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.

2 participants