Skip to content

Commit 84e91c4

Browse files
committed
[Infineon] Update CYW30739 to support CYW30739B2-P5-EVK-XX boards.
* Replace CYW30739 submodules with the matter-wpan-sdk submodule. * Update README files for CYW30739 apps. * Add CYW30739B2-P5-EVK-01, CYW30739B2-P5-EVK-02, and CYW30739B2-P5-EVK-03 boards for CYW30739. * Add development DAC files for CYW30739. * Add cyw30739_example, cyw30739_platform, and ifx_openthread template for board dependant targets. * Update GN files for CYW30739 apps. * Update CYW30739 builder scripts. * Update the CYW30739 flashing script. * Update the workflow to build all CYW30739-supported targets. * Move shared codes to the matter_config.cpp file. * Implemented FactoryDataProvider for CYW30739 to load factory data.
1 parent c41c179 commit 84e91c4

File tree

96 files changed

+1922
-6109
lines changed

Some content is hidden

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

96 files changed

+1922
-6109
lines changed

.github/workflows/examples-infineon.yaml

+63-17
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ jobs:
4747
uses: ./.github/actions/checkout-submodules-and-bootstrap
4848
with:
4949
platform: infineon
50+
- name: Checkout submodules recursively
51+
uses: ./.github/actions/checkout-submodules
52+
with:
53+
platform: infineon-recursive
54+
extra-parameters: "--recursive"
5055

5156
- name: Set up environment for size reports
5257
uses: ./.github/actions/setup-size-reports
@@ -107,41 +112,82 @@ jobs:
107112
out/artifacts/infineon-psoc6-light/chip-psoc6-lighting-example.out \
108113
/tmp/bloat_reports/
109114
110-
- name: Build example CYW30739 Apps
115+
- name: Build some CYW30739 Lighting Apps
111116
run: |
112117
./scripts/run_in_build_env.sh \
113118
"./scripts/build/build_examples.py \
114-
--target cyw30739-cyw930739m2evb_01-light \
115-
--target cyw30739-cyw930739m2evb_01-lock \
116-
--target cyw30739-cyw930739m2evb_01-ota-requestor \
117-
--target cyw30739-cyw930739m2evb_01-switch \
119+
--target cyw30739-light \
118120
build \
119121
--copy-artifacts-to out/artifacts \
120122
"
121123
- name: Get light size stats
122124
run: |
123125
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
124-
cyw30739 cyw930739m2evb_01 light \
125-
out/artifacts/cyw30739-cyw930739m2evb_01-light/chip-cyw30739-lighting-example.elf \
126+
cyw30739 CYW30739B2-P5-EVK-01 light \
127+
out/artifacts/cyw30739-light/lighting_app-CYW30739B2-P5-EVK-01.elf \
128+
/tmp/bloat_reports/
129+
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
130+
cyw30739 CYW30739B2-P5-EVK-02 light \
131+
out/artifacts/cyw30739-light/lighting_app-CYW30739B2-P5-EVK-02.elf \
132+
/tmp/bloat_reports/
133+
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
134+
cyw30739 CYW30739B2-P5-EVK-03 light \
135+
out/artifacts/cyw30739-light/lighting_app-CYW30739B2-P5-EVK-03.elf \
126136
/tmp/bloat_reports/
127-
- name: Get lock size stats
128-
run: |
129137
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
130-
cyw30739 cyw930739m2evb_01 lock \
131-
out/artifacts/cyw30739-cyw930739m2evb_01-lock/chip-cyw30739-lock-example.elf \
138+
cyw30739 CYW930739M2EVB-02 light \
139+
out/artifacts/cyw30739-light/lighting_app-CYW930739M2EVB-02.elf \
132140
/tmp/bloat_reports/
133-
- name: Get ota-requestor size stats
141+
- name: Clean out build output
142+
run: rm -rf ./out
143+
- name: Build some CYW30739 Light Switch Apps
134144
run: |
145+
./scripts/run_in_build_env.sh \
146+
"./scripts/build/build_examples.py \
147+
--target cyw30739-light-switch \
148+
build \
149+
--copy-artifacts-to out/artifacts \
150+
"
151+
- name: Get light-switch size stats
152+
run: |
153+
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
154+
cyw30739 CYW30739B2-P5-EVK-01 light-switch \
155+
out/artifacts/cyw30739-light-switch/light_switch_app-CYW30739B2-P5-EVK-01.elf \
156+
/tmp/bloat_reports/
157+
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
158+
cyw30739 CYW30739B2-P5-EVK-02 light-switch \
159+
out/artifacts/cyw30739-light-switch/light_switch_app-CYW30739B2-P5-EVK-02.elf \
160+
/tmp/bloat_reports/
135161
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
136-
cyw30739 cyw930739m2evb_01 ota-requestor \
137-
out/artifacts/cyw30739-cyw930739m2evb_01-ota-requestor/chip-cyw30739-ota-requestor-example.elf \
162+
cyw30739 CYW30739B2-P5-EVK-03 light-switch \
163+
out/artifacts/cyw30739-light-switch/light_switch_app-CYW30739B2-P5-EVK-03.elf \
138164
/tmp/bloat_reports/
139-
- name: Get switch size stats
165+
- name: Clean out build output
166+
run: rm -rf ./out
167+
- name: Build some CYW30739 Lock Apps
168+
run: |
169+
./scripts/run_in_build_env.sh \
170+
"./scripts/build/build_examples.py \
171+
--target cyw30739-lock \
172+
build \
173+
--copy-artifacts-to out/artifacts \
174+
"
175+
- name: Get lock size stats
140176
run: |
141177
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
142-
cyw30739 cyw930739m2evb_01 switch \
143-
out/artifacts/cyw30739-cyw930739m2evb_01-switch/chip-cyw30739-light-switch-example.elf \
178+
cyw30739 CYW30739B2-P5-EVK-01 lock \
179+
out/artifacts/cyw30739-lock/lock_app-CYW30739B2-P5-EVK-01.elf \
180+
/tmp/bloat_reports/
181+
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
182+
cyw30739 CYW30739B2-P5-EVK-02 lock \
183+
out/artifacts/cyw30739-lock/lock_app-CYW30739B2-P5-EVK-02.elf \
184+
/tmp/bloat_reports/
185+
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
186+
cyw30739 CYW30739B2-P5-EVK-03 lock \
187+
out/artifacts/cyw30739-lock/lock_app-CYW30739B2-P5-EVK-03.elf \
144188
/tmp/bloat_reports/
189+
- name: Clean out build output
190+
run: rm -rf ./out
145191
- name: Uploading Size Reports
146192
uses: ./.github/actions/upload-size-reports
147193
if: ${{ !env.ACT }}

.gitmodules

+5-16
Original file line numberDiff line numberDiff line change
@@ -189,22 +189,6 @@
189189
[submodule "third_party/jsoncpp/repo"]
190190
path = third_party/jsoncpp/repo
191191
url = https://github.com/open-source-parsers/jsoncpp.git
192-
[submodule "cyw30739_sdk/30739A0"]
193-
path = third_party/infineon/cyw30739_sdk/repos/30739A0
194-
url = https://github.com/Infineon/OT-Matter-30739A0.git
195-
platforms = infineon
196-
[submodule "cyw30739_sdk/include"]
197-
path = third_party/infineon/cyw30739_sdk/repos/btsdk-include
198-
url = https://github.com/Infineon/btsdk-include.git
199-
platforms = infineon
200-
[submodule "cyw30739_sdk/target"]
201-
path = third_party/infineon/cyw30739_sdk/repos/CYW930739M2EVB-01
202-
url = https://github.com/Infineon/OT-Matter-TARGET_CYW930739M2EVB-01.git
203-
platforms = infineon
204-
[submodule "cyw30739_sdk/tools"]
205-
path = third_party/infineon/cyw30739_sdk/repos/btsdk-tools
206-
url = https://github.com/Infineon/btsdk-tools.git
207-
platforms = infineon
208192
[submodule "third_party/p6/p6_sdk/libs/anycloud-ota"]
209193
path = third_party/infineon/psoc6/psoc6_sdk/libs/anycloud-ota
210194
url = https://github.com/Infineon/anycloud-ota
@@ -217,6 +201,11 @@
217201
path = third_party/infineon/psoc6/psoc6_sdk/libs/serial-flash
218202
url = https://github.com/Infineon/serial-flash
219203
platforms = infineon
204+
[submodule "infineon/matter-wpan-sdk"]
205+
path = third_party/infineon/repos/matter-wpan-sdk
206+
url = https://github.com/Infineon/matter-wpan-sdk.git
207+
branch = main
208+
platforms = infineon-recursive
220209
[submodule "ti_simplelink_sdk"]
221210
path = third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx
222211
url = https://github.com/TexasInstruments/cc13xx_cc26xx_sdk.git

examples/build_overrides/cyw30739_sdk.gni

+5-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
# limitations under the License.
1414

1515
declare_args() {
16+
# Root directory for Matter WPAN SDK.
17+
matter_wpan_sdk_build_root =
18+
"//third_party/connectedhomeip/third_party/infineon/repos/matter-wpan-sdk"
19+
1620
# Root directory for CYW30739 SDK.
17-
cyw30739_sdk_build_root =
18-
"//third_party/connectedhomeip/third_party/infineon/cyw30739_sdk"
21+
cyw30739_sdk_build_root = "//third_party/connectedhomeip/third_party/infineon/repos/matter-wpan-sdk/cyw30739"
1922
}

examples/light-switch-app/infineon/cyw30739/BUILD.gn

+29-46
Original file line numberDiff line numberDiff line change
@@ -12,71 +12,54 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
import("//build_overrides/build.gni")
1615
import("//build_overrides/chip.gni")
1716
import("//build_overrides/cyw30739_sdk.gni")
1817

19-
import("${cyw30739_sdk_build_root}/cyw30739_executable.gni")
20-
import("${cyw30739_sdk_build_root}/cyw30739_sdk.gni")
18+
import("${chip_root}/examples/platform/infineon/cyw30739/args.gni")
19+
import("${matter_wpan_sdk_build_root}/matter_wpan_executable.gni")
2120

21+
app_name = "light_switch_app"
2222
cyw30739_project_dir =
2323
"${chip_root}/examples/light-switch-app/infineon/cyw30739"
24-
examples_plat_dir = "${chip_root}/examples/platform/infineon/cyw30739"
2524

26-
declare_args() {
27-
setupPinCode = 20202021
28-
setupDiscriminator = 3840
29-
}
30-
31-
cyw30739_sdk("sdk") {
25+
matter_wpan_example("wpan_example") {
3226
sources = [ "${cyw30739_project_dir}/include/CHIPProjectConfig.h" ]
3327

34-
include_dirs = [
35-
"${cyw30739_project_dir}/include",
36-
"${examples_plat_dir}",
37-
]
38-
39-
defines = [
40-
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE=${setupPinCode}",
41-
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setupDiscriminator}",
42-
]
28+
include_dirs = [ "${cyw30739_project_dir}/include" ]
4329
}
4430

45-
cyw30739_executable("light_switch_app") {
46-
output_name = "chip-cyw30739-light-switch-example.elf"
47-
48-
sources = [
49-
"src/AppShellCommands.cpp",
50-
"src/BindingHandler.cpp",
51-
"src/ButtonHandler.cpp",
52-
"src/LightSwitch.cpp",
53-
"src/LightingManager.cpp",
54-
"src/ZclCallbacks.cpp",
55-
"src/main.cpp",
56-
]
31+
template("matter_wpan_app") {
32+
forward_variables_from(invoker, [ "board" ])
5733

58-
deps = [
59-
":sdk",
60-
"${chip_root}/examples/light-switch-app/light-switch-common",
61-
"${chip_root}/examples/providers:device_info_provider",
62-
"${chip_root}/examples/shell/shell_common:shell_common",
63-
"${chip_root}/src/lib",
64-
]
34+
import("${matter_wpan_sdk_build_root}/boards/${board}/args.gni")
6535

66-
include_dirs = [ "include" ]
36+
matter_wpan_executable(target_name) {
37+
sources = [
38+
"src/AppShellCommands.cpp",
39+
"src/AppTask.cpp",
40+
"src/BindingHandler.cpp",
41+
"src/ButtonHandler.cpp",
42+
"src/LightSwitch.cpp",
43+
"src/ZclCallbacks.cpp",
44+
]
6745

68-
if (chip_enable_ota_requestor) {
69-
sources += [
70-
"${examples_plat_dir}/OTAConfig.cpp",
71-
"${examples_plat_dir}/OTAConfig.h",
46+
deps = [
47+
"${chip_root}/examples/shell/shell_common:shell_common",
48+
app_data_model,
7249
]
50+
51+
include_dirs = [ "include" ]
7352
}
7453
}
7554

76-
group("cyw30739") {
77-
deps = [ ":light_switch_app" ]
55+
foreach(board, matter_wpan_sdk_board_list) {
56+
matter_wpan_app("${app_name}-${board}") {
57+
}
7858
}
7959

8060
group("default") {
81-
deps = [ ":cyw30739" ]
61+
deps = []
62+
foreach(board, matter_wpan_sdk_board_list) {
63+
deps += [ ":${app_name}-${board}" ]
64+
}
8265
}

0 commit comments

Comments
 (0)