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

Return CHIP_ERROR from BlePlatformDelegate APIs #34387

Merged
merged 4 commits into from
Jul 19, 2024

Conversation

arkq
Copy link
Contributor

@arkq arkq commented Jul 18, 2024

Problem

It's not possible to return error code from the platform delegate to the BLE module.

Changes

Change platform delegate API signature from bool Func(...) -> CHIP_ERROR Func(...)

Testing

CI will verify potential build breaks

Copy link

github-actions bot commented Jul 18, 2024

PR #34387: Size comparison from e62582e to c343f0b

Full report (13 builds for cc13x4_26x4, cc32xx, mbed, qpg, stm32, tizen)
platform target config section e62582e c343f0b change % change
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 798700 798772 72 0.0
RAM 109180 109180 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 816572 816644 72 0.0
RAM 116948 116948 0 0.0
lock-mtd LP_EM_CC1354P10_6 FLASH 808356 808428 72 0.0
RAM 111236 111236 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 761036 761108 72 0.0
RAM 105328 105328 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 746756 746836 80 0.0
RAM 105576 105576 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 606538 606538 0 0.0
RAM 204508 204508 0 0.0
lock CC3235SF_LAUNCHXL FLASH 651870 651870 0 0.0
RAM 204780 204780 0 0.0
mbed lock-app-release cy8cproto_062_4343w FLASH 1503044 1503276 232 0.0
RAM 226648 226648 0 0.0
qpg lighting-app qpg6105+debug FLASH 651556 651556 0 0.0
RAM 104564 104564 0 0.0
lock-app qpg6105+debug FLASH 612088 612088 0 0.0
RAM 99240 99240 0 0.0
stm32 light STM32WB5MM-DK FLASH 473880 473960 80 0.0
RAM 144196 144196 0 0.0
tizen all-clusters-app arm unknown 1584 1584 0 0.0
FLASH 1639904 1640180 276 0.0
RAM 48620 48620 0 0.0
chip-tool-ubsan arm unknown 2384 2384 0 0.0
FLASH 16309414 16309770 356 0.0
RAM 7162056 7162096 40 0.0

Copy link

github-actions bot commented Jul 18, 2024

PR #34387: Size comparison from e62582e to 9398254

Full report (46 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, linux, mbed, nxp, psoc6, qpg, stm32, tizen)
platform target config section e62582e 9398254 change % change
bl602 lighting-app bl602 FLASH 1271594 1271632 38 0.0
RAM 95328 95328 0 0.0
bl602+mfd FLASH 1286108 1286146 38 0.0
RAM 95472 95472 0 0.0
bl602+rpc FLASH 1310810 1310848 38 0.0
RAM 103752 103752 0 0.0
bl702 lighting-app bl702 FLASH 1092702 1092740 38 0.0
RAM 15161 15161 0 0.0
bl702+mfd FLASH 1103396 1103434 38 0.0
RAM 15313 15313 0 0.0
bl702+rpc FLASH 1182512 1182550 38 0.0
RAM 24181 24181 0 0.0
bl706-eth FLASH 875834 875834 0 0.0
RAM 27272 27272 0 0.0
bl706-wifi FLASH 1128248 1128288 40 0.0
RAM 14605 14605 0 0.0
bl702l lighting-app bl702l FLASH 1079588 1079626 38 0.0
RAM 21732 21732 0 0.0
bl702l+mfd FLASH 1090850 1090888 38 0.0
RAM 21892 21892 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 798700 798772 72 0.0
RAM 109180 109180 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 816572 816652 80 0.0
RAM 116948 116948 0 0.0
lock-mtd LP_EM_CC1354P10_6 FLASH 808356 808436 80 0.0
RAM 111236 111236 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 761036 761116 80 0.0
RAM 105328 105328 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 746756 746836 80 0.0
RAM 105576 105576 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 606538 606538 0 0.0
RAM 204508 204508 0 0.0
lock CC3235SF_LAUNCHXL FLASH 651870 651870 0 0.0
RAM 204780 204780 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 667809 667817 8 0.0
RAM 77644 77644 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 687669 687677 8 0.0
RAM 80276 80276 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 687669 687677 8 0.0
RAM 80276 80276 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 644597 644613 16 0.0
RAM 72712 72712 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 609425 609433 8 0.0
RAM 70804 70804 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 629053 629069 16 0.0
RAM 73356 73356 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 629053 629069 16 0.0
RAM 73356 73356 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 625145 625161 16 0.0
RAM 73820 73820 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 644861 644877 16 0.0
RAM 76372 76372 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 644861 644877 16 0.0
RAM 76372 76372 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 593525 593541 16 0.0
RAM 67788 67788 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 613369 613385 16 0.0
RAM 70420 70420 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 613369 613385 16 0.0
RAM 70420 70420 0 0.0
linux chip-tool-ipv6only arm64 unknown 20144 20144 0 0.0
FLASH 10916284 10916124 -160 -0.0
RAM 597872 597992 120 0.0
thermostat-no-ble arm64 unknown 9184 9184 0 0.0
FLASH 4170012 4170012 0 0.0
RAM 235840 235840 0 0.0
mbed lock-app-release cy8cproto_062_4343w FLASH 1503044 1503292 248 0.0
RAM 226648 226648 0 0.0
nxp contact k32w0+release FLASH 576164 576148 -16 -0.0
RAM 70024 70024 0 0.0
k32w1+release FLASH 591648 591632 -16 -0.0
RAM 74056 74056 0 0.0
light k32w0+release FLASH 610512 610496 -16 -0.0
RAM 69500 69500 0 0.0
k32w1+release FLASH 675288 675288 0 0.0
RAM 82816 82816 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1616036 1616076 40 0.0
RAM 209764 209764 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1536556 1536596 40 0.0
RAM 206588 206588 0 0.0
light cy8ckit_062s2_43012 FLASH 1463164 1463196 32 0.0
RAM 199876 199876 0 0.0
lock cy8ckit_062s2_43012 FLASH 1463900 1463932 32 0.0
RAM 224388 224388 0 0.0
qpg lighting-app qpg6105+debug FLASH 651556 651564 8 0.0
RAM 104564 104564 0 0.0
lock-app qpg6105+debug FLASH 612088 612096 8 0.0
RAM 99240 99240 0 0.0
stm32 light STM32WB5MM-DK FLASH 473880 473960 80 0.0
RAM 144196 144196 0 0.0
tizen all-clusters-app arm unknown 1584 1584 0 0.0
FLASH 1639904 1640192 288 0.0
RAM 48620 48620 0 0.0
chip-tool-ubsan arm unknown 2384 2384 0 0.0
FLASH 16309414 16309966 552 0.0
RAM 7162056 7162216 160 0.0

@arkq arkq force-pushed the ble-return-chip-error branch from 9398254 to e77b83e Compare July 18, 2024 09:55
Copy link

github-actions bot commented Jul 18, 2024

PR #34387: Size comparison from b88ac27 to e77b83e

Full report (96 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section b88ac27 e77b83e change % change
bl602 lighting-app bl602 FLASH 1271594 1271632 38 0.0
RAM 95328 95328 0 0.0
bl602+mfd FLASH 1286108 1286146 38 0.0
RAM 95472 95472 0 0.0
bl602+rpc FLASH 1310810 1310848 38 0.0
RAM 103752 103752 0 0.0
bl702 lighting-app bl702 FLASH 1092702 1092740 38 0.0
RAM 15161 15161 0 0.0
bl702+mfd FLASH 1103396 1103434 38 0.0
RAM 15313 15313 0 0.0
bl702+rpc FLASH 1182512 1182550 38 0.0
RAM 24181 24181 0 0.0
bl706-eth FLASH 875834 875834 0 0.0
RAM 27272 27272 0 0.0
bl706-wifi FLASH 1128248 1128288 40 0.0
RAM 14605 14605 0 0.0
bl702l lighting-app bl702l FLASH 1079588 1079626 38 0.0
RAM 21732 21732 0 0.0
bl702l+mfd FLASH 1090850 1090888 38 0.0
RAM 21892 21892 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 798700 798772 72 0.0
RAM 109180 109180 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 816572 816652 80 0.0
RAM 116948 116948 0 0.0
lock-mtd LP_EM_CC1354P10_6 FLASH 808356 808436 80 0.0
RAM 111236 111236 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 761036 761116 80 0.0
RAM 105328 105328 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 746756 746836 80 0.0
RAM 105576 105576 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 606538 606538 0 0.0
RAM 204508 204508 0 0.0
lock CC3235SF_LAUNCHXL FLASH 651870 651870 0 0.0
RAM 204780 204780 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 667809 667817 8 0.0
RAM 77644 77644 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 687669 687677 8 0.0
RAM 80276 80276 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 687669 687677 8 0.0
RAM 80276 80276 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 644597 644613 16 0.0
RAM 72712 72712 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 609425 609433 8 0.0
RAM 70804 70804 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 629053 629069 16 0.0
RAM 73356 73356 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 629053 629069 16 0.0
RAM 73356 73356 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 625145 625161 16 0.0
RAM 73820 73820 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 644861 644877 16 0.0
RAM 76372 76372 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 644861 644877 16 0.0
RAM 76372 76372 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 593525 593541 16 0.0
RAM 67788 67788 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 613369 613385 16 0.0
RAM 70420 70420 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 613369 613385 16 0.0
RAM 70420 70420 0 0.0
efr32 lighting-app BRD4187C FLASH 924772 924760 -12 -0.0
RAM 137528 137528 0 0.0
lock-app BRD4338a FLASH 733972 734068 96 0.0
RAM 207892 207892 0 0.0
window-app BRD4187C FLASH 1012764 1012788 24 0.0
RAM 129632 129632 0 0.0
esp32 all-clusters-app c3devkit DRAM 90924 90924 0 0.0
FLASH 1471186 1471198 12 0.0
IRAM 75570 75570 0 0.0
m5stack DRAM 117404 117404 0 0.0
FLASH 1540087 1540103 16 0.0
IRAM 125403 125403 0 0.0
linux air-purifier-app debug unknown 4624 4624 0 0.0
FLASH 2628137 2628281 144 0.0
RAM 124496 124496 0 0.0
all-clusters-app debug unknown 5392 5392 0 0.0
FLASH 5761186 5761330 144 0.0
RAM 493984 493984 0 0.0
all-clusters-minimal-app debug unknown 5304 5304 0 0.0
FLASH 5219070 5219214 144 0.0
RAM 234992 234992 0 0.0
bridge-app debug unknown 5288 5288 0 0.0
FLASH 4615802 4615946 144 0.0
RAM 212256 212256 0 0.0
chip-tool debug unknown 5776 5776 0 0.0
FLASH 12220800 12220944 144 0.0
RAM 548018 548018 0 0.0
chip-tool-ipv6only arm64 unknown 20144 20144 0 0.0
FLASH 10916284 10916124 -160 -0.0
RAM 597872 597992 120 0.0
fabric-admin debug unknown 5672 5672 0 0.0
FLASH 11233873 11234017 144 0.0
RAM 544858 544858 0 0.0
fabric-bridge-app debug unknown 4560 4560 0 0.0
FLASH 4363598 4363598 0 0.0
RAM 198272 198272 0 0.0
lighting-app debug+rpc+ui unknown 5968 5968 0 0.0
FLASH 5540177 5540321 144 0.0
RAM 223520 223520 0 0.0
lock-app debug unknown 5224 5224 0 0.0
FLASH 4674748 4674892 144 0.0
RAM 199952 199952 0 0.0
ota-provider-app debug unknown 4600 4600 0 0.0
FLASH 4316808 4316808 0 0.0
RAM 194128 194128 0 0.0
ota-requestor-app debug unknown 4536 4536 0 0.0
FLASH 4455394 4455394 0 0.0
RAM 198680 198680 0 0.0
shell debug unknown 4168 4168 0 0.0
FLASH 2905021 2905165 144 0.0
RAM 152920 152920 0 0.0
thermostat-no-ble arm64 unknown 9184 9184 0 0.0
FLASH 4170012 4170012 0 0.0
RAM 235840 235840 0 0.0
tv-app debug unknown 5496 5496 0 0.0
FLASH 5816815 5816959 144 0.0
RAM 341360 341360 0 0.0
tv-casting-app debug unknown 5160 5160 0 0.0
FLASH 10361821 10361965 144 0.0
RAM 402232 402232 0 0.0
mbed lock-app-release cy8cproto_062_4343w FLASH 1503044 1503292 248 0.0
RAM 226648 226648 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 883200 883200 0 0.0
RAM 142259 142259 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 953540 953512 -28 -0.0
RAM 140687 140687 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 828264 828260 -4 -0.0
RAM 141123 141123 0 0.0
light-switch-app nrf52840dk_nrf52840 FLASH 787160 787156 -4 -0.0
RAM 132652 132652 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 932440 932436 -4 -0.0
RAM 130345 130345 0 0.0
lighting-app nrf52840dk_nrf52840+rpc FLASH 872256 872248 -8 -0.0
RAM 146935 146935 0 0.0
nrf52840dongle_nrf52840 FLASH 814076 814068 -8 -0.0
RAM 154940 154940 0 0.0
nrf5340dk_nrf5340_cpuapp FLASH 769768 769764 -4 -0.0
RAM 145741 145741 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 932440 932436 -4 -0.0
RAM 130345 130345 0 0.0
lock-app nrf52840dk_nrf52840 FLASH 799148 799148 0 0.0
RAM 133171 133171 0 0.0
nrf5340dk_nrf5340_cpuapp FLASH 724440 724432 -8 -0.0
RAM 133237 133237 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 945368 945364 -4 -0.0
RAM 130864 130864 0 0.0
pump-app nrf52840dk_nrf52840 FLASH 751544 751540 -4 -0.0
RAM 131860 131860 0 0.0
pump-controller-app nrf52840dk_nrf52840 FLASH 738156 738152 -4 -0.0
RAM 131659 131659 0 0.0
nxp contact k32w0+release FLASH 576164 576148 -16 -0.0
RAM 70024 70024 0 0.0
k32w1+release FLASH 591648 591632 -16 -0.0
RAM 74056 74056 0 0.0
light k32w0+release FLASH 610512 610496 -16 -0.0
RAM 69500 69500 0 0.0
k32w1+release FLASH 675288 675288 0 0.0
RAM 82816 82816 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1616036 1616076 40 0.0
RAM 209764 209764 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1536556 1536596 40 0.0
RAM 206588 206588 0 0.0
light cy8ckit_062s2_43012 FLASH 1463164 1463196 32 0.0
RAM 199876 199876 0 0.0
lock cy8ckit_062s2_43012 FLASH 1463900 1463932 32 0.0
RAM 224388 224388 0 0.0
qpg lighting-app qpg6105+debug FLASH 651556 651564 8 0.0
RAM 104564 104564 0 0.0
lock-app qpg6105+debug FLASH 612088 612096 8 0.0
RAM 99240 99240 0 0.0
stm32 light STM32WB5MM-DK FLASH 473880 473960 80 0.0
RAM 144196 144196 0 0.0
telink air-quality-sensor-app tlsr9528a_retention FLASH 633066 633054 -12 -0.0
RAM 50528 50528 0 0.0
all-clusters-app tlsr9118bdk40d FLASH 658954 658942 -12 -0.0
RAM 148436 148436 0 0.0
all-clusters-minimal-app tlsr9528a FLASH 779226 779214 -12 -0.0
RAM 113212 113212 0 0.0
bridge-app tlsr9258a FLASH 676058 676046 -12 -0.0
RAM 95304 95304 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 634650 634638 -12 -0.0
RAM 50572 50572 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a FLASH 720510 720498 -12 -0.0
RAM 77148 77148 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 614030 614018 -12 -0.0
RAM 144636 144636 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 801812 801800 -12 -0.0
RAM 103040 103040 0 0.0
lock-app-dfu tlsr9528a FLASH 666466 666454 -12 -0.0
RAM 69852 69852 0 0.0
ota-requestor-app tlsr9258a FLASH 695390 695378 -12 -0.0
RAM 95028 95028 0 0.0
pump-app tlsr9518adk80d FLASH 616924 616912 -12 -0.0
RAM 56952 56952 0 0.0
pump-controller-app tlsr9518adk80d FLASH 607308 607296 -12 -0.0
RAM 56752 56752 0 0.0
shell tlsr9518adk80d FLASH 466438 466438 0 0.0
RAM 72484 72484 0 0.0
smoke_co_alarm-app tlsr9528a_retention FLASH 641268 641256 -12 -0.0
RAM 52200 52200 0 0.0
temperature-measurement-app-mars-ota tlsr9518adk80d FLASH 651134 651122 -12 -0.0
RAM 60388 60388 0 0.0
thermostat tlsr9518adk80d FLASH 626198 626186 -12 -0.0
RAM 57084 57084 0 0.0
window-covering tlsr9118bdk40d FLASH 519424 519412 -12 -0.0
RAM 97800 97800 0 0.0
tizen all-clusters-app arm unknown 1584 1584 0 0.0
FLASH 1639904 1640192 288 0.0
RAM 48620 48620 0 0.0
chip-tool-ubsan arm unknown 2384 2384 0 0.0
FLASH 16309414 16309966 552 0.0
RAM 7162056 7162216 160 0.0

@mergify mergify bot merged commit fca7948 into project-chip:master Jul 19, 2024
69 checks passed
@arkq arkq deleted the ble-return-chip-error branch July 19, 2024 11:17
j-ororke pushed a commit to j-ororke/connectedhomeip that referenced this pull request Jul 31, 2024
* Return CHIP_ERROR from BlePlatformDelegate APIs

* Restyled by clang-format

* Fix issues detected by CI

* Mark BlePlatformDelegate implementations as override

---------

Co-authored-by: Restyled.io <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants