Skip to content

Commit 6b59a0e

Browse files
authored
Merge branch 'master' into issue/30754-dependabot-CI-runs-for-both-push-and-pull
2 parents 2991df5 + cd0e262 commit 6b59a0e

File tree

90 files changed

+6708
-943
lines changed

Some content is hidden

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

90 files changed

+6708
-943
lines changed

.github/.wordlist.txt

+5
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,8 @@ HomePods
643643
hostapd
644644
hostname
645645
href
646+
HSM
647+
hsm
646648
HTTPS
647649
HW
648650
hwadr
@@ -965,6 +967,7 @@ objcopy
965967
OccupancySensing
966968
OctetString
967969
OECORE
970+
OID
968971
ol
969972
Onboarding
970973
onboardingcodes
@@ -986,6 +989,7 @@ openweave
986989
OperationalCredentials
987990
operationalDataset
988991
opkg
992+
OPTIGA
989993
optionMask
990994
optionOverride
991995
optionsMask
@@ -1429,6 +1433,7 @@ transitionTime
14291433
TransportMgrBase
14301434
TriggerEffect
14311435
TRNG
1436+
trustm
14321437
TrustedRootCertificates
14331438
tsan
14341439
TSG

.github/workflows/darwin-tests.yaml

+1-9
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,7 @@ jobs:
7272

7373
- name: Run macOS Darwin Framework Tool Build Debug
7474
working-directory: src/darwin/Framework
75-
# Keep whatever Xcode settings
76-
# for OTHER_CFLAGS exist by using ${inherited}.
77-
#
78-
# Enable -Wconversion by hand as well, because it seems to not be
79-
# enabled by default in the Xcode config.
80-
#
81-
# Disable availability annotations, since we are not building against a system
82-
# Matter.framework.
83-
run: xcodebuild -target "darwin-framework-tool" -sdk macosx -configuration Debug OTHER_CFLAGS='${inherited} -Wconversion' GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
75+
run: xcodebuild -target "darwin-framework-tool" -sdk macosx -configuration Debug
8476
- name: Delete Defaults
8577
run: defaults delete com.apple.dt.xctest.tool
8678
continue-on-error: true

.github/workflows/darwin.yaml

+6-8
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,14 @@ jobs:
3737
strategy:
3838
matrix:
3939
options: # We don't need a full matrix
40-
- flavor: macos-release-availability
41-
arguments: -sdk macosx -configuration Release WARNING_CFLAGS='${inherited} -Werror -Wconversion -Wno-unguarded-availability-new'
40+
- flavor: macos-release
41+
arguments: -sdk macosx -configuration Release
4242
- flavor: ios-release
43-
arguments: -sdk iphoneos -configuration Release WARNING_CFLAGS='${inherited} -Werror -Wconversion' GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
44-
- flavor: ios-debug
45-
arguments: -sdk iphoneos -configuration Debug WARNING_CFLAGS='${inherited} -Werror -Wconversion' GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
43+
arguments: -sdk iphoneos -configuration Release
4644
- flavor: tvos-debug
47-
arguments: -sdk appletvos -configuration Debug WARNING_CFLAGS='${inherited} -Werror -Wconversion' GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
45+
arguments: -sdk appletvos -configuration Debug
4846
- flavor: watchos-debug
49-
arguments: -sdk watchos -configuration Debug WARNING_CFLAGS='${inherited} -Werror -Wconversion' GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
47+
arguments: -sdk watchos -configuration Debug
5048
steps:
5149
- name: Checkout
5250
uses: actions/checkout@v4
@@ -115,7 +113,7 @@ jobs:
115113
116114
# Disable BLE (CHIP_IS_BLE=NO) because the app does not have the permission to use it and that may crash the CI.
117115
xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx ${{ matrix.options.arguments }} \
118-
OTHER_CFLAGS='${inherited} -Werror -Wconversion' CHIP_IS_BLE=NO GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1 ${{ matrix.options.defines }}' \
116+
CHIP_IS_BLE=NO GCC_PREPROCESSOR_DEFINITIONS='${inherited} ${{ matrix.options.defines }}' \
119117
> >(tee /tmp/darwin/framework-tests/darwin-tests.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-err.log >&2)
120118
- name: Collect crash logs
121119
if: failure() && !env.ACT

.gitmodules

+6
Original file line numberDiff line numberDiff line change
@@ -324,3 +324,9 @@
324324
path = third_party/infineon/psoc6/psoc6_sdk/libs/lwip-network-interface-integration
325325
url = https://github.com/Infineon/lwip-network-interface-integration.git
326326
platforms = infineon
327+
[submodule "third_party/infineon/trustm/optiga-trust-m"]
328+
path = third_party/infineon/trustm/optiga-trust-m
329+
url = https://github.com/Infineon/optiga-trust-m.git
330+
branch = matter_support
331+
platforms = infineon
332+

build/chip/chip_test_suite.gni

+15-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ assert(chip_build_tests)
3939
#
4040
# public_deps = [
4141
# "${chip_root}/src/lib/foo", # add dependencies here
42-
# "${nlunit_test_root}:nlunit-test",
4342
# ]
4443
# }
4544
#
@@ -57,7 +56,6 @@ assert(chip_build_tests)
5756
#
5857
# public_deps = [
5958
# "${chip_root}/src/lib/foo", # add dependencies here
60-
# "${nlunit_test_root}:nlunit-test",
6159
# ]
6260
#
6361
# tests = [
@@ -94,6 +92,8 @@ template("chip_test_suite") {
9492
public_deps = []
9593
}
9694

95+
deps = [ dir_pw_unit_test ]
96+
9797
if (current_os != "zephyr" && current_os != "mbed") {
9898
# Depend on stdio logging, and have it take precedence over the default platform backend
9999
public_deps += [ "${chip_root}/src/platform/logging:force_stdio" ]
@@ -106,6 +106,11 @@ template("chip_test_suite") {
106106
foreach(_test, invoker.test_sources) {
107107
_test_name = string_replace(_test, ".cpp", "")
108108

109+
_test_output_dir = "${root_out_dir}/tests"
110+
if (defined(invoker.output_dir)) {
111+
_test_output_dir = invoker.output_dir
112+
}
113+
109114
pw_test(_test_name) {
110115
forward_variables_from(invoker,
111116
[
@@ -116,13 +121,19 @@ template("chip_test_suite") {
116121
])
117122
public_deps += [ ":${_suite_name}.lib" ]
118123
sources = [ _test ]
124+
output_dir = _test_output_dir
119125
}
120126
tests += [ _test_name ]
121127
}
122128
}
123129

124130
if (defined(invoker.tests)) {
125131
foreach(_test, invoker.tests) {
132+
_test_output_dir = "${root_out_dir}/tests"
133+
if (defined(invoker.output_dir)) {
134+
_test_output_dir = invoker.output_dir
135+
}
136+
126137
pw_test(_test) {
127138
forward_variables_from(invoker,
128139
[
@@ -137,6 +148,7 @@ template("chip_test_suite") {
137148
"${_test}.cpp",
138149
"${_test}Driver.cpp",
139150
]
151+
output_dir = _test_output_dir
140152
}
141153
tests += [ _test ]
142154
}
@@ -164,7 +176,7 @@ template("chip_test_suite") {
164176
}
165177
}
166178

167-
# TODO: remove this once transition away from nlunit-test is completed
179+
# TODO [PW_MIGRATION]: remove this once transition away from nlunit-test is completed
168180
template("chip_test_suite_using_nltest") {
169181
_suite_name = target_name
170182

config/nrfconnect/chip-module/CMakeLists.txt

+5-3
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ matter_add_gn_arg_bool ("chip_system_config_provide_statistics" CONFIG_CHIP_ST
140140
matter_add_gn_arg_bool ("chip_enable_icd_server" CONFIG_CHIP_ENABLE_ICD_SUPPORT)
141141
matter_add_gn_arg_bool ("chip_enable_factory_data" CONFIG_CHIP_FACTORY_DATA)
142142
matter_add_gn_arg_bool ("chip_enable_read_client" CONFIG_CHIP_ENABLE_READ_CLIENT)
143+
matter_add_gn_arg_bool ("chip_mdns_minimal" CONFIG_WIFI_NRF700X)
144+
matter_add_gn_arg_bool ("chip_mdns_platform" CONFIG_NET_L2_OPENTHREAD)
143145

144146
if (CONFIG_CHIP_ENABLE_ICD_SUPPORT)
145147
matter_add_gn_arg_bool ("chip_enable_icd_lit" CONFIG_CHIP_ICD_LIT_SUPPORT)
@@ -157,10 +159,10 @@ if (CONFIG_CHIP_ROTATING_DEVICE_ID)
157159
matter_add_gn_arg_bool("chip_enable_additional_data_advertising" TRUE)
158160
endif()
159161

160-
if (CONFIG_NET_L2_OPENTHREAD)
161-
matter_add_gn_arg_string("chip_mdns" "platform")
162-
elseif(CONFIG_WIFI_NRF700X)
162+
if(CONFIG_WIFI_NRF700X)
163163
matter_add_gn_arg_string("chip_mdns" "minimal")
164+
elseif (CONFIG_NET_L2_OPENTHREAD)
165+
matter_add_gn_arg_string("chip_mdns" "platform")
164166
else()
165167
matter_add_gn_arg_string("chip_mdns" "none")
166168
endif()

docs/guides/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- [ASR - Getting Started Guide](./asr_getting_started_guide.md)
88
- [Espressif (ESP32) - Getting Started Guide](./esp32/README.md)
99
- [Infineon PSoC6 - Software Update](./infineon_psoc6_software_update.md)
10+
- [Infineon Trust M Provisioning](./infineon_trustm_provisioning.md)
1011
- [Linux - Simulated Devices](./simulated_device_linux.md)
1112
- [mbedOS - Adding a new target](./mbedos_add_new_target.md)
1213
- [mbedOS - Commissioning](./mbedos_commissioning.md)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Infineon OPTIGA™ Trust M Provisioning for Matter
2+
3+
To use Infineon OPTIGA™ Trust M for device attestation, Provisioning for
4+
OPTIGA™ Trust M with Matter test device Attestation certificate is needed.
5+
6+
## Hardware setup:
7+
8+
[Raspberry Pi 4](https://www.raspberrypi.com/products/raspberry-pi-4-model-b/)
9+
10+
[OPTIGA™ Trust M MTR](https://www.infineon.com/cms/en/product/evaluation-boards/trust-m-mtr-shield/)
11+
12+
[Shield2Go Adapter for Raspberry Pi](https://www.infineon.com/cms/en/product/evaluation-boards/s2go-adapter-rasp-pi-iot/)
13+
or Jumping Wire
14+
15+
## Provisioning for OPTIGA™ Trust M
16+
17+
The
18+
[Linux Tools for OPTIGA™ Trust M ](https://github.com/Infineon/linux-optiga-trust-m)
19+
can be used to perform provisioning by following the steps mentioned below.
20+
21+
- Set up chip-tool on Raspberry Pi 4 by following the instruction listed at
22+
[Building chip-tool on Raspberry Pi ](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/BUILDING.md#installing-prerequisites-on-raspberry-pi-4)
23+
- Clone the repo from Infineon Public GitHub
24+
25+
```
26+
$ git clone --recurse-submodules https://github.com/Infineon/linux-optiga-trust-m.git
27+
```
28+
29+
- Build the Linux tools for OPTIGA™ Trust M
30+
31+
```
32+
$ cd linux-optiga-trust-m/
33+
$ ./trustm_installation_aarch64_script.sh
34+
```
35+
36+
- Run the script to generate Matter test DAC for lock-app using the public key
37+
extracted from the Infineon pre-provisioned Certificate and store it into
38+
0xE0E0
39+
40+
```
41+
$ cd scripts/matter_provisioning/
42+
$ ./matter_dac_provisioning.sh
43+
```
44+
45+
_Note:_
46+
47+
_By running this example matter_dac_provisioning.sh, the steps shown below are
48+
executed:_
49+
50+
_Step1: Extract the public key from the Infineon pre-provisioned
51+
Certificate(0xE0E0) using openssl command._
52+
53+
_Step2: Generate DAC test certificate using the extracted public key, Signed by
54+
[Matter test PAI](https://github.com/project-chip/connectedhomeip/blob/v1.1-branch/credentials/development/attestation/Matter-Development-PAI-FFF1-noPID-Cert.pem)_.
55+
Please note that production devices cannot re-use these test keys/certificates.
56+
57+
_Step3: Write DAC test certificate into OPTIGA™ Trust M certificate slot
58+
0xE0E0_
59+
60+
\_Step4: Write Matter test PAI into OPTIGA™ Trust M certificate slot
61+
0xE0E8 and test CD into OPTIGA™ Trust M Arbitrary OID 0xF1E0.

examples/all-clusters-app/esp32/main/Kconfig.projbuild

+4
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ menu "Demo"
5959
depends on IDF_TARGET_ESP32H2
6060
endchoice
6161

62+
config CHIP_PROJECT_CONFIG
63+
string "CHIP Project Configuration file"
64+
default "main/include/CHIPProjectConfig.h"
65+
6266
choice
6367
prompt "Rendezvous Mode"
6468
default RENDEZVOUS_MODE_BLE if BT_ENABLED
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
*
3+
* Copyright (c) 2023 Project CHIP Authors
4+
* All rights reserved.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
/**
20+
* @file
21+
* Example project configuration file for CHIP.
22+
*
23+
* This is a place to put application or project-specific overrides
24+
* to the default configuration values for general CHIP features.
25+
*
26+
*/
27+
28+
#pragma once
29+
30+
/**
31+
* @def CONFIG_BUILD_FOR_HOST_UNIT_TEST
32+
*
33+
* @brief Defines whether we're currently building for unit testing, which enables a set of features
34+
* that are only utilized in those tests. This flag should not be enabled on devices. If you have a test
35+
* that uses this flag, either appropriately conditionalize the entire test on this flag, or to exclude
36+
* the compliation of that test source file entirely.
37+
*/
38+
#define CONFIG_BUILD_FOR_HOST_UNIT_TEST 1

examples/all-clusters-minimal-app/esp32/main/Kconfig.projbuild

+4
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ menu "Demo"
4848
depends on IDF_TARGET_ESP32C2
4949
endchoice
5050

51+
config CHIP_PROJECT_CONFIG
52+
string "CHIP Project Configuration file"
53+
default "main/include/CHIPProjectConfig.h"
54+
5155
choice
5256
prompt "Rendezvous Mode"
5357
default RENDEZVOUS_MODE_BLE if BT_ENABLED
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
*
3+
* Copyright (c) 2023 Project CHIP Authors
4+
* All rights reserved.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
/**
20+
* @file
21+
* Example project configuration file for CHIP.
22+
*
23+
* This is a place to put application or project-specific overrides
24+
* to the default configuration values for general CHIP features.
25+
*
26+
*/
27+
28+
#pragma once
29+
30+
/**
31+
* @def CONFIG_BUILD_FOR_HOST_UNIT_TEST
32+
*
33+
* @brief Defines whether we're currently building for unit testing, which enables a set of features
34+
* that are only utilized in those tests. This flag should not be enabled on devices. If you have a test
35+
* that uses this flag, either appropriately conditionalize the entire test on this flag, or to exclude
36+
* the compliation of that test source file entirely.
37+
*/
38+
#define CONFIG_BUILD_FOR_HOST_UNIT_TEST 1

examples/lock-app/infineon/psoc6/BUILD.gn

+16-1
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@
1515
import("//build_overrides/build.gni")
1616
import("//build_overrides/chip.gni")
1717
import("//build_overrides/psoc6.gni")
18-
1918
import("${build_root}/config/defaults.gni")
19+
import("${chip_root}/src/crypto/crypto.gni")
20+
import("${chip_root}/src/platform/Infineon/crypto/infineon_crypto.gni")
2021
import("${chip_root}/src/platform/device.gni")
22+
import("${chip_root}/third_party/infineon/trustm/trustm_config.gni")
2123
import("${psoc6_sdk_build_root}/psoc6_executable.gni")
2224
import("${psoc6_sdk_build_root}/psoc6_sdk.gni")
2325

@@ -117,6 +119,19 @@ psoc6_executable("lock_app") {
117119
"${psoc6_project_dir}/include",
118120
]
119121

122+
if (chip_crypto == "platform") {
123+
include_dirs += [ "${chip_root}/third_party/infineon/trustm" ]
124+
include_dirs += [ "${chip_root}/examples/platform/infineon/trustm" ]
125+
include_dirs += [ "${chip_root}/src/platform/Infineon/crypto/trustm" ]
126+
127+
defines = [ "ENABLE_DEVICE_ATTESTATION=1" ]
128+
129+
public_deps += [
130+
"${chip_root}/src/platform/Infineon/crypto/${infineon_crypto_impl}:infineon_crypto_lib",
131+
"${chip_root}/third_party/infineon/trustm:optiga-trust-m",
132+
]
133+
}
134+
120135
sources = [
121136
"${examples_plat_dir}/LEDWidget.cpp",
122137
"${examples_plat_dir}/init_psoc6Platform.cpp",

0 commit comments

Comments
 (0)