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

Zephyr standalone platform update #34135

Merged
merged 21 commits into from
Jul 2, 2024
Merged

Zephyr standalone platform update #34135

merged 21 commits into from
Jul 2, 2024

Conversation

QuentinCaldeira-eaton
Copy link
Contributor

As discussed in #33471 and #33777, the purpose of this PR is to leave open the possibility of using the Zephyr platform as a standalone platform, working with any boards present in Zephyr (which has network connectivity, enough flash, etc...). For testing purposes, I use a nucleo h563zi. This standalone platform should be used for manufacturers working on Zephyr, but also for people which would like to implement Matter in an unsupported board, using Zephyr OS. This zephyr "module" should simplify developer's life on the Zephyr platform.

Currently, zephyr platform can't be used in a Zephyr ecosystems without modifications, that's why I made that. My guess is anybody which has his board into Zephyr, like ESP or ST, could use the zephyr standalone platform to develop a product. With this, it is not mandatory to use a specific manufacturer zephyr sdk.

It would be great to also develop an example (like lighting-app) which work for the Zephyr SDK, but my knowledge on the Matter stack are very limited currently.

To sum-up, this PR make changes in order to have a functional connectedhomeip, as a Zephyr sdk module.

In order to let the user choose his own pack of functionality. I guess BLUETOOTH shouldn't be enable by default,
because Bluetooth isn't mandatory for a Matter device

Signed-off-by: Caldeira, Quentin <[email protected]>
Because zephyr has recvmsg now

Signed-off-by: Caldeira, Quentin <[email protected]>
Because Zephyr seems to not have ip_mreq, only ip_mreqn, so add an extra flag in platform config to make the choice.
This issue is only meets when doing ipv4 on a Zephyr platform

Signed-off-by: Caldeira, Quentin <[email protected]>
Signed-off-by: Caldeira, Quentin <[email protected]>
@CLAassistant
Copy link

CLAassistant commented Jun 28, 2024

CLA assistant check
All committers have signed the CLA.

QuentinCaldeira-eaton and others added 5 commits June 28, 2024 15:29
Since zephyr implement recvsg now

Signed-off-by: Caldeira, Quentin <[email protected]>
Signed-off-by: Caldeira, Quentin <[email protected]>
Signed-off-by: Caldeira, Quentin <[email protected]>
Copy link

github-actions bot commented Jun 28, 2024

PR #34135: Size comparison from 0460715 to 6e3d2ce

Full report (82 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section 0460715 6e3d2ce change % change
bl602 lighting-app bl602 FLASH 1270644 1270644 0 0.0
RAM 95328 95328 0 0.0
bl602+mfd FLASH 1284902 1284902 0 0.0
RAM 95472 95472 0 0.0
bl602+rpc FLASH 1309860 1309860 0 0.0
RAM 103752 103752 0 0.0
bl702 lighting-app bl702 FLASH 1091790 1091790 0 0.0
RAM 15161 15161 0 0.0
bl702+mfd FLASH 1102484 1102484 0 0.0
RAM 15313 15313 0 0.0
bl702+rpc FLASH 1181600 1181600 0 0.0
RAM 24181 24181 0 0.0
bl706-eth FLASH 874884 874884 0 0.0
RAM 27272 27272 0 0.0
bl706-wifi FLASH 1127216 1127216 0 0.0
RAM 14605 14605 0 0.0
bl702l lighting-app bl702l FLASH 1078676 1078676 0 0.0
RAM 21732 21732 0 0.0
bl702l+mfd FLASH 1089938 1089938 0 0.0
RAM 21892 21892 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 798296 798296 0 0.0
RAM 103096 103096 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 814052 814052 0 0.0
RAM 113568 113568 0 0.0
lock-mtd LP_EM_CC1354P10_6 FLASH 803568 803568 0 0.0
RAM 107696 107696 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 756360 756360 0 0.0
RAM 101788 101788 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 742040 742040 0 0.0
RAM 102036 102036 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 605842 605842 0 0.0
RAM 204508 204508 0 0.0
lock CC3235SF_LAUNCHXL FLASH 650870 650870 0 0.0
RAM 204780 204780 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 666065 666065 0 0.0
RAM 75100 75100 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 685909 685909 0 0.0
RAM 77732 77732 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 685909 685909 0 0.0
RAM 77732 77732 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 642845 642845 0 0.0
RAM 70168 70168 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 608609 608609 0 0.0
RAM 70804 70804 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 628245 628245 0 0.0
RAM 73356 73356 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 628245 628245 0 0.0
RAM 73356 73356 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 624113 624113 0 0.0
RAM 73820 73820 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 643837 643837 0 0.0
RAM 76372 76372 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 643837 643837 0 0.0
RAM 76372 76372 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 592677 592677 0 0.0
RAM 67788 67788 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 612529 612529 0 0.0
RAM 70420 70420 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 612529 612529 0 0.0
RAM 70420 70420 0 0.0
efr32 lighting-app BRD4187C FLASH 923220 923220 0 0.0
RAM 134996 134996 0 0.0
lock-app BRD4338a FLASH 762148 762148 0 0.0
RAM 174552 174552 0 0.0
window-app BRD4187C FLASH 1012040 1012040 0 0.0
RAM 129616 129616 0 0.0
esp32 all-clusters-app c3devkit DRAM 88332 88332 0 0.0
FLASH 1468744 1468744 0 0.0
IRAM 75570 75570 0 0.0
m5stack DRAM 114796 114796 0 0.0
FLASH 1537959 1537959 0 0.0
IRAM 125403 125403 0 0.0
linux air-purifier-app debug unknown 4592 4592 0 0.0
FLASH 2529216 2529216 0 0.0
RAM 125112 125112 0 0.0
all-clusters-app debug unknown 5368 5368 0 0.0
FLASH 5581246 5581246 0 0.0
RAM 487384 487384 0 0.0
all-clusters-minimal-app debug unknown 5288 5288 0 0.0
FLASH 5051432 5051432 0 0.0
RAM 232936 232936 0 0.0
bridge-app debug unknown 5256 5256 0 0.0
FLASH 4477464 4477464 0 0.0
RAM 212832 212832 0 0.0
chip-tool debug unknown 5728 5728 0 0.0
FLASH 11688023 11688023 0 0.0
RAM 542018 542018 0 0.0
chip-tool-ipv6only arm64 unknown 19992 19992 0 0.0
FLASH 10806732 10806732 0 0.0
RAM 590928 590928 0 0.0
fabric-admin debug unknown 5592 5592 0 0.0
FLASH 10653303 10653303 0 0.0
RAM 535658 535658 0 0.0
fabric-bridge-app debug unknown 5264 5264 0 0.0
FLASH 4348008 4348008 0 0.0
RAM 204960 204960 0 0.0
lighting-app debug+rpc+ui unknown 5936 5936 0 0.0
FLASH 5373058 5373058 0 0.0
RAM 221640 221640 0 0.0
lock-app debug unknown 5192 5192 0 0.0
FLASH 4541016 4541016 0 0.0
RAM 200248 200248 0 0.0
ota-provider-app debug unknown 4576 4576 0 0.0
FLASH 4196904 4196904 0 0.0
RAM 194544 194544 0 0.0
ota-requestor-app debug unknown 4512 4512 0 0.0
FLASH 4322264 4322264 0 0.0
RAM 199168 199168 0 0.0
shell debug unknown 4112 4112 0 0.0
FLASH 2794525 2794525 0 0.0
RAM 150480 150480 0 0.0
thermostat-no-ble arm64 unknown 9184 9184 0 0.0
FLASH 4167580 4167580 0 0.0
RAM 235864 235864 0 0.0
tv-app debug unknown 5472 5472 0 0.0
FLASH 5602984 5602984 0 0.0
RAM 341800 341800 0 0.0
tv-casting-app debug unknown 5096 5096 0 0.0
FLASH 9859646 9859646 0 0.0
RAM 400024 400024 0 0.0
mbed lock-app-release cy8cproto_062_4343w FLASH 1502116 1502116 0 0.0
RAM 226656 226656 0 0.0
nxp contact k32w0+release FLASH 575868 575868 0 0.0
RAM 70024 70024 0 0.0
k32w1+release FLASH 591032 591032 0 0.0
RAM 74056 74056 0 0.0
light k32w0+release FLASH 609960 609960 0 0.0
RAM 69500 69500 0 0.0
k32w1+release FLASH 674536 674536 0 0.0
RAM 82816 82816 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1613436 1613436 0 0.0
RAM 207148 207148 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1534204 1534204 0 0.0
RAM 204052 204052 0 0.0
light cy8ckit_062s2_43012 FLASH 1461076 1461076 0 0.0
RAM 197332 197332 0 0.0
lock cy8ckit_062s2_43012 FLASH 1462932 1462932 0 0.0
RAM 224396 224396 0 0.0
qpg lighting-app qpg6105+debug FLASH 650876 650876 0 0.0
RAM 104564 104564 0 0.0
lock-app qpg6105+debug FLASH 611000 611000 0 0.0
RAM 99240 99240 0 0.0
stm32 light STM32WB5MM-DK FLASH 472272 472272 0 0.0
RAM 141652 141652 0 0.0
telink air-quality-sensor-app tlsr9528a_retention FLASH 632372 632372 0 0.0
RAM 50528 50528 0 0.0
all-clusters-app tlsr9118bdk40d FLASH 657052 657052 0 0.0
RAM 145872 145872 0 0.0
all-clusters-minimal-app tlsr9528a FLASH 777346 777346 0 0.0
RAM 110684 110684 0 0.0
bridge-app tlsr9258a FLASH 675364 675364 0 0.0
RAM 95304 95304 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 633956 633956 0 0.0
RAM 50572 50572 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a FLASH 719758 719758 0 0.0
RAM 77148 77148 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 612186 612186 0 0.0
RAM 142104 142104 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 799966 799966 0 0.0
RAM 100508 100508 0 0.0
lock-app-dfu tlsr9528a FLASH 665528 665528 0 0.0
RAM 69860 69860 0 0.0
ota-requestor-app tlsr9258a FLASH 694694 694694 0 0.0
RAM 95028 95028 0 0.0
pump-app tlsr9518adk80d FLASH 616228 616228 0 0.0
RAM 56952 56952 0 0.0
pump-controller-app tlsr9518adk80d FLASH 606612 606612 0 0.0
RAM 56752 56752 0 0.0
shell tlsr9518adk80d FLASH 466192 466192 0 0.0
RAM 72484 72484 0 0.0
smoke_co_alarm-app tlsr9528a_retention FLASH 640316 640316 0 0.0
RAM 52200 52200 0 0.0
temperature-measurement-app-mars-ota tlsr9518adk80d FLASH 650438 650438 0 0.0
RAM 60388 60388 0 0.0
thermostat tlsr9518adk80d FLASH 625502 625502 0 0.0
RAM 57084 57084 0 0.0
window-covering tlsr9118bdk40d FLASH 518734 518734 0 0.0
RAM 97800 97800 0 0.0
tizen all-clusters-app arm unknown 1584 1584 0 0.0
FLASH 1633324 1633324 0 0.0
RAM 46012 46012 0 0.0
chip-tool-ubsan arm unknown 2384 2384 0 0.0
FLASH 16110190 16110190 0 0.0
RAM 7079696 7079696 0 0.0

src/platform/Zephyr/BLEManagerImpl.h Outdated Show resolved Hide resolved
@biii-anuj-pathak
Copy link

Hi @QuentinCaldeira-eaton

First of all Thanks for filing this PR, I want to try Matter on ESP using Zephyr, and Luckily this PR came in right at the time for me.
I have followed the steps mentioned here #33471. But i was not able to compile it for ESP.

Following are the steps

Following is the error I'm getting.

[325/342] Performing build step for 'chip-gn'Starting Matter library build in D:/ZephyrApps/bfw/build/modules/connectedhomeip
diff: args.gn: No such file or directory
ERROR at //third_party/pigweed/repo/pw_toolchain/clang_tools.gni:15:1: Unable to load "D:/ZephyrApps/modules/lib/matter/build_overrides/pigweed_environment.gni".
import("//build_overrides/pigweed_environment.gni")
^-------------------------------------------------
See //third_party/pigweed/repo/pw_toolchain/host_clang/toolchains.gni:18:1: whence it was imported.
import("$dir_pw_toolchain/clang_tools.gni")
^-----------------------------------------
See //third_party/pigweed/repo/pw_unit_test/test.gni:22:1: whence it was imported.
import("$dir_pw_toolchain/host_clang/toolchains.gni")
^---------------------------------------------------
See //third_party/pigweed/repo/pw_string/BUILD.gn:21:1: whence it was imported.
import("$dir_pw_unit_test/test.gni")
^----------------------------------
See //src/lib/core/BUILD.gn:118:5: which caused the file to be included.
    "$dir_pw_string",

Let me know if i missed any step, or you could help me here. It will be really helpful

@QuentinCaldeira-eaton
Copy link
Contributor Author

QuentinCaldeira-eaton commented Jul 1, 2024

Hey @biii-anuj-pathak, I don't know if it's the right place to discuss this, but here are the first things I think of.

  • Did you clone the submodules as well (like pigweed, jsoncpp, etc...). You can do this with git submodule update --recursive
  • Did you bootstrap after git clone ? It's mandatory
  • Did you source scripts/activate.sh before building ?

By the way, if I can see the example you are building, it will help me to test this PR.
I think it should be useful to also add a documentation on "How to build with Zephyr", even if it's not really linked to Matter SDK. I didn't test this PR with a west update, and a west.yaml so maybe try to pull connectedhomeip yourself, and add the path with .zephyrrc
Tell me if it helps you !

[EDIT] It seems to be a missing bootstrap because pigweed_environment.gni is not include when you pull connectedhomeip, but only after a bootstrap

QuentinCaldeira-eaton and others added 2 commits July 1, 2024 09:13
As discussed in conversations

Signed-off-by: Caldeira, Quentin <[email protected]>
Copy link

github-actions bot commented Jul 1, 2024

PR #34135: Size comparison from d033f8b to 4def860

Full report (82 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, mbed, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section d033f8b 4def860 change % change
bl602 lighting-app bl602 FLASH 1270846 1270846 0 0.0
RAM 95328 95328 0 0.0
bl602+mfd FLASH 1285104 1285104 0 0.0
RAM 95472 95472 0 0.0
bl602+rpc FLASH 1310062 1310062 0 0.0
RAM 103752 103752 0 0.0
bl702 lighting-app bl702 FLASH 1091992 1091992 0 0.0
RAM 15161 15161 0 0.0
bl702+mfd FLASH 1102686 1102686 0 0.0
RAM 15313 15313 0 0.0
bl702+rpc FLASH 1181802 1181802 0 0.0
RAM 24181 24181 0 0.0
bl706-eth FLASH 875086 875086 0 0.0
RAM 27272 27272 0 0.0
bl706-wifi FLASH 1127428 1127428 0 0.0
RAM 14605 14605 0 0.0
bl702l lighting-app bl702l FLASH 1078878 1078878 0 0.0
RAM 21732 21732 0 0.0
bl702l+mfd FLASH 1090140 1090140 0 0.0
RAM 21892 21892 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 798480 798480 0 0.0
RAM 103096 103096 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 814236 814236 0 0.0
RAM 113568 113568 0 0.0
lock-mtd LP_EM_CC1354P10_6 FLASH 803752 803752 0 0.0
RAM 107696 107696 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 756544 756544 0 0.0
RAM 101788 101788 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 742224 742224 0 0.0
RAM 102036 102036 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 606042 606042 0 0.0
RAM 204508 204508 0 0.0
lock CC3235SF_LAUNCHXL FLASH 651078 651078 0 0.0
RAM 204780 204780 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 666249 666249 0 0.0
RAM 75100 75100 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 686093 686093 0 0.0
RAM 77732 77732 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 686093 686093 0 0.0
RAM 77732 77732 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 643037 643037 0 0.0
RAM 70168 70168 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 608793 608793 0 0.0
RAM 70804 70804 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 628437 628437 0 0.0
RAM 73356 73356 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 628437 628437 0 0.0
RAM 73356 73356 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 624297 624297 0 0.0
RAM 73820 73820 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 644021 644021 0 0.0
RAM 76372 76372 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 644021 644021 0 0.0
RAM 76372 76372 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 592861 592861 0 0.0
RAM 67788 67788 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 612713 612713 0 0.0
RAM 70420 70420 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 612713 612713 0 0.0
RAM 70420 70420 0 0.0
efr32 lighting-app BRD4187C FLASH 923428 923428 0 0.0
RAM 134996 134996 0 0.0
lock-app BRD4338a FLASH 762340 762340 0 0.0
RAM 174552 174552 0 0.0
window-app BRD4187C FLASH 1012216 1012216 0 0.0
RAM 129616 129616 0 0.0
esp32 all-clusters-app c3devkit DRAM 88396 88396 0 0.0
FLASH 1467758 1467758 0 0.0
IRAM 75570 75570 0 0.0
m5stack DRAM 114868 114868 0 0.0
FLASH 1537019 1537019 0 0.0
IRAM 125403 125403 0 0.0
linux air-purifier-app debug unknown 4592 4592 0 0.0
FLASH 2529680 2529680 0 0.0
RAM 125112 125112 0 0.0
all-clusters-app debug unknown 5368 5368 0 0.0
FLASH 5581742 5581742 0 0.0
RAM 487512 487512 0 0.0
all-clusters-minimal-app debug unknown 5288 5288 0 0.0
FLASH 5051864 5051864 0 0.0
RAM 232936 232936 0 0.0
bridge-app debug unknown 5256 5256 0 0.0
FLASH 4477896 4477896 0 0.0
RAM 212832 212832 0 0.0
chip-tool debug unknown 5728 5728 0 0.0
FLASH 11693351 11693351 0 0.0
RAM 542146 542146 0 0.0
chip-tool-ipv6only arm64 unknown 19992 19992 0 0.0
FLASH 10811708 10811708 0 0.0
RAM 591072 591072 0 0.0
fabric-admin debug unknown 5592 5592 0 0.0
FLASH 10657831 10657831 0 0.0
RAM 535786 535786 0 0.0
fabric-bridge-app debug unknown 5264 5264 0 0.0
FLASH 4348440 4348440 0 0.0
RAM 204960 204960 0 0.0
lighting-app debug+rpc+ui unknown 5936 5936 0 0.0
FLASH 5373522 5373522 0 0.0
RAM 221640 221640 0 0.0
lock-app debug unknown 5192 5192 0 0.0
FLASH 4541480 4541480 0 0.0
RAM 200248 200248 0 0.0
ota-provider-app debug unknown 4576 4576 0 0.0
FLASH 4197336 4197336 0 0.0
RAM 194544 194544 0 0.0
ota-requestor-app debug unknown 4512 4512 0 0.0
FLASH 4322696 4322696 0 0.0
RAM 199168 199168 0 0.0
shell debug unknown 4112 4112 0 0.0
FLASH 2794957 2794957 0 0.0
RAM 150480 150480 0 0.0
thermostat-no-ble arm64 unknown 9184 9184 0 0.0
FLASH 4167964 4167964 0 0.0
RAM 235864 235864 0 0.0
tv-app debug unknown 5472 5472 0 0.0
FLASH 5605144 5605144 0 0.0
RAM 341800 341800 0 0.0
tv-casting-app debug unknown 5096 5096 0 0.0
FLASH 9862542 9862542 0 0.0
RAM 400024 400024 0 0.0
mbed lock-app-release cy8cproto_062_4343w FLASH 1502292 1502292 0 0.0
RAM 226656 226656 0 0.0
nxp contact k32w0+release FLASH 575996 575996 0 0.0
RAM 70024 70024 0 0.0
k32w1+release FLASH 591160 591160 0 0.0
RAM 74056 74056 0 0.0
light k32w0+release FLASH 610104 610104 0 0.0
RAM 69500 69500 0 0.0
k32w1+release FLASH 674720 674720 0 0.0
RAM 82816 82816 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1613628 1613628 0 0.0
RAM 207148 207148 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1534396 1534396 0 0.0
RAM 204052 204052 0 0.0
light cy8ckit_062s2_43012 FLASH 1461268 1461268 0 0.0
RAM 197332 197332 0 0.0
lock cy8ckit_062s2_43012 FLASH 1463124 1463124 0 0.0
RAM 224396 224396 0 0.0
qpg lighting-app qpg6105+debug FLASH 651052 651052 0 0.0
RAM 104564 104564 0 0.0
lock-app qpg6105+debug FLASH 611184 611184 0 0.0
RAM 99240 99240 0 0.0
stm32 light STM32WB5MM-DK FLASH 472456 472456 0 0.0
RAM 141652 141652 0 0.0
telink air-quality-sensor-app tlsr9528a_retention FLASH 632508 632508 0 0.0
RAM 50528 50528 0 0.0
all-clusters-app tlsr9118bdk40d FLASH 657190 657190 0 0.0
RAM 145872 145872 0 0.0
all-clusters-minimal-app tlsr9528a FLASH 777484 777484 0 0.0
RAM 110684 110684 0 0.0
bridge-app tlsr9258a FLASH 675502 675502 0 0.0
RAM 95304 95304 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 634092 634092 0 0.0
RAM 50572 50572 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a FLASH 719896 719896 0 0.0
RAM 77148 77148 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 612324 612324 0 0.0
RAM 142104 142104 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 800104 800104 0 0.0
RAM 100508 100508 0 0.0
lock-app-dfu tlsr9528a FLASH 665666 665666 0 0.0
RAM 69860 69860 0 0.0
ota-requestor-app tlsr9258a FLASH 694832 694832 0 0.0
RAM 95028 95028 0 0.0
pump-app tlsr9518adk80d FLASH 616366 616366 0 0.0
RAM 56952 56952 0 0.0
pump-controller-app tlsr9518adk80d FLASH 606750 606750 0 0.0
RAM 56752 56752 0 0.0
shell tlsr9518adk80d FLASH 466192 466192 0 0.0
RAM 72484 72484 0 0.0
smoke_co_alarm-app tlsr9528a_retention FLASH 640706 640706 0 0.0
RAM 52200 52200 0 0.0
temperature-measurement-app-mars-ota tlsr9518adk80d FLASH 650576 650576 0 0.0
RAM 60388 60388 0 0.0
thermostat tlsr9518adk80d FLASH 625640 625640 0 0.0
RAM 57084 57084 0 0.0
window-covering tlsr9118bdk40d FLASH 518872 518872 0 0.0
RAM 97800 97800 0 0.0
tizen all-clusters-app arm unknown 1584 1584 0 0.0
FLASH 1633672 1633672 0 0.0
RAM 46012 46012 0 0.0
chip-tool-ubsan arm unknown 2384 2384 0 0.0
FLASH 16119802 16119802 0 0.0
RAM 7084788 7084788 0 0.0

@QuentinCaldeira-eaton
Copy link
Contributor Author

Hi @Damian-Nordic, I don't understand why nrf build doesn't pass. Any idea ?

@Damian-Nordic
Copy link
Contributor

@QuentinCaldeira-eaton Most likely because you added #include <zephyr/net/net_if.h> to the common code without checking if Zephyr net_if usage is enabled in Matter (which in fact is not enabled for native_posix tests).

You can guard the include with #if CHIP_DEVICE_CONFIG_ENABLE_WIFI and it should help.

Copy link

github-actions bot commented Jul 1, 2024

PR #34135: Size comparison from d033f8b to ebbaf34

Full report (8 builds for cc32xx, mbed, qpg, stm32, tizen)
platform target config section d033f8b ebbaf34 change % change
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 606042 606042 0 0.0
RAM 204508 204508 0 0.0
lock CC3235SF_LAUNCHXL FLASH 651078 651078 0 0.0
RAM 204780 204780 0 0.0
mbed lock-app-release cy8cproto_062_4343w FLASH 1502292 1502292 0 0.0
RAM 226656 226656 0 0.0
qpg lighting-app qpg6105+debug FLASH 651052 651052 0 0.0
RAM 104564 104564 0 0.0
lock-app qpg6105+debug FLASH 611184 611184 0 0.0
RAM 99240 99240 0 0.0
stm32 light STM32WB5MM-DK FLASH 472456 472456 0 0.0
RAM 141652 141652 0 0.0
tizen all-clusters-app arm unknown 1584 1584 0 0.0
FLASH 1633672 1633672 0 0.0
RAM 46012 46012 0 0.0
chip-tool-ubsan arm unknown 2384 2384 0 0.0
FLASH 16119802 16119802 0 0.0
RAM 7084788 7084788 0 0.0

QuentinCaldeira-eaton and others added 2 commits July 1, 2024 13:03
Because all manufactures don't implement it

Signed-off-by: Caldeira, Quentin <[email protected]>
Copy link

github-actions bot commented Jul 1, 2024

PR #34135: Size comparison from d033f8b to 40acc38

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 d033f8b 40acc38 change % change
bl602 lighting-app bl602 FLASH 1270846 1270846 0 0.0
RAM 95328 95328 0 0.0
bl602+mfd FLASH 1285104 1285104 0 0.0
RAM 95472 95472 0 0.0
bl602+rpc FLASH 1310062 1310062 0 0.0
RAM 103752 103752 0 0.0
bl702 lighting-app bl702 FLASH 1091992 1091992 0 0.0
RAM 15161 15161 0 0.0
bl702+mfd FLASH 1102686 1102686 0 0.0
RAM 15313 15313 0 0.0
bl702+rpc FLASH 1181802 1181802 0 0.0
RAM 24181 24181 0 0.0
bl706-eth FLASH 875086 875086 0 0.0
RAM 27272 27272 0 0.0
bl706-wifi FLASH 1127428 1127428 0 0.0
RAM 14605 14605 0 0.0
bl702l lighting-app bl702l FLASH 1078878 1078878 0 0.0
RAM 21732 21732 0 0.0
bl702l+mfd FLASH 1090140 1090140 0 0.0
RAM 21892 21892 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 798480 798480 0 0.0
RAM 103096 103096 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 814236 814236 0 0.0
RAM 113568 113568 0 0.0
lock-mtd LP_EM_CC1354P10_6 FLASH 803752 803752 0 0.0
RAM 107696 107696 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 756544 756544 0 0.0
RAM 101788 101788 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 742224 742224 0 0.0
RAM 102036 102036 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 606042 606042 0 0.0
RAM 204508 204508 0 0.0
lock CC3235SF_LAUNCHXL FLASH 651078 651078 0 0.0
RAM 204780 204780 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 666249 666249 0 0.0
RAM 75100 75100 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 686093 686093 0 0.0
RAM 77732 77732 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 686093 686093 0 0.0
RAM 77732 77732 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 643037 643037 0 0.0
RAM 70168 70168 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 608793 608793 0 0.0
RAM 70804 70804 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 628437 628437 0 0.0
RAM 73356 73356 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 628437 628437 0 0.0
RAM 73356 73356 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 624297 624297 0 0.0
RAM 73820 73820 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 644021 644021 0 0.0
RAM 76372 76372 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 644021 644021 0 0.0
RAM 76372 76372 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 592861 592861 0 0.0
RAM 67788 67788 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 612713 612713 0 0.0
RAM 70420 70420 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 612713 612713 0 0.0
RAM 70420 70420 0 0.0
efr32 lighting-app BRD4187C FLASH 923428 923428 0 0.0
RAM 134996 134996 0 0.0
lock-app BRD4338a FLASH 762340 762340 0 0.0
RAM 174552 174552 0 0.0
window-app BRD4187C FLASH 1012216 1012216 0 0.0
RAM 129616 129616 0 0.0
esp32 all-clusters-app c3devkit DRAM 88396 88396 0 0.0
FLASH 1467758 1467758 0 0.0
IRAM 75570 75570 0 0.0
m5stack DRAM 114868 114868 0 0.0
FLASH 1537019 1537019 0 0.0
IRAM 125403 125403 0 0.0
linux air-purifier-app debug unknown 4592 4592 0 0.0
FLASH 2529680 2529680 0 0.0
RAM 125112 125112 0 0.0
all-clusters-app debug unknown 5368 5368 0 0.0
FLASH 5581742 5581742 0 0.0
RAM 487512 487512 0 0.0
all-clusters-minimal-app debug unknown 5288 5288 0 0.0
FLASH 5051864 5051864 0 0.0
RAM 232936 232936 0 0.0
bridge-app debug unknown 5256 5256 0 0.0
FLASH 4477896 4477896 0 0.0
RAM 212832 212832 0 0.0
chip-tool debug unknown 5728 5728 0 0.0
FLASH 11693351 11693351 0 0.0
RAM 542146 542146 0 0.0
chip-tool-ipv6only arm64 unknown 19992 19992 0 0.0
FLASH 10811708 10811708 0 0.0
RAM 591072 591072 0 0.0
fabric-admin debug unknown 5592 5592 0 0.0
FLASH 10657831 10657831 0 0.0
RAM 535786 535786 0 0.0
fabric-bridge-app debug unknown 5264 5264 0 0.0
FLASH 4348440 4348440 0 0.0
RAM 204960 204960 0 0.0
lighting-app debug+rpc+ui unknown 5936 5936 0 0.0
FLASH 5373522 5373522 0 0.0
RAM 221640 221640 0 0.0
lock-app debug unknown 5192 5192 0 0.0
FLASH 4541480 4541480 0 0.0
RAM 200248 200248 0 0.0
ota-provider-app debug unknown 4576 4576 0 0.0
FLASH 4197336 4197336 0 0.0
RAM 194544 194544 0 0.0
ota-requestor-app debug unknown 4512 4512 0 0.0
FLASH 4322696 4322696 0 0.0
RAM 199168 199168 0 0.0
shell debug unknown 4112 4112 0 0.0
FLASH 2794957 2794957 0 0.0
RAM 150480 150480 0 0.0
thermostat-no-ble arm64 unknown 9184 9184 0 0.0
FLASH 4167964 4167964 0 0.0
RAM 235864 235864 0 0.0
tv-app debug unknown 5472 5472 0 0.0
FLASH 5605144 5605144 0 0.0
RAM 341800 341800 0 0.0
tv-casting-app debug unknown 5096 5096 0 0.0
FLASH 9862542 9862542 0 0.0
RAM 400024 400024 0 0.0
mbed lock-app-release cy8cproto_062_4343w FLASH 1502292 1502292 0 0.0
RAM 226656 226656 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 881272 881272 0 0.0
RAM 139693 139693 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 951804 951804 0 0.0
RAM 138121 138121 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 826824 826824 0 0.0
RAM 138591 138591 0 0.0
light-switch-app nrf52840dk_nrf52840 FLASH 786648 786648 0 0.0
RAM 132652 132652 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 931976 931976 0 0.0
RAM 130345 130345 0 0.0
lighting-app nrf52840dk_nrf52840+rpc FLASH 870884 870884 0 0.0
RAM 144403 144403 0 0.0
nrf52840dongle_nrf52840 FLASH 812664 812664 0 0.0
RAM 152408 152408 0 0.0
nrf5340dk_nrf5340_cpuapp FLASH 768400 768400 0 0.0
RAM 143209 143209 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 931976 931976 0 0.0
RAM 130345 130345 0 0.0
lock-app nrf52840dk_nrf52840 FLASH 798296 798296 0 0.0
RAM 133175 133175 0 0.0
nrf5340dk_nrf5340_cpuapp FLASH 723592 723592 0 0.0
RAM 133241 133241 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 944568 944568 0 0.0
RAM 130868 130868 0 0.0
pump-app nrf52840dk_nrf52840 FLASH 751064 751064 0 0.0
RAM 131860 131860 0 0.0
pump-controller-app nrf52840dk_nrf52840 FLASH 737676 737676 0 0.0
RAM 131659 131659 0 0.0
nxp contact k32w0+release FLASH 575996 575996 0 0.0
RAM 70024 70024 0 0.0
k32w1+release FLASH 591160 591160 0 0.0
RAM 74056 74056 0 0.0
light k32w0+release FLASH 610104 610104 0 0.0
RAM 69500 69500 0 0.0
k32w1+release FLASH 674720 674720 0 0.0
RAM 82816 82816 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1613628 1613628 0 0.0
RAM 207148 207148 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1534396 1534396 0 0.0
RAM 204052 204052 0 0.0
light cy8ckit_062s2_43012 FLASH 1461268 1461268 0 0.0
RAM 197332 197332 0 0.0
lock cy8ckit_062s2_43012 FLASH 1463124 1463124 0 0.0
RAM 224396 224396 0 0.0
qpg lighting-app qpg6105+debug FLASH 651052 651052 0 0.0
RAM 104564 104564 0 0.0
lock-app qpg6105+debug FLASH 611184 611184 0 0.0
RAM 99240 99240 0 0.0
stm32 light STM32WB5MM-DK FLASH 472456 472456 0 0.0
RAM 141652 141652 0 0.0
telink air-quality-sensor-app tlsr9528a_retention FLASH 632508 632508 0 0.0
RAM 50528 50528 0 0.0
all-clusters-app tlsr9118bdk40d FLASH 657190 657190 0 0.0
RAM 145872 145872 0 0.0
all-clusters-minimal-app tlsr9528a FLASH 777484 777484 0 0.0
RAM 110684 110684 0 0.0
bridge-app tlsr9258a FLASH 675502 675502 0 0.0
RAM 95304 95304 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 634092 634092 0 0.0
RAM 50572 50572 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a FLASH 719896 719896 0 0.0
RAM 77148 77148 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 612324 612324 0 0.0
RAM 142104 142104 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 800104 800104 0 0.0
RAM 100508 100508 0 0.0
lock-app-dfu tlsr9528a FLASH 665666 665666 0 0.0
RAM 69860 69860 0 0.0
ota-requestor-app tlsr9258a FLASH 694832 694832 0 0.0
RAM 95028 95028 0 0.0
pump-app tlsr9518adk80d FLASH 616366 616366 0 0.0
RAM 56952 56952 0 0.0
pump-controller-app tlsr9518adk80d FLASH 606750 606750 0 0.0
RAM 56752 56752 0 0.0
shell tlsr9518adk80d FLASH 466192 466192 0 0.0
RAM 72484 72484 0 0.0
smoke_co_alarm-app tlsr9528a_retention FLASH 640706 640706 0 0.0
RAM 52200 52200 0 0.0
temperature-measurement-app-mars-ota tlsr9518adk80d FLASH 650576 650576 0 0.0
RAM 60388 60388 0 0.0
thermostat tlsr9518adk80d FLASH 625640 625640 0 0.0
RAM 57084 57084 0 0.0
window-covering tlsr9118bdk40d FLASH 518872 518872 0 0.0
RAM 97800 97800 0 0.0
tizen all-clusters-app arm unknown 1584 1584 0 0.0
FLASH 1633672 1633672 0 0.0
RAM 46012 46012 0 0.0
chip-tool-ubsan arm unknown 2384 2384 0 0.0
FLASH 16119802 16119802 0 0.0
RAM 7084788 7084788 0 0.0

@QuentinCaldeira-eaton
Copy link
Contributor Author

QuentinCaldeira-eaton commented Jul 1, 2024

@QuentinCaldeira-eaton Most likely because you added #include <zephyr/net/net_if.h> to the common code without checking if Zephyr net_if usage is enabled in Matter (which in fact is not enabled for native_posix tests).

You can guard the include with #if CHIP_DEVICE_CONFIG_ENABLE_WIFI and it should help.

Seems to do the trick, thanks ! Now Darwin platform causing trouble. I don't if it's alarming or not.

@QuentinCaldeira-eaton
Copy link
Contributor Author

@Damian-Nordic, I don't understand why Darwin failed. Any idea ?

@axelnxp
Copy link
Contributor

axelnxp commented Jul 1, 2024

Hi,

Could you give us (NXP) some time to review this PR ? We are also using zephyr with matter but we don't have workflows setup yet (coming soon, we are working on it). So we just need to check if it's ok on our end.

Thanks !

@QuentinCaldeira-eaton
Copy link
Contributor Author

@axelnxp Yes, of course. Do I need to do something else or everything is okay ?

@axelnxp
Copy link
Contributor

axelnxp commented Jul 2, 2024

@QuentinCaldeira-eaton looks good to us, you can go ahead, thanks !

@QuentinCaldeira-eaton
Copy link
Contributor Author

@axelnxp Thanks ! I'm just waiting for approval. If one day you have some time, could I discuss with you about Matter with Zephyr ?

@mergify mergify bot merged commit ea235fd into project-chip:master Jul 2, 2024
68 checks passed
austina-csa pushed a commit to austina-csa/connectedhomeip that referenced this pull request Jul 10, 2024
* fix zephyr build (west)

* Use different Kconfig

In order to let the user choose his own pack of functionality. I guess BLUETOOTH shouldn't be enable by default,
because Bluetooth isn't mandatory for a Matter device

Signed-off-by: Caldeira, Quentin <[email protected]>

* Remove ZephyrSocket

Because zephyr has recvmsg now

Signed-off-by: Caldeira, Quentin <[email protected]>

* Support ip_mreq and ip_mreqn

Because Zephyr seems to not have ip_mreq, only ip_mreqn, so add an extra flag in platform config to make the choice.
This issue is only meets when doing ipv4 on a Zephyr platform

Signed-off-by: Caldeira, Quentin <[email protected]>

* Add missing functions to BLE

Signed-off-by: Caldeira, Quentin <[email protected]>

* Add specific configs and dependencies for Zephyr platform

Signed-off-by: Caldeira, Quentin <[email protected]>

* Restyled by whitespace

* Restyled by clang-format

* Restyled by gn

* Revert "Remove ZephyrSocket"

This reverts commit f283940.
Also, fix things discussed with Damian-Nordic

Signed-off-by: Caldeira, Quentin <[email protected]>

* Don't use ZephyrSocket.h

Since zephyr implement recvsg now

Signed-off-by: Caldeira, Quentin <[email protected]>

* Remove git artifact

Signed-off-by: Caldeira, Quentin <[email protected]>

* Restyled by whitespace

* Restyled by clang-format

* Re-add ZephyrSocket.h include

Signed-off-by: Caldeira, Quentin <[email protected]>

* Remove BLE Read declarations

As discussed in conversations

Signed-off-by: Caldeira, Quentin <[email protected]>

* Allow net_if only with Ethernet or Wifi connection

Signed-off-by: Caldeira, Quentin <[email protected]>

* Check if Ethernet is defined

Because all manufactures don't implement it

Signed-off-by: Caldeira, Quentin <[email protected]>

* Restyled by clang-format

---------

Signed-off-by: Caldeira, Quentin <[email protected]>
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
None yet
Development

Successfully merging this pull request may close these issues.

7 participants