Skip to content

Commit a8fe0cf

Browse files
authored
[NXP] Fixing Matter over thread support on rw61x platform (#34074)
* [NXP] Adding new GN file to reference openthread version from ot-nxp * [NXP][common] Replace Optional class with std::optional to fix BR build Signed-off-by: Gatien Chapon <gatien.chapon@nxp.com> * [NXP] Updating ot-nxp submodule version to latest NXP release Signed-off-by: Gatien Chapon <gatien.chapon@nxp.com> * [NXP][workflows] Adding thread and thread + wifi build checks Signed-off-by: Gatien Chapon <gatien.chapon@nxp.com> * [NXP][rw61x] Updating workflow to allow to indicate to checkout all nxp submodules Signed-off-by: Gatien Chapon <gatien.chapon@nxp.com> * [NXP][rw61x] Updating workflow to add --recursive submodule update option Signed-off-by: Gatien Chapon <gatien.chapon@nxp.com> --------- Signed-off-by: Gatien Chapon <gatien.chapon@nxp.com>
1 parent 102faca commit a8fe0cf

File tree

8 files changed

+38
-4
lines changed

8 files changed

+38
-4
lines changed

.github/workflows/examples-rw61x.yaml

+8-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ jobs:
4848
- name: Checkout submodules & Bootstrap
4949
uses: ./.github/actions/checkout-submodules-and-bootstrap
5050
with:
51-
platform: rw61x
51+
platform: nxp
52+
extra-submodule-parameters: --recursive
5253

5354
- name: Set up environment for size reports
5455
uses: ./.github/actions/setup-size-reports
@@ -61,6 +62,8 @@ jobs:
6162
scripts/run_in_build_env.sh "\
6263
./scripts/build/build_examples.py \
6364
--target rw61x-all-clusters-app-wifi \
65+
--target rw61x-all-clusters-app-thread \
66+
--target rw61x-all-clusters-app-thread-wifi \
6467
build \
6568
--copy-artifacts-to out/artifacts \
6669
"
@@ -70,6 +73,8 @@ jobs:
7073
scripts/run_in_build_env.sh "\
7174
./scripts/build/build_examples.py \
7275
--target rw61x-thermostat-wifi \
76+
--target rw61x-thermostat-thread \
77+
--target rw61x-thermostat-thread-wifi \
7378
build \
7479
--copy-artifacts-to out/artifacts \
7580
"
@@ -79,6 +84,8 @@ jobs:
7984
scripts/run_in_build_env.sh "\
8085
./scripts/build/build_examples.py \
8186
--target rw61x-laundry-washer-wifi \
87+
--target rw61x-laundry-washer-thread \
88+
--target rw61x-laundry-washer-thread-wifi \
8289
build \
8390
--copy-artifacts-to out/artifacts \
8491
"

examples/all-clusters-app/nxp/rt/rw61x/.gn

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ default_args = {
2828

2929
import("//args.gni")
3030

31+
# Import common example GN args
32+
import("${chip_root}/examples/platform/nxp/common/gn/args.gni")
33+
3134
# Import default platform configs
3235
import("${chip_root}/src/platform/nxp/rt/rw61x/args.gni")
3336
}

examples/laundry-washer-app/nxp/rt/rw61x/.gn

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ default_args = {
2828

2929
import("//args.gni")
3030

31+
# Import common example GN args
32+
import("${chip_root}/examples/platform/nxp/common/gn/args.gni")
33+
3134
# Import default platform configs
3235
import("${chip_root}/src/platform/nxp/rt/rw61x/args.gni")
3336
}
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright (c) 2024 Project CHIP Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
openthread_root =
16+
"//third_party/connectedhomeip/third_party/openthread/ot-nxp/openthread"

examples/thermostat/nxp/rt/rw61x/.gn

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ default_args = {
2828

2929
import("//args.gni")
3030

31+
# Import common example GN args
32+
import("${chip_root}/examples/platform/nxp/common/gn/args.gni")
33+
3134
# Import default platform configs
3235
import("${chip_root}/src/platform/nxp/rt/rw61x/args.gni")
3336
}

scripts/build/builders/rw61x.py

+2
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ def GnBuildArgs(self):
9999

100100
if self.enable_thread:
101101
args.append('chip_enable_openthread=true chip_inet_config_enable_ipv4=false')
102+
if self.enable_wifi:
103+
args.append('openthread_root=\"//third_party/connectedhomeip/third_party/openthread/ot-nxp/openthread-br\"')
102104

103105
if self.enable_factory_data:
104106
args.append('chip_with_factory_data=1')

src/platform/nxp/common/DnssdImpl.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ CHIP_ERROR FromSrpCacheToMdnsData(const otSrpServerService * service, const otSr
440440
mdnsService.mInterface = ConnectivityManagerImpl().GetThreadInterface();
441441

442442
mdnsService.mAddressType = Inet::IPAddressType::kIPv6;
443-
mdnsService.mAddress = MakeOptional(ToIPAddress(*ip6AddrPtr));
443+
mdnsService.mAddress = std::optional(ToIPAddress(*ip6AddrPtr));
444444

445445
// Extract TXT record SRP service
446446
txtStringPtr = otSrpServerServiceGetTxtData(service, &txtDataLen);
@@ -547,7 +547,7 @@ CHIP_ERROR FromOtDnsResponseToMdnsData(otDnsServiceInfo & serviceInfo, const cha
547547
if (!otIp6IsAddressUnspecified(&serviceInfo.mHostAddress))
548548
{
549549
mdnsService.mAddressType = Inet::IPAddressType::kIPv6;
550-
mdnsService.mAddress = MakeOptional(ToIPAddress(serviceInfo.mHostAddress));
550+
mdnsService.mAddress = std::optional(ToIPAddress(serviceInfo.mHostAddress));
551551
}
552552

553553
// Check if TXT record was included in DNS response.

third_party/openthread/ot-nxp

Submodule ot-nxp updated 62 files

0 commit comments

Comments
 (0)