Skip to content

Commit d6f8e8f

Browse files
authored
Merge branch 'master' into update_zephyr_3.7
2 parents 0521b5f + c0e580c commit d6f8e8f

File tree

341 files changed

+12421
-2444
lines changed

Some content is hidden

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

341 files changed

+12421
-2444
lines changed

.github/workflows/chef.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,28 @@ jobs:
5151
run: |
5252
./scripts/run_in_build_env.sh "./examples/chef/chef.py --ci -t linux"
5353
54+
chef_linux_all_devices:
55+
name: Chef - Linux CI Examples (All chef devices)
56+
timeout-minutes: 60
57+
runs-on: ubuntu-latest
58+
if: github.actor != 'restyled-io[bot]'
59+
60+
container:
61+
image: ghcr.io/project-chip/chip-build:119
62+
options: --user root
63+
64+
steps:
65+
- name: Checkout
66+
uses: actions/checkout@v4
67+
- name: Checkout submodules & Bootstrap
68+
uses: ./.github/actions/checkout-submodules-and-bootstrap
69+
with:
70+
platform: linux
71+
- name: CI Examples Linux
72+
shell: bash
73+
run: |
74+
./scripts/run_in_build_env.sh "./examples/chef/chef.py --ci_linux"
75+
5476
chef_esp32:
5577
name: Chef - ESP32 CI Examples
5678
runs-on: ubuntu-latest

.github/workflows/darwin.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,10 @@ jobs:
116116
117117
export TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1
118118
119-
# Disable BLE (CHIP_IS_BLE=NO) because the app does not have the permission to use it and that may crash the CI.
120119
xcodebuild test -target "Matter" -scheme "Matter Framework Tests" \
121120
-resultBundlePath /tmp/darwin/framework-tests/TestResults.xcresult \
122121
-sdk macosx ${{ matrix.options.arguments }} \
123-
CHIP_IS_BLE=NO GCC_PREPROCESSOR_DEFINITIONS='${inherited} ${{ matrix.options.defines }}' \
122+
GCC_PREPROCESSOR_DEFINITIONS='${inherited} ${{ matrix.options.defines }}' \
124123
> >(tee /tmp/darwin/framework-tests/darwin-tests.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-err.log >&2)
125124
- name: Generate Summary
126125
if: always()

.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

+12
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\"]")
@@ -436,6 +444,10 @@ if (CONFIG_SEC_CERT_DAC_PROVIDER)
436444
list(APPEND matter_requires espressif__esp_secure_cert_mgr)
437445
endif()
438446

447+
if (CONFIG_ENABLE_ENCRYPTED_OTA)
448+
list(APPEND matter_requires espressif__esp_encrypted_img)
449+
endif()
450+
439451
add_prebuilt_library(matterlib "${CMAKE_CURRENT_BINARY_DIR}/lib/libCHIP.a"
440452
REQUIRES ${matter_requires})
441453

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"

config/esp32/components/chip/idf_component.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies:
1111
- if: "idf_version >=4.3"
1212

1313
espressif/esp_encrypted_img:
14-
version: "2.1.0"
14+
version: "2.3.0"
1515
require: public
1616
rules:
1717
- if: "idf_version >=4.4"

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 |

docs/platforms/esp32/ota.md

+30-15
Original file line numberDiff line numberDiff line change
@@ -92,35 +92,50 @@ image can be encrypted/decrypted using an RSA-3072 key pair.
9292
9393
Please follow the steps below to generate an application image for OTA upgrades:
9494
95-
1. Generate a new RSA-3072 key pair or use an existing one.
95+
1. Generate a new RSA-3072 key pair or use an existing one.
9696
97-
- To generate a key pair, use the following command:
97+
- To generate a key pair, use the following command:
9898
9999
```
100100
openssl genrsa -out esp_image_encryption_key.pem 3072
101101
```
102102
103-
- Extract the public key from the key pair:
103+
- Extract the public key from the key pair:
104104
```
105105
openssl rsa -in esp_image_encryption_key.pem -pubout -out esp_image_encryption_public_key.pem
106106
```
107107
108-
2. Encrypt the application binary using the
109-
[esp_enc_img_gen.py](https://github.com/espressif/idf-extra-components/blob/master/esp_encrypted_img/tools/esp_enc_img_gen.py)
110-
script.
108+
2. Encrypt the application binary using the
109+
[esp_enc_img_gen.py](https://github.com/espressif/idf-extra-components/blob/master/esp_encrypted_img/tools/esp_enc_img_gen.py)
110+
script.
111111
112-
- Use the following command to encrypt the OTA image with the public key:
112+
Use the following command to encrypt the OTA image with the public key:
113113
114-
```
115-
python3 esp_enc_img_gen.py encrypt lighting-app.bin esp_image_encryption_public_key.pem lighting-app-encrypted.bin
116-
```
114+
```
115+
python3 esp_enc_img_gen.py encrypt lighting-app.bin esp_image_encryption_public_key.pem lighting-app-encrypted.bin
116+
```
117117
118-
- Append the Matter OTA header:
119-
```
120-
src/app/ota_image_tool.py create --vendor-id 0xFFF1 --product-id 0x8000 --version 2 --version-str "v2.0" -da sha256 lighting-app-encrypted.bin lighting-app-encrypted-ota.bin
121-
```
118+
Optionally, you can use the cmake function `create_esp_enc_img()` to encrypt
119+
the OTA image during the build process. Please find the usage below. This is
120+
also demonstrated in the `examples/lighting-app/esp32/main/CMakeLists.txt`
121+
file.
122+
123+
```
124+
create_esp_enc_img(${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.bin
125+
${project_dir}/esp_image_encryption_public_key.pem
126+
${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-encrypted.bin
127+
app)
128+
```
129+
130+
3. Append the Matter OTA header
131+
132+
```
133+
src/app/ota_image_tool.py create --vendor-id 0xFFF1 --product-id 0x8000 \
134+
--version 2 --version-str "v2.0" -da sha256 \
135+
lighting-app-encrypted.bin lighting-app-encrypted-ota.bin
136+
```
122137
123-
3. Use the `lighting-app-encrypted-ota.bin` file with the OTA Provider app.
138+
4. Use the `lighting-app-encrypted-ota.bin` file with the OTA Provider app.
124139
125140
## Delta OTA
126141

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

+7-7
Original file line numberDiff line numberDiff line change
@@ -20987,14 +20987,14 @@
2098720987
"storageOption": "External",
2098820988
"singleton": 0,
2098920989
"bounded": 0,
20990-
"defaultValue": "",
20990+
"defaultValue": null,
2099120991
"reportable": 1,
2099220992
"minInterval": 1,
2099320993
"maxInterval": 65534,
2099420994
"reportableChange": 0
2099520995
},
2099620996
{
20997-
"name": "ActiveChimeID",
20997+
"name": "SelectedChime",
2099820998
"code": 1,
2099920999
"mfgCode": null,
2100021000
"side": "server",
@@ -21003,7 +21003,7 @@
2100321003
"storageOption": "External",
2100421004
"singleton": 0,
2100521005
"bounded": 0,
21006-
"defaultValue": "",
21006+
"defaultValue": null,
2100721007
"reportable": 1,
2100821008
"minInterval": 1,
2100921009
"maxInterval": 65534,
@@ -21019,7 +21019,7 @@
2101921019
"storageOption": "External",
2102021020
"singleton": 0,
2102121021
"bounded": 0,
21022-
"defaultValue": "",
21022+
"defaultValue": null,
2102321023
"reportable": 1,
2102421024
"minInterval": 1,
2102521025
"maxInterval": 65534,
@@ -21035,7 +21035,7 @@
2103521035
"storageOption": "External",
2103621036
"singleton": 0,
2103721037
"bounded": 0,
21038-
"defaultValue": "",
21038+
"defaultValue": null,
2103921039
"reportable": 1,
2104021040
"minInterval": 1,
2104121041
"maxInterval": 65534,
@@ -21051,7 +21051,7 @@
2105121051
"storageOption": "External",
2105221052
"singleton": 0,
2105321053
"bounded": 0,
21054-
"defaultValue": "",
21054+
"defaultValue": null,
2105521055
"reportable": 1,
2105621056
"minInterval": 1,
2105721057
"maxInterval": 65534,
@@ -21067,7 +21067,7 @@
2106721067
"storageOption": "External",
2106821068
"singleton": 0,
2106921069
"bounded": 0,
21070-
"defaultValue": "",
21070+
"defaultValue": null,
2107121071
"reportable": 1,
2107221072
"minInterval": 1,
2107321073
"maxInterval": 65534,

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/nrfconnect/prj.conf

+3
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,6 @@ CONFIG_CHIP_ENABLE_READ_CLIENT=y
5757

5858
# Increase the settings partition
5959
CONFIG_PM_PARTITION_SIZE_SETTINGS_STORAGE=0x8000
60+
61+
# Increase heap size
62+
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240

examples/all-clusters-app/nrfconnect/prj_dfu.conf

+3
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,6 @@ CONFIG_CHIP_FACTORY_DATA_BUILD=y
5555

5656
# Enable the Read Client for binding purposes
5757
CONFIG_CHIP_ENABLE_READ_CLIENT=y
58+
59+
# Increase heap size
60+
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240

examples/all-clusters-app/nrfconnect/prj_release.conf

+3
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,6 @@ CONFIG_CHIP_ENABLE_READ_CLIENT=y
6666
# Enable LTO to reduce the flash usage
6767
CONFIG_LTO=y
6868
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y
69+
70+
# Increase heap size
71+
CONFIG_CHIP_MALLOC_SYS_HEAP_SIZE=10240

0 commit comments

Comments
 (0)