Skip to content

Commit

Permalink
Merge branch 'project-chip:master' into TC_CNET_4_13_PythonTest
Browse files Browse the repository at this point in the history
  • Loading branch information
juandediosg authored Mar 11, 2025
2 parents 78a1ac9 + b56134c commit 3a3dd39
Show file tree
Hide file tree
Showing 303 changed files with 10,795 additions and 1,743 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/examples-nxp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-nxp:119
image: ghcr.io/project-chip/chip-build-nxp:120
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/timer-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/tls-certificate-management-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/tls-client-management-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml \
Expand Down
2 changes: 2 additions & 0 deletions config/esp32/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ lwip_platform = "external"
chip_inet_config_enable_tcp_endpoint = false
chip_inet_config_enable_udp_endpoint = true

chip_config_memory_management = "platform"

custom_toolchain = "//third_party/connectedhomeip/config/esp32/toolchain:esp32"

# Avoid constraint forcing for ESP32:
Expand Down
8 changes: 8 additions & 0 deletions config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,14 @@ if(CONFIG_ENABLE_ICD_SERVER)
endif()
endif()

if(CONFIG_CHIP_MEM_ALLOC_MODE_INTERNAL)
chip_gn_arg_append("chip_memory_alloc_mode" "\"internal\"")
elseif(CONFIG_CHIP_MEM_ALLOC_MODE_EXTERNAL)
chip_gn_arg_append("chip_memory_alloc_mode" "\"external\"")
elseif(CONFIG_CHIP_MEM_ALLOC_MODE_DEFAULT)
chip_gn_arg_append("chip_memory_alloc_mode" "\"default\"")
endif()

if(CONFIG_ENABLE_PW_RPC)
string(APPEND chip_gn_args "import(\"//build_overrides/pigweed.gni\")\n")
chip_gn_arg_append("remove_default_configs" "[\"//third_party/connectedhomeip/third_party/pigweed/repo/pw_build:toolchain_cpp_standard\"]")
Expand Down
21 changes: 21 additions & 0 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,27 @@ menu "CHIP Core"
Enable dynamic server to handle a different interaction model dispatch.
Can be implied when users do not want to use the same server clusters.

choice CHIP_MEM_ALLOC_MODE
prompt "Memory allocation strategy"
default CHIP_MEM_ALLOC_MODE_DEFAULT
help
Strategy for Matter memory management
- Internal DRAM memory only
- External SPIRAM memory only
- Either internal or external memory based on default malloc() behavior in ESP-IDF

config CHIP_MEM_ALLOC_MODE_INTERNAL
bool "Internal memory"

config CHIP_MEM_ALLOC_MODE_EXTERNAL
bool "External SPIRAM"
depends on SPIRAM_USE_CAPS_ALLOC || SPIRAM_USE_MALLOC

config CHIP_MEM_ALLOC_MODE_DEFAULT
bool "Default alloc mode"

endchoice # CHIP_MEM_ALLOC_MODE

endmenu # "General Options"

menu "Networking Options"
Expand Down
2 changes: 2 additions & 0 deletions docs/ids_and_codes/ERROR_CODES.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ This file was **AUTOMATICALLY** generated by
| 38 | 0x26 | `CHIP_ERROR_WRONG_TLV_TYPE` |
| 39 | 0x27 | `CHIP_ERROR_TLV_CONTAINER_OPEN` |
| 40 | 0x28 | `CHIP_ERROR_IN_USE` |
| 41 | 0x29 | `CHIP_ERROR_HAD_FAILURES` |
| 42 | 0x2A | `CHIP_ERROR_INVALID_MESSAGE_TYPE` |
| 43 | 0x2B | `CHIP_ERROR_UNEXPECTED_TLV_ELEMENT` |
| 44 | 0x2C | `CHIP_ERROR_ALREADY_INITIALIZED` |
| 45 | 0x2D | `CHIP_ERROR_NOT_IMPLEMENTED` |
| 46 | 0x2E | `CHIP_ERROR_INVALID_ADDRESS` |
| 47 | 0x2F | `CHIP_ERROR_INVALID_ARGUMENT` |
Expand Down
1 change: 1 addition & 0 deletions docs/ids_and_codes/zap_clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ Generally regenerate using one of:
| 1872 | 0x750 | EcosystemInformation |
| 1873 | 0x751 | CommissionerControl |
| 2049 | 0x801 | TlsCertificateManagement |
| 2050 | 0x802 | TlsClientManagement |
| 4294048773 | 0xFFF1FC05 | UnitTesting |
| 4294048774 | 0xFFF1FC06 | FaultInjection |
| 4294048800 | 0xFFF1FC20 | SampleMei |
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 {
}

enum ThreeLevelAutoEnum : enum8 {
kLow = 0;
kMedium = 1;
kHigh = 2;
kAutomatic = 3;
kAuto = 0;
kLow = 1;
kMedium = 2;
kHigh = 3;
}

bitmap TestGlobalBitmap : bitmap32 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 {
}

enum ThreeLevelAutoEnum : enum8 {
kLow = 0;
kMedium = 1;
kHigh = 2;
kAutomatic = 3;
kAuto = 0;
kLow = 1;
kMedium = 2;
kHigh = 3;
}

bitmap TestGlobalBitmap : bitmap32 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 {
}

enum ThreeLevelAutoEnum : enum8 {
kLow = 0;
kMedium = 1;
kHigh = 2;
kAutomatic = 3;
kAuto = 0;
kLow = 1;
kMedium = 2;
kHigh = 3;
}

bitmap TestGlobalBitmap : bitmap32 {
Expand Down Expand Up @@ -5300,7 +5300,7 @@ cluster WindowCovering = 258 {

/** An interface for configuring and controlling pumps. */
cluster PumpConfigurationAndControl = 512 {
revision 3;
revision 4;

enum ControlModeEnum : enum8 {
kConstantSpeed = 0;
Expand Down Expand Up @@ -7024,7 +7024,7 @@ provisional cluster Chime = 1366 {
}

readonly attribute ChimeSoundStruct installedChimeSounds[] = 0;
attribute int8u activeChimeID = 1;
attribute int8u selectedChime = 1;
attribute boolean enabled = 2;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
Expand Down Expand Up @@ -9315,7 +9315,7 @@ endpoint 1 {

server cluster Chime {
callback attribute installedChimeSounds;
callback attribute activeChimeID;
callback attribute selectedChime;
callback attribute enabled;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20987,14 +20987,14 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ActiveChimeID",
"name": "SelectedChime",
"code": 1,
"mfgCode": null,
"side": "server",
Expand All @@ -21003,7 +21003,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand All @@ -21019,7 +21019,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand All @@ -21035,7 +21035,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand All @@ -21051,7 +21051,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand All @@ -21067,7 +21067,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ CHIP_ERROR ChimeCommandDelegate::GetChimeSoundByIndex(uint8_t chimeIndex, uint8_
return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED;
}
auto & selectedChime = supportedChimes[chimeIndex];
chip::CopyCharSpanToMutableCharSpan(selectedChime.name, name);
chimeID = selectedChime.chimeID;
return CHIP_NO_ERROR;
chimeID = selectedChime.chimeID;
return chip::CopyCharSpanToMutableCharSpan(selectedChime.name, name);
}

CHIP_ERROR ChimeCommandDelegate::GetChimeIDByIndex(uint8_t chimeIndex, uint8_t & chimeID)
Expand Down
15 changes: 15 additions & 0 deletions examples/all-clusters-app/nxp/rt/rt1060/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,25 @@ rt_sdk("sdk") {
sources += [ "${example_platform_dir}/board/${evkname}/pin_mux.c" ]
}

if (iw416_transceiver || w8801_transceiver || iwx12_transceiver) {
if (evkname == "evkmimxrt1060") {
include_dirs += [ "${example_platform_dir}/board/evkbmimxrt1060/" ]
sources +=
[ "${example_platform_dir}/board/evkbmimxrt1060/sdmmc_config.c" ]
sources +=
[ "${example_platform_dir}/board/evkbmimxrt1060/wifi_bt_config.c" ]
} else {
include_dirs += [ "${example_platform_dir}/board/${evkname}/" ]
sources += [ "${example_platform_dir}/board/${evkname}/sdmmc_config.c" ]
sources += [ "${example_platform_dir}/board/${evkname}/wifi_bt_config.c" ]
}
}

sources += [ "${example_platform_dir}/board/hardware_init.c" ]
sources += [ "${example_platform_dir}/board/clock_config.c" ]
sources += [ "${example_platform_dir}/board/board.c" ]
sources += [ "${example_platform_dir}/board/peripherals.c" ]
sources += [ "${example_platform_dir}/board/board_comp.c" ]

# Indicate the path to CHIPProjectConfig.h
include_dirs += [ "include/config" ]
Expand Down
1 change: 1 addition & 0 deletions examples/all-clusters-app/nxp/rt/rt1170/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ rt_sdk("sdk") {
sources += [ "${example_platform_dir}/board/board.c" ]
sources += [ "${example_platform_dir}/board/peripherals.c" ]
sources += [ "${example_platform_dir}/board/sdmmc_config.c" ]
sources += [ "${example_platform_dir}/board/wifi_bt_config.c" ]

# Indicate the path to CHIPProjectConfig.h
include_dirs += [ "include/config" ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 {
}

enum ThreeLevelAutoEnum : enum8 {
kLow = 0;
kMedium = 1;
kHigh = 2;
kAutomatic = 3;
kAuto = 0;
kLow = 1;
kMedium = 2;
kHigh = 3;
}

bitmap TestGlobalBitmap : bitmap32 {
Expand Down Expand Up @@ -3712,7 +3712,7 @@ cluster WindowCovering = 258 {

/** An interface for configuring and controlling pumps. */
cluster PumpConfigurationAndControl = 512 {
revision 3;
revision 4;

enum ControlModeEnum : enum8 {
kConstantSpeed = 0;
Expand Down
8 changes: 4 additions & 4 deletions examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 {
}

enum ThreeLevelAutoEnum : enum8 {
kLow = 0;
kMedium = 1;
kHigh = 2;
kAutomatic = 3;
kAuto = 0;
kLow = 1;
kMedium = 2;
kHigh = 3;
}

bitmap TestGlobalBitmap : bitmap32 {
Expand Down
12 changes: 6 additions & 6 deletions examples/camera-app/camera-common/camera-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ enum TestGlobalEnum : enum8 {
}

enum ThreeLevelAutoEnum : enum8 {
kLow = 0;
kMedium = 1;
kHigh = 2;
kAutomatic = 3;
kAuto = 0;
kLow = 1;
kMedium = 2;
kHigh = 3;
}

bitmap TestGlobalBitmap : bitmap32 {
Expand Down Expand Up @@ -2129,7 +2129,7 @@ provisional cluster Chime = 1366 {
}

readonly attribute ChimeSoundStruct installedChimeSounds[] = 0;
attribute int8u activeChimeID = 1;
attribute int8u selectedChime = 1;
attribute boolean enabled = 2;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
Expand Down Expand Up @@ -2583,7 +2583,7 @@ endpoint 1 {

server cluster Chime {
callback attribute installedChimeSounds;
callback attribute activeChimeID;
callback attribute selectedChime;
callback attribute enabled;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
Expand Down
14 changes: 7 additions & 7 deletions examples/camera-app/linux/src/clusters/chime/chime-manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ CHIP_ERROR ChimeManager::GetChimeSoundByIndex(uint8_t chimeIndex, uint8_t & chim
{
return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED;
}
chimeID = mChimeSounds[chimeIndex].chimeID;

return CopyCharSpanToMutableCharSpan(mChimeSounds[chimeIndex].name, name);
auto & selectedChime = mChimeSounds[chimeIndex];
chimeID = selectedChime.chimeID;
return chip::CopyCharSpanToMutableCharSpan(selectedChime.name, name);
}

CHIP_ERROR ChimeManager::GetChimeIDByIndex(uint8_t chimeIndex, uint8_t & chimeID)
Expand All @@ -46,8 +46,8 @@ CHIP_ERROR ChimeManager::GetChimeIDByIndex(uint8_t chimeIndex, uint8_t & chimeID
{
return CHIP_ERROR_PROVIDER_LIST_EXHAUSTED;
}

chimeID = mChimeSounds[chimeIndex].chimeID;
auto & selectedChime = mChimeSounds[chimeIndex];
chimeID = selectedChime.chimeID;
return CHIP_NO_ERROR;
}

Expand All @@ -60,9 +60,9 @@ Protocols::InteractionModel::Status ChimeManager::PlayChimeSound()
}

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

// Play chime sound
ChipLogDetail(Zcl, "Playing Chime with sound ID: %u", unsigned(activeChimeID));
ChipLogDetail(Zcl, "Playing Chime with sound ID: %u", unsigned(selectedChime));
return Protocols::InteractionModel::Status::Success;
}
2 changes: 2 additions & 0 deletions examples/camera-controller/commands/common/CHIPCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ constexpr char kCDTrustStorePathVariable[] = "CAMERACONTROLLER_CD_TRUST_STO

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

namespace {

Expand Down Expand Up @@ -109,6 +110,7 @@ CHIP_ERROR CHIPCommand::MaybeSetUpStack()
factoryInitParams.operationalKeystore = &mOperationalKeystore;
factoryInitParams.opCertStore = &mOpCertStore;
factoryInitParams.enableServerInteractions = NeedsOperationalAdvertising();
factoryInitParams.sessionKeystore = &sSessionKeystore;
factoryInitParams.dataModelProvider = chip::app::CodegenDataModelProviderInstance(&mDefaultStorage);

// Init group data provider that will be used for all group keys and IPKs for the
Expand Down
Loading

0 comments on commit 3a3dd39

Please sign in to comment.