Skip to content

Commit 464ddb6

Browse files
authored
[Infineon] Update CYW30739 to support CYW30739B2-P5-EVK-XX boards. (project-chip#33065)
* Remove the Infineon CYW30739 ota-requestor-app. * [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. configuration in the .gitmodules file. * 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. * Fix the job names in the examples-infineon.yaml. * Update build scripts for CYW30739 to build one board at a time.
1 parent 3b1c60a commit 464ddb6

File tree

103 files changed

+1919
-6566
lines changed

Some content is hidden

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

103 files changed

+1919
-6566
lines changed

.github/workflows/examples-infineon.yaml

+65-17
Original file line numberDiff line numberDiff line change
@@ -107,41 +107,89 @@ jobs:
107107
out/artifacts/infineon-psoc6-light/chip-psoc6-lighting-example.out \
108108
/tmp/bloat_reports/
109109
110-
- name: Build example CYW30739 Apps
110+
- name: Build CYW30739 Lighting App
111111
run: |
112112
./scripts/run_in_build_env.sh \
113113
"./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 \
114+
--target cyw30739-cyw30739b2_p5_evk_01-light \
115+
--target cyw30739-cyw30739b2_p5_evk_02-light \
116+
--target cyw30739-cyw30739b2_p5_evk_03-light \
117+
--target cyw30739-cyw930739m2evb_02-light \
118118
build \
119119
--copy-artifacts-to out/artifacts \
120120
"
121121
- name: Get light size stats
122122
run: |
123123
.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 \
124+
cyw30739 CYW30739B2-P5-EVK-01 light \
125+
out/artifacts/cyw30739-cyw30739b2_p5_evk_01-light/lighting_app-CYW30739B2-P5-EVK-01.elf \
126+
/tmp/bloat_reports/
127+
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
128+
cyw30739 CYW30739B2-P5-EVK-02 light \
129+
out/artifacts/cyw30739-cyw30739b2_p5_evk_02-light/lighting_app-CYW30739B2-P5-EVK-02.elf \
126130
/tmp/bloat_reports/
127-
- name: Get lock size stats
128-
run: |
129131
.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 \
132+
cyw30739 CYW30739B2-P5-EVK-03 light \
133+
out/artifacts/cyw30739-cyw30739b2_p5_evk_03-light/lighting_app-CYW30739B2-P5-EVK-03.elf \
132134
/tmp/bloat_reports/
133-
- name: Get ota-requestor size stats
135+
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
136+
cyw30739 CYW930739M2EVB-02 light \
137+
out/artifacts/cyw30739-cyw930739m2evb_02-light/lighting_app-CYW930739M2EVB-02.elf \
138+
/tmp/bloat_reports/
139+
- name: Clean out build output
140+
run: rm -rf ./out
141+
- name: Build CYW30739 Light Switch App
142+
run: |
143+
./scripts/run_in_build_env.sh \
144+
"./scripts/build/build_examples.py \
145+
--target cyw30739-cyw30739b2_p5_evk_01-light-switch \
146+
--target cyw30739-cyw30739b2_p5_evk_02-light-switch \
147+
--target cyw30739-cyw30739b2_p5_evk_03-light-switch \
148+
build \
149+
--copy-artifacts-to out/artifacts \
150+
"
151+
- name: Get light-switch size stats
134152
run: |
135153
.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 \
154+
cyw30739 CYW30739B2-P5-EVK-01 light-switch \
155+
out/artifacts/cyw30739-cyw30739b2_p5_evk_01-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-cyw30739b2_p5_evk_02-light-switch/light_switch_app-CYW30739B2-P5-EVK-02.elf \
138160
/tmp/bloat_reports/
139-
- name: Get switch size stats
161+
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
162+
cyw30739 CYW30739B2-P5-EVK-03 light-switch \
163+
out/artifacts/cyw30739-cyw30739b2_p5_evk_03-light-switch/light_switch_app-CYW30739B2-P5-EVK-03.elf \
164+
/tmp/bloat_reports/
165+
- name: Clean out build output
166+
run: rm -rf ./out
167+
- name: Build CYW30739 Lock App
140168
run: |
169+
./scripts/run_in_build_env.sh \
170+
"./scripts/build/build_examples.py \
171+
--target cyw30739-cyw30739b2_p5_evk_01-lock \
172+
--target cyw30739-cyw30739b2_p5_evk_02-lock \
173+
--target cyw30739-cyw30739b2_p5_evk_03-lock \
174+
build \
175+
--copy-artifacts-to out/artifacts \
176+
"
177+
- name: Get lock size stats
178+
run: |
179+
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
180+
cyw30739 CYW30739B2-P5-EVK-01 lock \
181+
out/artifacts/cyw30739-cyw30739b2_p5_evk_01-lock/lock_app-CYW30739B2-P5-EVK-01.elf \
182+
/tmp/bloat_reports/
183+
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
184+
cyw30739 CYW30739B2-P5-EVK-02 lock \
185+
out/artifacts/cyw30739-cyw30739b2_p5_evk_02-lock/lock_app-CYW30739B2-P5-EVK-02.elf \
186+
/tmp/bloat_reports/
141187
.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 \
188+
cyw30739 CYW30739B2-P5-EVK-03 lock \
189+
out/artifacts/cyw30739-cyw30739b2_p5_evk_03-lock/lock_app-CYW30739B2-P5-EVK-03.elf \
144190
/tmp/bloat_reports/
191+
- name: Clean out build output
192+
run: rm -rf ./out
145193
- name: Uploading Size Reports
146194
uses: ./.github/actions/upload-size-reports
147195
if: ${{ !env.ACT }}

.gitmodules

+8-18
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@
7676
[submodule "ot-stm32"]
7777
path = third_party/openthread/ot-stm32
7878
url = https://github.com/openthread/openthread
79-
branch = eb6377f
80-
platforms = stm32
79+
branch = eb6377f
80+
platforms = stm32
8181
[submodule "third_party/openthread/ot-ifx"]
8282
path = third_party/openthread/ot-ifx
8383
url = https://github.com/Infineon/ot-ifx-release.git
@@ -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,12 @@
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
209+
recursive = true
220210
[submodule "ti_simplelink_sdk"]
221211
path = third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx
222212
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)