Skip to content

Commit 91a1512

Browse files
Merge branch 'master' into TC-CC-2_1
2 parents b2fc6e2 + 59c205c commit 91a1512

File tree

302 files changed

+10788
-1737
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

302 files changed

+10788
-1737
lines changed

.github/workflows/examples-nxp.yaml

+1-1
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:119
43+
image: ghcr.io/project-chip/chip-build-nxp:120
4444
volumes:
4545
- "/tmp/bloat_reports:/tmp/bloat_reports"
4646
steps:

.github/workflows/tests.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ jobs:
200200
src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster.xml \
201201
src/app/zap-templates/zcl/data-model/chip/timer-cluster.xml \
202202
src/app/zap-templates/zcl/data-model/chip/tls-certificate-management-cluster.xml \
203+
src/app/zap-templates/zcl/data-model/chip/tls-client-management-cluster.xml \
203204
src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml \
204205
src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml \
205206
src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml \

config/esp32/args.gni

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ lwip_platform = "external"
2929
chip_inet_config_enable_tcp_endpoint = false
3030
chip_inet_config_enable_udp_endpoint = true
3131

32+
chip_config_memory_management = "platform"
33+
3234
custom_toolchain = "//third_party/connectedhomeip/config/esp32/toolchain:esp32"
3335

3436
# Avoid constraint forcing for ESP32:

config/esp32/components/chip/CMakeLists.txt

+8
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,14 @@ if(CONFIG_ENABLE_ICD_SERVER)
149149
endif()
150150
endif()
151151

152+
if(CONFIG_CHIP_MEM_ALLOC_MODE_INTERNAL)
153+
chip_gn_arg_append("chip_memory_alloc_mode" "\"internal\"")
154+
elseif(CONFIG_CHIP_MEM_ALLOC_MODE_EXTERNAL)
155+
chip_gn_arg_append("chip_memory_alloc_mode" "\"external\"")
156+
elseif(CONFIG_CHIP_MEM_ALLOC_MODE_DEFAULT)
157+
chip_gn_arg_append("chip_memory_alloc_mode" "\"default\"")
158+
endif()
159+
152160
if(CONFIG_ENABLE_PW_RPC)
153161
string(APPEND chip_gn_args "import(\"//build_overrides/pigweed.gni\")\n")
154162
chip_gn_arg_append("remove_default_configs" "[\"//third_party/connectedhomeip/third_party/pigweed/repo/pw_build:toolchain_cpp_standard\"]")

config/esp32/components/chip/Kconfig

+21
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,27 @@ menu "CHIP Core"
191191
Enable dynamic server to handle a different interaction model dispatch.
192192
Can be implied when users do not want to use the same server clusters.
193193

194+
choice CHIP_MEM_ALLOC_MODE
195+
prompt "Memory allocation strategy"
196+
default CHIP_MEM_ALLOC_MODE_DEFAULT
197+
help
198+
Strategy for Matter memory management
199+
- Internal DRAM memory only
200+
- External SPIRAM memory only
201+
- Either internal or external memory based on default malloc() behavior in ESP-IDF
202+
203+
config CHIP_MEM_ALLOC_MODE_INTERNAL
204+
bool "Internal memory"
205+
206+
config CHIP_MEM_ALLOC_MODE_EXTERNAL
207+
bool "External SPIRAM"
208+
depends on SPIRAM_USE_CAPS_ALLOC || SPIRAM_USE_MALLOC
209+
210+
config CHIP_MEM_ALLOC_MODE_DEFAULT
211+
bool "Default alloc mode"
212+
213+
endchoice # CHIP_MEM_ALLOC_MODE
214+
194215
endmenu # "General Options"
195216

196217
menu "Networking Options"

docs/ids_and_codes/ERROR_CODES.md

+2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@ This file was **AUTOMATICALLY** generated by
5656
| 38 | 0x26 | `CHIP_ERROR_WRONG_TLV_TYPE` |
5757
| 39 | 0x27 | `CHIP_ERROR_TLV_CONTAINER_OPEN` |
5858
| 40 | 0x28 | `CHIP_ERROR_IN_USE` |
59+
| 41 | 0x29 | `CHIP_ERROR_HAD_FAILURES` |
5960
| 42 | 0x2A | `CHIP_ERROR_INVALID_MESSAGE_TYPE` |
6061
| 43 | 0x2B | `CHIP_ERROR_UNEXPECTED_TLV_ELEMENT` |
62+
| 44 | 0x2C | `CHIP_ERROR_ALREADY_INITIALIZED` |
6163
| 45 | 0x2D | `CHIP_ERROR_NOT_IMPLEMENTED` |
6264
| 46 | 0x2E | `CHIP_ERROR_INVALID_ADDRESS` |
6365
| 47 | 0x2F | `CHIP_ERROR_INVALID_ARGUMENT` |

docs/ids_and_codes/zap_clusters.md

+1
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ Generally regenerate using one of:
140140
| 1872 | 0x750 | EcosystemInformation |
141141
| 1873 | 0x751 | CommissionerControl |
142142
| 2049 | 0x801 | TlsCertificateManagement |
143+
| 2050 | 0x802 | TlsClientManagement |
143144
| 4294048773 | 0xFFF1FC05 | UnitTesting |
144145
| 4294048774 | 0xFFF1FC06 | FaultInjection |
145146
| 4294048800 | 0xFFF1FC20 | SampleMei |

examples/air-purifier-app/air-purifier-common/air-purifier-app.matter

+4-4
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 {
213213
}
214214

215215
enum ThreeLevelAutoEnum : enum8 {
216-
kLow = 0;
217-
kMedium = 1;
218-
kHigh = 2;
219-
kAutomatic = 3;
216+
kAuto = 0;
217+
kLow = 1;
218+
kMedium = 2;
219+
kHigh = 3;
220220
}
221221

222222
bitmap TestGlobalBitmap : bitmap32 {

examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter

+4-4
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 {
213213
}
214214

215215
enum ThreeLevelAutoEnum : enum8 {
216-
kLow = 0;
217-
kMedium = 1;
218-
kHigh = 2;
219-
kAutomatic = 3;
216+
kAuto = 0;
217+
kLow = 1;
218+
kMedium = 2;
219+
kHigh = 3;
220220
}
221221

222222
bitmap TestGlobalBitmap : bitmap32 {

examples/all-clusters-app/all-clusters-common/all-clusters-app.matter

+7-7
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 {
213213
}
214214

215215
enum ThreeLevelAutoEnum : enum8 {
216-
kLow = 0;
217-
kMedium = 1;
218-
kHigh = 2;
219-
kAutomatic = 3;
216+
kAuto = 0;
217+
kLow = 1;
218+
kMedium = 2;
219+
kHigh = 3;
220220
}
221221

222222
bitmap TestGlobalBitmap : bitmap32 {
@@ -5300,7 +5300,7 @@ cluster WindowCovering = 258 {
53005300

53015301
/** An interface for configuring and controlling pumps. */
53025302
cluster PumpConfigurationAndControl = 512 {
5303-
revision 3;
5303+
revision 4;
53045304

53055305
enum ControlModeEnum : enum8 {
53065306
kConstantSpeed = 0;
@@ -7024,7 +7024,7 @@ provisional cluster Chime = 1366 {
70247024
}
70257025

70267026
readonly attribute ChimeSoundStruct installedChimeSounds[] = 0;
7027-
attribute int8u activeChimeID = 1;
7027+
attribute int8u selectedChime = 1;
70287028
attribute boolean enabled = 2;
70297029
readonly attribute command_id generatedCommandList[] = 65528;
70307030
readonly attribute command_id acceptedCommandList[] = 65529;
@@ -9315,7 +9315,7 @@ endpoint 1 {
93159315

93169316
server cluster Chime {
93179317
callback attribute installedChimeSounds;
9318-
callback attribute activeChimeID;
9318+
callback attribute selectedChime;
93199319
callback attribute enabled;
93209320
callback attribute generatedCommandList;
93219321
callback attribute acceptedCommandList;

examples/all-clusters-app/all-clusters-common/all-clusters-app.zap

+1-1
Original file line numberDiff line numberDiff line change
@@ -20994,7 +20994,7 @@
2099420994
"reportableChange": 0
2099520995
},
2099620996
{
20997-
"name": "ActiveChimeID",
20997+
"name": "SelectedChime",
2099820998
"code": 1,
2099920999
"mfgCode": null,
2100021000
"side": "server",

examples/all-clusters-app/all-clusters-common/src/chime-instance.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@ CHIP_ERROR ChimeCommandDelegate::GetChimeSoundByIndex(uint8_t chimeIndex, uint8_
4343
return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED;
4444
}
4545
auto & selectedChime = supportedChimes[chimeIndex];
46-
chip::CopyCharSpanToMutableCharSpan(selectedChime.name, name);
47-
chimeID = selectedChime.chimeID;
48-
return CHIP_NO_ERROR;
46+
chimeID = selectedChime.chimeID;
47+
return chip::CopyCharSpanToMutableCharSpan(selectedChime.name, name);
4948
}
5049

5150
CHIP_ERROR ChimeCommandDelegate::GetChimeIDByIndex(uint8_t chimeIndex, uint8_t & chimeID)

examples/all-clusters-app/nxp/rt/rt1060/BUILD.gn

+15
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,25 @@ rt_sdk("sdk") {
7676
sources += [ "${example_platform_dir}/board/${evkname}/pin_mux.c" ]
7777
}
7878

79+
if (iw416_transceiver || w8801_transceiver || iwx12_transceiver) {
80+
if (evkname == "evkmimxrt1060") {
81+
include_dirs += [ "${example_platform_dir}/board/evkbmimxrt1060/" ]
82+
sources +=
83+
[ "${example_platform_dir}/board/evkbmimxrt1060/sdmmc_config.c" ]
84+
sources +=
85+
[ "${example_platform_dir}/board/evkbmimxrt1060/wifi_bt_config.c" ]
86+
} else {
87+
include_dirs += [ "${example_platform_dir}/board/${evkname}/" ]
88+
sources += [ "${example_platform_dir}/board/${evkname}/sdmmc_config.c" ]
89+
sources += [ "${example_platform_dir}/board/${evkname}/wifi_bt_config.c" ]
90+
}
91+
}
92+
7993
sources += [ "${example_platform_dir}/board/hardware_init.c" ]
8094
sources += [ "${example_platform_dir}/board/clock_config.c" ]
8195
sources += [ "${example_platform_dir}/board/board.c" ]
8296
sources += [ "${example_platform_dir}/board/peripherals.c" ]
97+
sources += [ "${example_platform_dir}/board/board_comp.c" ]
8398

8499
# Indicate the path to CHIPProjectConfig.h
85100
include_dirs += [ "include/config" ]

examples/all-clusters-app/nxp/rt/rt1170/BUILD.gn

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ rt_sdk("sdk") {
6868
sources += [ "${example_platform_dir}/board/board.c" ]
6969
sources += [ "${example_platform_dir}/board/peripherals.c" ]
7070
sources += [ "${example_platform_dir}/board/sdmmc_config.c" ]
71+
sources += [ "${example_platform_dir}/board/wifi_bt_config.c" ]
7172

7273
# Indicate the path to CHIPProjectConfig.h
7374
include_dirs += [ "include/config" ]

examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter

+5-5
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 {
213213
}
214214

215215
enum ThreeLevelAutoEnum : enum8 {
216-
kLow = 0;
217-
kMedium = 1;
218-
kHigh = 2;
219-
kAutomatic = 3;
216+
kAuto = 0;
217+
kLow = 1;
218+
kMedium = 2;
219+
kHigh = 3;
220220
}
221221

222222
bitmap TestGlobalBitmap : bitmap32 {
@@ -3712,7 +3712,7 @@ cluster WindowCovering = 258 {
37123712

37133713
/** An interface for configuring and controlling pumps. */
37143714
cluster PumpConfigurationAndControl = 512 {
3715-
revision 3;
3715+
revision 4;
37163716

37173717
enum ControlModeEnum : enum8 {
37183718
kConstantSpeed = 0;

examples/bridge-app/bridge-common/bridge-app.matter

+4-4
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 {
213213
}
214214

215215
enum ThreeLevelAutoEnum : enum8 {
216-
kLow = 0;
217-
kMedium = 1;
218-
kHigh = 2;
219-
kAutomatic = 3;
216+
kAuto = 0;
217+
kLow = 1;
218+
kMedium = 2;
219+
kHigh = 3;
220220
}
221221

222222
bitmap TestGlobalBitmap : bitmap32 {

examples/camera-app/camera-common/camera-app.matter

+6-6
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 {
213213
}
214214

215215
enum ThreeLevelAutoEnum : enum8 {
216-
kLow = 0;
217-
kMedium = 1;
218-
kHigh = 2;
219-
kAutomatic = 3;
216+
kAuto = 0;
217+
kLow = 1;
218+
kMedium = 2;
219+
kHigh = 3;
220220
}
221221

222222
bitmap TestGlobalBitmap : bitmap32 {
@@ -2129,7 +2129,7 @@ provisional cluster Chime = 1366 {
21292129
}
21302130

21312131
readonly attribute ChimeSoundStruct installedChimeSounds[] = 0;
2132-
attribute int8u activeChimeID = 1;
2132+
attribute int8u selectedChime = 1;
21332133
attribute boolean enabled = 2;
21342134
readonly attribute command_id generatedCommandList[] = 65528;
21352135
readonly attribute command_id acceptedCommandList[] = 65529;
@@ -2583,7 +2583,7 @@ endpoint 1 {
25832583

25842584
server cluster Chime {
25852585
callback attribute installedChimeSounds;
2586-
callback attribute activeChimeID;
2586+
callback attribute selectedChime;
25872587
callback attribute enabled;
25882588
callback attribute generatedCommandList;
25892589
callback attribute acceptedCommandList;

examples/camera-app/linux/src/clusters/chime/chime-manager.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ CHIP_ERROR ChimeManager::GetChimeSoundByIndex(uint8_t chimeIndex, uint8_t & chim
3535
{
3636
return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED;
3737
}
38-
chimeID = mChimeSounds[chimeIndex].chimeID;
39-
40-
return CopyCharSpanToMutableCharSpan(mChimeSounds[chimeIndex].name, name);
38+
auto & selectedChime = mChimeSounds[chimeIndex];
39+
chimeID = selectedChime.chimeID;
40+
return chip::CopyCharSpanToMutableCharSpan(selectedChime.name, name);
4141
}
4242

4343
CHIP_ERROR ChimeManager::GetChimeIDByIndex(uint8_t chimeIndex, uint8_t & chimeID)
@@ -46,8 +46,8 @@ CHIP_ERROR ChimeManager::GetChimeIDByIndex(uint8_t chimeIndex, uint8_t & chimeID
4646
{
4747
return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED;
4848
}
49-
50-
chimeID = mChimeSounds[chimeIndex].chimeID;
49+
auto & selectedChime = mChimeSounds[chimeIndex];
50+
chimeID = selectedChime.chimeID;
5151
return CHIP_NO_ERROR;
5252
}
5353

@@ -60,9 +60,9 @@ Protocols::InteractionModel::Status ChimeManager::PlayChimeSound()
6060
}
6161

6262
// Get the Active Chime ID
63-
auto activeChimeID = mChimeServer->GetActiveChimeID();
63+
auto selectedChime = mChimeServer->GetSelectedChime();
6464

6565
// Play chime sound
66-
ChipLogDetail(Zcl, "Playing Chime with sound ID: %u", unsigned(activeChimeID));
66+
ChipLogDetail(Zcl, "Playing Chime with sound ID: %u", unsigned(selectedChime));
6767
return Protocols::InteractionModel::Status::Success;
6868
}

examples/camera-controller/commands/common/CHIPCommand.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ constexpr char kCDTrustStorePathVariable[] = "CAMERACONTROLLER_CD_TRUST_STO
5050

5151
const chip::Credentials::AttestationTrustStore * CHIPCommand::sTrustStore = nullptr;
5252
chip::Credentials::GroupDataProviderImpl CHIPCommand::sGroupDataProvider{ kMaxGroupsPerFabric, kMaxGroupKeysPerFabric };
53+
chip::Crypto::RawKeySessionKeystore CHIPCommand::sSessionKeystore;
5354

5455
namespace {
5556

@@ -109,6 +110,7 @@ CHIP_ERROR CHIPCommand::MaybeSetUpStack()
109110
factoryInitParams.operationalKeystore = &mOperationalKeystore;
110111
factoryInitParams.opCertStore = &mOpCertStore;
111112
factoryInitParams.enableServerInteractions = NeedsOperationalAdvertising();
113+
factoryInitParams.sessionKeystore = &sSessionKeystore;
112114
factoryInitParams.dataModelProvider = chip::app::CodegenDataModelProviderInstance(&mDefaultStorage);
113115

114116
// Init group data provider that will be used for all group keys and IPKs for the

examples/chef/common/clusters/window-covering/chef-window-covering.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ using namespace chip;
2929
using namespace chip::app::Clusters;
3030
using chip::Protocols::InteractionModel::Status;
3131

32+
namespace ChefWindowCovering {
33+
3234
constexpr size_t kWindowCoveringDelegateTableSize = MATTER_DM_WINDOW_COVERING_CLUSTER_SERVER_ENDPOINT_COUNT;
3335
static_assert(kWindowCoveringDelegateTableSize <= kEmberInvalidEndpointIndex, "WindowCovering Delegate table size error");
3436

@@ -68,6 +70,7 @@ void InitChefWindowCoveringCluster()
6870
WindowCovering::SetDefaultDelegate(endpointId, gDelegateTable[epIndex].get());
6971
}
7072
}
73+
} // namespace ChefWindowCovering
7174

7275
CHIP_ERROR WindowCovering::ChefDelegate::HandleMovement(WindowCoveringType type)
7376
{

examples/chef/common/clusters/window-covering/chef-window-covering.h

+2
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,6 @@ class ChefDelegate : public Delegate
6565
} // namespace app
6666
} // namespace chip
6767

68+
namespace ChefWindowCovering {
6869
void InitChefWindowCoveringCluster();
70+
} // namespace ChefWindowCovering

examples/chef/common/stubs.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ void ApplicationInit()
362362

363363
#ifdef MATTER_DM_PLUGIN_WINDOW_COVERING_SERVER
364364
ChipLogProgress(NotSpecified, "Initializing WindowCovering cluster delegate.");
365-
InitChefWindowCoveringCluster();
365+
ChefWindowCovering::InitChefWindowCoveringCluster();
366366
#endif // MATTER_DM_PLUGIN_WINDOW_COVERING_SERVER
367367
}
368368

examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter

+4-4
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 {
213213
}
214214

215215
enum ThreeLevelAutoEnum : enum8 {
216-
kLow = 0;
217-
kMedium = 1;
218-
kHigh = 2;
219-
kAutomatic = 3;
216+
kAuto = 0;
217+
kLow = 1;
218+
kMedium = 2;
219+
kHigh = 3;
220220
}
221221

222222
bitmap TestGlobalBitmap : bitmap32 {

0 commit comments

Comments
 (0)