Skip to content

Commit 8b4e0aa

Browse files
Merge branch 'project-chip:master' into RefreshKeySender-Add-API
2 parents e906c09 + f25f635 commit 8b4e0aa

File tree

15 files changed

+143
-62
lines changed

15 files changed

+143
-62
lines changed

.github/workflows/examples-nxp.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
if: github.actor != 'restyled-io[bot]'
4141

4242
container:
43-
image: ghcr.io/project-chip/chip-build-nxp:94
43+
image: ghcr.io/project-chip/chip-build-nxp:96
4444
volumes:
4545
- "/tmp/bloat_reports:/tmp/bloat_reports"
4646
steps:
@@ -203,7 +203,6 @@ jobs:
203203
scripts/run_in_build_env.sh "\
204204
./scripts/build/build_examples.py \
205205
--target nxp-rw61x-freertos-all-clusters-wifi \
206-
--target nxp-rw61x-freertos-all-clusters-wifi-ota-cmake \
207206
build \
208207
--copy-artifacts-to out/artifacts \
209208
"

.github/workflows/tests.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ jobs:
185185
src/app/zap-templates/zcl/data-model/chip/software-diagnostics-cluster.xml \
186186
src/app/zap-templates/zcl/data-model/chip/switch-cluster.xml \
187187
src/app/zap-templates/zcl/data-model/chip/target-navigator-cluster.xml \
188+
src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml \
188189
src/app/zap-templates/zcl/data-model/chip/temperature-measurement-cluster.xml \
189190
src/app/zap-templates/zcl/data-model/chip/test-cluster.xml \
190191
src/app/zap-templates/zcl/data-model/chip/thermostat-user-interface-configuration-cluster.xml \

examples/thermostat/nxp/rt/rt1060/BUILD.gn

+5-10
Original file line numberDiff line numberDiff line change
@@ -212,18 +212,10 @@ rt_executable("thermostat") {
212212
}
213213

214214
if (chip_enable_ota_requestor) {
215+
include_dirs += [ "${common_example_dir}/ota_requestor/include" ]
215216
sources += [
216-
"${chip_root}/examples/platform/nxp/common/mcuboot_app_support/flash_partitioning.h",
217217
"${common_example_dir}/ota_requestor/source/OTARequestorInitiator.cpp",
218218
"${common_example_dir}/ota_requestor/source/OTARequestorInitiatorCommon.cpp",
219-
220-
#Adding mcuboot files
221-
"${chip_root}/examples/platform/nxp/common/mcuboot_app_support/mcuboot_app_support.c",
222-
"${chip_root}/examples/platform/nxp/common/mcuboot_app_support/mcuboot_app_support.h",
223-
]
224-
include_dirs += [
225-
"$${common_example_dir}/ota_requestor/include",
226-
"${chip_root}/examples/platform/nxp/common/mcuboot_app_support",
227219
]
228220
}
229221

@@ -291,6 +283,9 @@ rt_executable("thermostat") {
291283
"-Wl,--no-warn-rwx-segments",
292284
]
293285

286+
if (evkname == "evkcmimxrt1060") {
287+
ldflags += [ "-Wl,--defsym=gEVKCFlashSize_d=0x1000000" ]
288+
}
294289
if (enable_ota_provider) {
295290
# As the OTA file will be stored in the littlefs file system, it is required to increase the size of the file system
296291
# To be able to store an OTA file with a MAX size of 640K,
@@ -305,7 +300,7 @@ rt_executable("thermostat") {
305300
# we would need to reserve enough space for the bootloader (MCUBoot)
306301
# MCUBoot requires 0x11000 Bytes to be reserved at the base of the flash
307302
# Consequently, some sections will need to be shifted
308-
ldflags += [ "-Wl,--defsym=__mcu_boot_size__=0x11000" ]
303+
ldflags += [ "-Wl,--defsym=__m_mcuboot_size__=0x40000" ]
309304
}
310305

311306
output_dir = root_out_dir

src/platform/nxp/common/ConnectivityManagerImpl.cpp

-11
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,6 @@ using namespace ::chip::System;
7575
using namespace ::chip::DeviceLayer::Internal;
7676
using namespace ::chip::DeviceLayer::DeviceEventType;
7777

78-
#if !SDK_2_16_100
79-
// Table 9-50 "Status codes" of IEEE 802.11-2020: Unspecified failure
80-
// Temporary default status code before SDK API to map wlan_event_reason to IEEE Status codes
81-
#define WLAN_REFUSED_REASON_UNSPECIFIED 1
82-
#endif
83-
8478
namespace chip {
8579
namespace DeviceLayer {
8680

@@ -244,12 +238,7 @@ void ConnectivityManagerImpl::ProcessWlanEvent(enum wlan_event_reason wlanEvent)
244238
WiFiDiagnosticsDelegate * delegate = GetDiagnosticDataProvider().GetWiFiDiagnosticsDelegate();
245239
uint8_t associationFailureCause =
246240
chip::to_underlying(chip::app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum::kUnknown);
247-
248-
#if SDK_2_16_100
249241
uint16_t wlan_status_code = wlan_get_status_code(wlanEvent);
250-
#else
251-
uint16_t wlan_status_code = WLAN_REFUSED_REASON_UNSPECIFIED;
252-
#endif
253242

254243
#if CHIP_DETAIL_LOGGING
255244
enum wlan_connection_state state;

src/platform/nxp/common/DiagnosticDataProviderImpl.h

+2-6
Original file line numberDiff line numberDiff line change
@@ -67,20 +67,16 @@ class DiagnosticDataProviderImpl : public DiagnosticDataProvider
6767
CHIP_ERROR GetWiFiPacketMulticastTxCount(uint32_t & packetMulticastTxCount) override;
6868
CHIP_ERROR GetWiFiPacketUnicastTxCount(uint32_t & packetUnicastTxCount) override;
6969
CHIP_ERROR ResetWiFiNetworkDiagnosticsCounts() override;
70-
#if SDK_2_16_100
7170
CHIP_ERROR GetWiFiOverrunCount(uint64_t & overrunCount) override;
7271
CHIP_ERROR GetWiFiPacketUnicastRxCount(uint32_t & packetUnicastTxCount) override;
73-
#endif
7472

7573
uint32_t mBeaconRxCount = 0;
7674
uint32_t mBeaconLostCount = 0;
7775
uint32_t mPacketMulticastRxCount = 0;
7876
uint32_t mPacketMulticastTxCount = 0;
7977
uint32_t mPacketUnicastTxCount = 0;
80-
#if SDK_2_16_100
81-
uint32_t mPacketUnicastRxCount = 0;
82-
uint64_t mOverrunCount = 0;
83-
#endif
78+
uint32_t mPacketUnicastRxCount = 0;
79+
uint64_t mOverrunCount = 0;
8480
#endif /* CHIP_DEVICE_CONFIG_ENABLE_WPA */
8581
};
8682

src/platform/nxp/common/NXPConfigNVS.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@
2121
#include <platform/CHIPDeviceError.h>
2222
#include <platform/internal/testing/ConfigUnitTest.h>
2323
#include <platform/nxp/common/CHIPDeviceNXPPlatformDefaultConfig.h>
24+
25+
extern "C" {
2426
#include <settings.h>
27+
}
2528

2629
/* Only for flash init, to be move to sdk framework */
2730
#include "nvs_port.h"

src/platform/nxp/common/ble/BLEManagerCommon.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@
4949
#include <setup_payload/AdditionalDataPayloadGenerator.h>
5050
#endif
5151

52+
// Temporarily keep backwards compatibility. To be removed
53+
#ifndef CONFIG_CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_TIMEOUT
54+
#define CONFIG_CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_TIMEOUT CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_TIMEOUT
55+
#endif
56+
5257
/*******************************************************************************
5358
* Local data types
5459
*******************************************************************************/

src/platform/nxp/k32w0/KeyValueStoreManagerImpl.cpp

-20
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,6 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Get(const char * key, void * value, size_t
172172
err = GetValStorage(key)->Read(pdmInternalId, 0, (uint8_t *) value, &valueSize);
173173
*read_bytes_size = valueSize;
174174
}
175-
else
176-
{
177-
ChipLogProgress(DeviceLayer, "KVS key [%s] not found in persistent storage.", key);
178-
}
179175

180176
exit:
181177
ConvertError(err);
@@ -214,16 +210,8 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Put(const char * key, const void * value,
214210
ChipLogProgress(DeviceLayer, "KVS key: set [%s][%i][%s]", key, pdmInternalId, GetKeyStorage(key)->GetName());
215211

216212
err = GetKeyStorage(key)->Write(pdmInternalId, (uint8_t *) key, strlen(key) + 1);
217-
if (err != CHIP_NO_ERROR)
218-
{
219-
ChipLogProgress(DeviceLayer, "KVS key: error when setting [%s][%i]", key, pdmInternalId);
220-
}
221213
}
222214
}
223-
else
224-
{
225-
ChipLogProgress(DeviceLayer, "KVS val: error when setting [%s][%i]", key, pdmInternalId);
226-
}
227215

228216
exit:
229217
ConvertError(err);
@@ -255,14 +243,6 @@ CHIP_ERROR KeyValueStoreManagerImpl::_Delete(const char * key)
255243
ChipLogProgress(DeviceLayer, "KVS val: del [%s][%i][%s]", key, pdmInternalId, GetValStorage(key)->GetName());
256244

257245
err = GetValStorage(key)->Delete(pdmInternalId, -1);
258-
if (err != CHIP_NO_ERROR)
259-
{
260-
ChipLogProgress(DeviceLayer, "KVS val: error when deleting [%s][%i]", key, pdmInternalId);
261-
}
262-
}
263-
else
264-
{
265-
ChipLogProgress(DeviceLayer, "KVS key: error when deleting [%s][%i]", key, pdmInternalId);
266246
}
267247
}
268248
exit:

src/python_testing/TC_TCTL_2_3.py

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
#
2+
# Copyright (c) 2024 Project CHIP Authors
3+
# All rights reserved.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# === BEGIN CI TEST ARGUMENTS ===
18+
# test-runner-runs:
19+
# run1:
20+
# app: ${ALL_CLUSTERS_APP}
21+
# app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json
22+
# script-args: >
23+
# --storage-path admin_storage.json
24+
# --commissioning-method on-network
25+
# --discriminator 1234
26+
# --passcode 20202021
27+
# --endpoint 1
28+
# --trace-to json:${TRACE_TEST_JSON}.json
29+
# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto
30+
# --PICS src/app/tests/suites/certification/ci-pics-values
31+
# factory-reset: true
32+
# quiet: true
33+
# === END CI TEST ARGUMENTS ===
34+
35+
import chip.clusters as Clusters
36+
from chip.testing.matter_testing import MatterBaseTest, TestStep, default_matter_test_main, has_feature, run_if_endpoint_matches
37+
from mobly import asserts
38+
39+
40+
class TC_TCTL_2_3(MatterBaseTest):
41+
def desc_TC_TCTL_2_3(self) -> str:
42+
return "[TC-TCTL-2.3] Optional temperature level attributes with DUT as Server"
43+
44+
def pics_TC_TCTL_2_3(self):
45+
"""Return the PICS definitions associated with this test."""
46+
pics = [
47+
"TCTL.S", # Temperature Control as a Server
48+
"TCTL.S.F01", # Does a device support temperature level feature
49+
]
50+
return pics
51+
52+
def steps_TC_TCTL_2_3(self) -> list[TestStep]:
53+
steps = [
54+
TestStep(1, "Commissioning, already done", is_commissioning=True),
55+
TestStep(2, "TH reads from the DUT the SelectedTemperatureLevel attribute",
56+
"Verify that the DUT response contains the value of _SelectedTemperatureLevel_ with a range of 0 to 31"),
57+
TestStep(3, "TH reads from the DUT the SupportedTemperatureLevels attribute and verifies string lengths",
58+
("Verify that the DUT response contains a _SupportedTemperatureLevels_ list\n\n"
59+
"* List length has to be equal or less than 32 \n"
60+
"* Each temperature level should be a string\n"
61+
"* Length of each temperature level string has to be equal or less than 16\n")),
62+
]
63+
return steps
64+
65+
@run_if_endpoint_matches(has_feature(Clusters.TemperatureControl, Clusters.TemperatureControl.Bitmaps.Feature.kTemperatureLevel))
66+
async def test_TC_TCTL_2_3(self):
67+
self.endpoint = self.get_endpoint()
68+
cluster = Clusters.TemperatureControl
69+
attributes = cluster.Attributes
70+
self.step(1)
71+
72+
# Step 2: Read SelectedTemperatureLevel attribute
73+
self.step(2)
74+
selected_temp = await self.read_single_attribute_check_success(
75+
cluster=cluster,
76+
attribute=attributes.SelectedTemperatureLevel
77+
)
78+
asserts.assert_true(0 <= selected_temp <= 31,
79+
f"SelectedTemperatureLevel {selected_temp} is out of range [0-31]")
80+
81+
# Step 3: Read SupportedTemperatureLevels attribute
82+
self.step(3)
83+
supported_temps = await self.read_single_attribute_check_success(
84+
cluster=cluster,
85+
attribute=attributes.SupportedTemperatureLevels
86+
)
87+
asserts.assert_true(isinstance(supported_temps, list),
88+
"SupportedTemperatureLevels should be a list")
89+
asserts.assert_true(len(supported_temps) <= 32,
90+
f"SupportedTemperatureLevels list length {len(supported_temps)} exceeds maximum of 32")
91+
92+
# Verify string lengths
93+
for level in supported_temps:
94+
asserts.assert_true(isinstance(level, str),
95+
f"Temperature level {level} is not a string")
96+
asserts.assert_true(len(level) <= 16,
97+
f"Temperature level string '{level}' exceeds maximum length of 16")
98+
99+
100+
if __name__ == "__main__":
101+
default_matter_test_main()

third_party/nxp/nxp_matter_support

Submodule nxp_matter_support updated 38 files

third_party/openthread/ot-nxp

Submodule ot-nxp updated 96 files

third_party/openthread/platforms/nxp/mcxw71_k32w1/BUILD.gn

+11-11
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import("${nxp_sdk_build_root}/nxp_sdk.gni")
2424
openthread_nxp_root = "${chip_root}/third_party/openthread/ot-nxp"
2525

2626
config("openthread_k32w1_config") {
27-
include_dirs = [ "${openthread_nxp_root}/src/k32w1/k32w1" ]
27+
include_dirs = [ "${openthread_nxp_root}/src/k32w1" ]
2828

2929
defines = [
3030
"OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE=1",
@@ -59,8 +59,8 @@ config("openthread_k32w1_config") {
5959

6060
source_set("openthread_core_config_k32w1") {
6161
sources = [
62-
"${openthread_nxp_root}/src/k32w1/k32w1/openthread-core-k32w1-config-check.h",
63-
"${openthread_nxp_root}/src/k32w1/k32w1/openthread-core-k32w1-config.h",
62+
"${openthread_nxp_root}/src/k32w1/openthread-core-k32w1-config-check.h",
63+
"${openthread_nxp_root}/src/k32w1/openthread-core-k32w1-config.h",
6464
]
6565

6666
public_configs = [ ":openthread_k32w1_config" ]
@@ -72,14 +72,14 @@ source_set("openthread_core_config_k32w1") {
7272
source_set("libopenthread-k32w1") {
7373
sources = [
7474
"${openthread_nxp_root}/src/common/crypto.c",
75-
"${openthread_nxp_root}/src/k32w1/k32w1/alarm.c",
76-
"${openthread_nxp_root}/src/k32w1/k32w1/diag.c",
77-
"${openthread_nxp_root}/src/k32w1/k32w1/entropy.c",
78-
"${openthread_nxp_root}/src/k32w1/k32w1/logging.c",
79-
"${openthread_nxp_root}/src/k32w1/k32w1/misc.c",
80-
"${openthread_nxp_root}/src/k32w1/k32w1/radio.c",
81-
"${openthread_nxp_root}/src/k32w1/k32w1/system.c",
82-
"${openthread_nxp_root}/src/k32w1/k32w1/uart.c",
75+
"${openthread_nxp_root}/src/k32w1/alarm.c",
76+
"${openthread_nxp_root}/src/k32w1/diag.c",
77+
"${openthread_nxp_root}/src/k32w1/entropy.c",
78+
"${openthread_nxp_root}/src/k32w1/logging.c",
79+
"${openthread_nxp_root}/src/k32w1/misc.c",
80+
"${openthread_nxp_root}/src/k32w1/radio.c",
81+
"${openthread_nxp_root}/src/k32w1/system.c",
82+
"${openthread_nxp_root}/src/k32w1/uart.c",
8383
]
8484

8585
if (chip_crypto == "platform") {

third_party/openthread/platforms/nxp/rt/rt1060/BUILD.gn

+4
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ config("openthread_rt1060_config") {
5555
"OPENTHREAD_CONFIG_MULTICAST_DNS_ENABLE=1",
5656
"OPENTHREAD_CONFIG_MULTICAST_DNS_PUBLIC_API_ENABLE=1",
5757
"OT_APP_BR_LWIP_HOOKS_EN=1",
58+
"OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE=1",
59+
"OPENTHREAD_CONFIG_DNS_UPSTREAM_QUERY_ENABLE=1",
5860
]
5961

6062
if (nxp_enable_matter_cli) {
@@ -95,10 +97,12 @@ source_set("libopenthread-rt1060") {
9597
sources += [
9698
"${openthread_nxp_root}/src/common/br/border_agent.c",
9799
"${openthread_nxp_root}/src/common/br/br_rtos_manager.c",
100+
"${openthread_nxp_root}/src/common/br/dns_upstream_resolver.c",
98101
"${openthread_nxp_root}/src/common/br/infra_if.c",
99102
"${openthread_nxp_root}/src/common/br/lwip_hooks.c",
100103
"${openthread_nxp_root}/src/common/br/lwip_mcast.c",
101104
"${openthread_nxp_root}/src/common/br/mdns_socket.c",
105+
"${openthread_nxp_root}/src/common/br/trel_plat.c",
102106
"${openthread_nxp_root}/src/common/br/udp_plat.c",
103107
"${openthread_nxp_root}/src/common/br/utils.c",
104108
]

third_party/openthread/platforms/nxp/rt/rt1170/BUILD.gn

+4
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ config("openthread_rt1170_config") {
5454
"OPENTHREAD_CONFIG_MULTICAST_DNS_ENABLE=1",
5555
"OPENTHREAD_CONFIG_MULTICAST_DNS_PUBLIC_API_ENABLE=1",
5656
"OT_APP_BR_LWIP_HOOKS_EN=1",
57+
"OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE=1",
58+
"OPENTHREAD_CONFIG_DNS_UPSTREAM_QUERY_ENABLE=1",
5759
]
5860

5961
if (nxp_enable_matter_cli) {
@@ -93,10 +95,12 @@ source_set("libopenthread-rt1170") {
9395
sources += [
9496
"${openthread_nxp_root}/src/common/br/border_agent.c",
9597
"${openthread_nxp_root}/src/common/br/br_rtos_manager.c",
98+
"${openthread_nxp_root}/src/common/br/dns_upstream_resolver.c",
9699
"${openthread_nxp_root}/src/common/br/infra_if.c",
97100
"${openthread_nxp_root}/src/common/br/lwip_hooks.c",
98101
"${openthread_nxp_root}/src/common/br/lwip_mcast.c",
99102
"${openthread_nxp_root}/src/common/br/mdns_socket.c",
103+
"${openthread_nxp_root}/src/common/br/trel_plat.c",
100104
"${openthread_nxp_root}/src/common/br/udp_plat.c",
101105
"${openthread_nxp_root}/src/common/br/utils.c",
102106
]

third_party/openthread/platforms/nxp/rt/rw61x/BUILD.gn

+4
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ config("openthread_rw61x_config") {
5656
"OPENTHREAD_CONFIG_DNSSD_DISCOVERY_PROXY_ENABLE=1",
5757
"OPENTHREAD_CONFIG_MULTICAST_DNS_ENABLE=1",
5858
"OPENTHREAD_CONFIG_MULTICAST_DNS_PUBLIC_API_ENABLE=1",
59+
"OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE=1",
5960
"OT_APP_BR_LWIP_HOOKS_EN=1",
61+
"OPENTHREAD_CONFIG_DNS_UPSTREAM_QUERY_ENABLE=1",
6062
]
6163

6264
if (nxp_enable_matter_cli) {
@@ -91,10 +93,12 @@ source_set("libopenthread-rw61x") {
9193
sources += [
9294
"${openthread_nxp_root}/src/common/br/border_agent.c",
9395
"${openthread_nxp_root}/src/common/br/br_rtos_manager.c",
96+
"${openthread_nxp_root}/src/common/br/dns_upstream_resolver.c",
9497
"${openthread_nxp_root}/src/common/br/infra_if.c",
9598
"${openthread_nxp_root}/src/common/br/lwip_hooks.c",
9699
"${openthread_nxp_root}/src/common/br/lwip_mcast.c",
97100
"${openthread_nxp_root}/src/common/br/mdns_socket.c",
101+
"${openthread_nxp_root}/src/common/br/trel_plat.c",
98102
"${openthread_nxp_root}/src/common/br/udp_plat.c",
99103
"${openthread_nxp_root}/src/common/br/utils.c",
100104
]

0 commit comments

Comments
 (0)