Skip to content

Commit fea0b8d

Browse files
authored
Merge branch 'master' into tizen-arm64-dockerfile
2 parents fc81146 + 2489811 commit fea0b8d

File tree

513 files changed

+26259
-5529
lines changed

Some content is hidden

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

513 files changed

+26259
-5529
lines changed

.devcontainer/Dockerfile

+8-13
Original file line numberDiff line numberDiff line change
@@ -56,23 +56,18 @@ RUN curl https://raw.githubusercontent.com/restyled-io/restyler/master/bin/resty
5656

5757
RUN mkdir -p /opt/android/sdk \
5858
&& chown -R $USERNAME:$USERNAME \
59-
/opt/android/sdk `# NXP uses a patch_sdk script to change SDK files` \
6059
$ANDROID_HOME \
6160
$IDF_TOOLS_PATH \
62-
&& find $AMEBA_PATH -name "inc_lp" -print0 | xargs -0 chown -R $USERNAME:$USERNAME \
63-
&& find $AMEBA_PATH -name "inc_hp" -print0 | xargs -0 chown -R $USERNAME:$USERNAME \
64-
&& find $AMEBA_PATH -name "project_lp" -print0 | xargs -0 chown -R $USERNAME:$USERNAME \
65-
&& find $AMEBA_PATH -name "project_hp" -print0 | xargs -0 chown -R $USERNAME:$USERNAME \
66-
&& chmod -R +x \
67-
$ANDROID_HOME/cmdline-tools/10.0/bin `# sdkmanager for accepting licenses`\
61+
&& find $AMEBA_PATH \
62+
-name "inc_lp" -print0 -or \
63+
-name "inc_hp" -print0 -or \
64+
-name "project_lp" -print0 -or \
65+
-name "project_hp" -print0 \
66+
| xargs -0 -I {} sh -c 'chown -R $USERNAME:$USERNAME {}; chmod -R +w {}' \
67+
&& find $ANDROID_HOME/cmdline-tools/ -type d -name bin | xargs chmod -R +x `# sdkmanager for accepting licenses` \
6868
&& chmod -R +w \
6969
$IDF_TOOLS_PATH \
70-
&& find $AMEBA_PATH -name "inc_lp" -print0 | xargs -0 chmod -R +w \
71-
&& find $AMEBA_PATH -name "inc_hp" -print0 | xargs -0 chmod -R +w \
72-
&& find $AMEBA_PATH -name "project_lp" -print0 | xargs -0 chmod -R +w \
73-
&& find $AMEBA_PATH -name "project_hp" -print0 | xargs -0 chmod -R +w \
74-
# Safe directory is preferred over chown.
75-
&& git config --global --add safe.directory "*" \
70+
&& git config --global --add safe.directory "*" `# Safe directory is preferred over chown.` \
7671
&& :
7772

7873
# Fix Tizen SDK paths for new user

.devcontainer/build.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
HERE="$(dirname "$0")"
2020
CHIP_ROOT="$(realpath "$HERE"/..)"
21-
BUILD_VERSION="latest"
21+
BUILD_VERSION=$(sed 's/ .*//' "$CHIP_ROOT/integrations/docker/images/base/chip-build/version")
2222
IMAGE_TAG="matter-dev-environment:local"
2323
USER_UID=$UID
2424

@@ -32,7 +32,7 @@ Options:
3232
-h,--help Show this help
3333
-t,--tag Image tag - default is matter-dev-environment:local
3434
-u,--uid User UIDa - default is the current user ID
35-
-v,--version Build version - default is the latest
35+
-v,--version Build version - default is the version of the base chip-build docker image
3636
EOF
3737
}
3838

.devcontainer/devcontainer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"type": "bind"
2121
}
2222
],
23-
"initializeCommand": "bash .devcontainer/build.sh --tag matter-dev-environment:local --version 97",
23+
"initializeCommand": "bash .devcontainer/build.sh",
2424
"image": "matter-dev-environment:local",
2525
"remoteUser": "vscode",
2626
"containerEnv": {

.github/workflows/build.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ jobs:
210210
./scripts/run_in_build_env.sh "./scripts/run_codegen_targets.sh out/sanitizers"
211211
- name: Find changed files
212212
id: changed-files
213-
uses: tj-actions/changed-files@v45
213+
uses: tj-actions/changed-files@v46
214214
with:
215215
# Exclude all files under "third_party/"
216216
files-ignore: |
@@ -446,7 +446,7 @@ jobs:
446446
./scripts/run_in_build_env.sh "./scripts/run_codegen_targets.sh out/default"
447447
- name: Find changed files
448448
id: changed-files
449-
uses: tj-actions/changed-files@v45
449+
uses: tj-actions/changed-files@v46
450450
- name: Clang-tidy validation
451451
# NOTE: clang-tidy crashes on CodegenDataModel_Write due to Nullable/std::optional check.
452452
# See https://github.com/llvm/llvm-project/issues/97426

.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-linux-standalone.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ jobs:
247247
build"
248248
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
249249
linux debug camera-controller \
250-
out/linux-x64-camera-controller/camera-controller \
250+
out/linux-x64-camera-controller/chip-camera-controller \
251251
/tmp/bloat_reports/
252252
- name: Uploading Size Reports
253253
uses: ./.github/actions/upload-size-reports

.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/restyled.yml

-5
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@ jobs:
1515
uses: actions/checkout@v4
1616

1717
- uses: restyled-io/actions/setup@v4
18-
with:
19-
# TODO: Pinned to v0.6.0.2 because the latest release does not have a pre-built
20-
# 'restyler-linux' asset. This broke our workflow as we rely on the pre-built binary.
21-
# Remove this pin once a new release with the 'restyler-linux' asset is available.
22-
tag: 'v0.6.0.2'
2318

2419
- id: restyler
2520
uses: restyled-io/actions/run@v4

.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 \

BUILD.gn

+2-2
Original file line numberDiff line numberDiff line change
@@ -394,9 +394,9 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
394394
enable_linux_rvc_app_build =
395395
enable_default_builds && (host_os == "linux" || host_os == "mac")
396396

397+
# TODO: #37983: Add darwin support for libdatachannel and then add host_os == "mac" here.
397398
# Build the Linux Camera app example.
398-
enable_linux_camera_app_build =
399-
enable_default_builds && (host_os == "linux" || host_os == "mac")
399+
enable_linux_camera_app_build = enable_default_builds && host_os == "linux"
400400

401401
# Build the cc13x2x7_26x2x7 lock app example.
402402
enable_cc13x2x7_26x2x7_lock_app_build = enable_ti_simplelink_builds

CONTRIBUTING.md

+9
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,15 @@ out of convenience.
253253
fixing a typo in an ID still requires some description on how you checked
254254
that the new ID takes effect.
255255

256+
> [!TIP]
257+
>
258+
> When working on a pull request for Matter SDK refrain from using the "Update
259+
> branch" feature in the GitHub UI too often. Updating the PR branch in this way
260+
> triggers the CI workflows cancellation and restart. This feature should be
261+
> used only when a PR has not been worked on for a long time and a lot of
262+
> divergence has accumulated. Your PR branch being out of sync with master is
263+
> not a blocker for merging an approved PR.
264+
256265
### Review Requirements
257266

258267
#### Documentation Best Practices

config/esp32/components/chip/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,10 @@ if (CONFIG_SEC_CERT_DAC_PROVIDER)
444444
list(APPEND matter_requires espressif__esp_secure_cert_mgr)
445445
endif()
446446

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

config/esp32/components/chip/idf_component.yml

+2-2
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"
@@ -37,6 +37,6 @@ dependencies:
3737
- if: "idf_version >=4.3"
3838

3939
espressif/esp_wifi_remote:
40-
version: ">=0.1.12"
40+
version: "^0.7.0"
4141
rules:
4242
- if: "target in [esp32p4]"

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

+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 {
@@ -1998,7 +1998,7 @@ cluster FanControl = 514 {
19981998

19991999
/** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */
20002000
cluster TemperatureMeasurement = 1026 {
2001-
revision 1; // NOTE: Default/not specifically set
2001+
revision 4;
20022002

20032003
readonly attribute nullable temperature measuredValue = 0;
20042004
readonly attribute nullable temperature minMeasuredValue = 1;

examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-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 {
@@ -1734,7 +1734,7 @@ cluster AirQuality = 91 {
17341734

17351735
/** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */
17361736
cluster TemperatureMeasurement = 1026 {
1737-
revision 1; // NOTE: Default/not specifically set
1737+
revision 4;
17381738

17391739
readonly attribute nullable temperature measuredValue = 0;
17401740
readonly attribute nullable temperature minMeasuredValue = 1;

examples/air-quality-sensor-app/silabs/include/AppConfig.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
#define APP_TASK_NAME "AQS"
2727

28-
#define BLE_DEV_NAME "SiLabs-Air-Quality-Sensor"
28+
#define BLE_DEV_NAME "SL-" APP_TASK_NAME
2929

3030
// Time it takes in ms for the simulated actuator to move from one
3131
// APP Logo, boolean only. must be 64x64

examples/air-quality-sensor-app/silabs/include/AppTask.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ class AppTask : public BaseApplication
8989
static AppTask sAppTask;
9090

9191
/**
92-
* @brief AppTask initialisation function
92+
* @brief Override of BaseApplication::AppInit() virtual method, called by BaseApplication::Init()
9393
*
9494
* @return CHIP_ERROR
9595
*/
96-
CHIP_ERROR Init();
96+
CHIP_ERROR AppInit() override;
9797

9898
/**
9999
* @brief PB0 Button event processing function

examples/air-quality-sensor-app/silabs/src/AppTask.cpp

+1-8
Original file line numberDiff line numberDiff line change
@@ -68,21 +68,14 @@ using namespace chip::app::Clusters;
6868

6969
AppTask AppTask::sAppTask;
7070

71-
CHIP_ERROR AppTask::Init()
71+
CHIP_ERROR AppTask::AppInit()
7272
{
7373
CHIP_ERROR err = CHIP_NO_ERROR;
7474
chip::DeviceLayer::Silabs::GetPlatform().SetButtonsCb(AppTask::ButtonEventHandler);
7575
#ifdef DISPLAY_ENABLED
76-
GetLCD().Init((uint8_t *) "Air-Quality-Sensor");
7776
GetLCD().SetCustomUI(AirQualitySensorUI::DrawUI);
7877
#endif
7978

80-
err = BaseApplication::Init();
81-
if (err != CHIP_NO_ERROR)
82-
{
83-
ChipLogDetail(AppServer, "BaseApplication::Init() failed");
84-
appError(err);
85-
}
8679
err = SensorManager::SensorMgr().Init();
8780
if (err != CHIP_NO_ERROR)
8881
{

0 commit comments

Comments
 (0)