Skip to content

Commit

Permalink
[Infineon] Update CYW30739 to support CYW30739B2-P5-EVK-XX boards. (#…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
hsusid authored May 7, 2024
1 parent 3b1c60a commit 464ddb6
Show file tree
Hide file tree
Showing 103 changed files with 1,919 additions and 6,566 deletions.
82 changes: 65 additions & 17 deletions .github/workflows/examples-infineon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,41 +107,89 @@ jobs:
out/artifacts/infineon-psoc6-light/chip-psoc6-lighting-example.out \
/tmp/bloat_reports/
- name: Build example CYW30739 Apps
- name: Build CYW30739 Lighting App
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target cyw30739-cyw930739m2evb_01-light \
--target cyw30739-cyw930739m2evb_01-lock \
--target cyw30739-cyw930739m2evb_01-ota-requestor \
--target cyw30739-cyw930739m2evb_01-switch \
--target cyw30739-cyw30739b2_p5_evk_01-light \
--target cyw30739-cyw30739b2_p5_evk_02-light \
--target cyw30739-cyw30739b2_p5_evk_03-light \
--target cyw30739-cyw930739m2evb_02-light \
build \
--copy-artifacts-to out/artifacts \
"
- name: Get light size stats
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cyw30739 cyw930739m2evb_01 light \
out/artifacts/cyw30739-cyw930739m2evb_01-light/chip-cyw30739-lighting-example.elf \
cyw30739 CYW30739B2-P5-EVK-01 light \
out/artifacts/cyw30739-cyw30739b2_p5_evk_01-light/lighting_app-CYW30739B2-P5-EVK-01.elf \
/tmp/bloat_reports/
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cyw30739 CYW30739B2-P5-EVK-02 light \
out/artifacts/cyw30739-cyw30739b2_p5_evk_02-light/lighting_app-CYW30739B2-P5-EVK-02.elf \
/tmp/bloat_reports/
- name: Get lock size stats
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cyw30739 cyw930739m2evb_01 lock \
out/artifacts/cyw30739-cyw930739m2evb_01-lock/chip-cyw30739-lock-example.elf \
cyw30739 CYW30739B2-P5-EVK-03 light \
out/artifacts/cyw30739-cyw30739b2_p5_evk_03-light/lighting_app-CYW30739B2-P5-EVK-03.elf \
/tmp/bloat_reports/
- name: Get ota-requestor size stats
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cyw30739 CYW930739M2EVB-02 light \
out/artifacts/cyw30739-cyw930739m2evb_02-light/lighting_app-CYW930739M2EVB-02.elf \
/tmp/bloat_reports/
- name: Clean out build output
run: rm -rf ./out
- name: Build CYW30739 Light Switch App
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target cyw30739-cyw30739b2_p5_evk_01-light-switch \
--target cyw30739-cyw30739b2_p5_evk_02-light-switch \
--target cyw30739-cyw30739b2_p5_evk_03-light-switch \
build \
--copy-artifacts-to out/artifacts \
"
- name: Get light-switch size stats
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cyw30739 cyw930739m2evb_01 ota-requestor \
out/artifacts/cyw30739-cyw930739m2evb_01-ota-requestor/chip-cyw30739-ota-requestor-example.elf \
cyw30739 CYW30739B2-P5-EVK-01 light-switch \
out/artifacts/cyw30739-cyw30739b2_p5_evk_01-light-switch/light_switch_app-CYW30739B2-P5-EVK-01.elf \
/tmp/bloat_reports/
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cyw30739 CYW30739B2-P5-EVK-02 light-switch \
out/artifacts/cyw30739-cyw30739b2_p5_evk_02-light-switch/light_switch_app-CYW30739B2-P5-EVK-02.elf \
/tmp/bloat_reports/
- name: Get switch size stats
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cyw30739 CYW30739B2-P5-EVK-03 light-switch \
out/artifacts/cyw30739-cyw30739b2_p5_evk_03-light-switch/light_switch_app-CYW30739B2-P5-EVK-03.elf \
/tmp/bloat_reports/
- name: Clean out build output
run: rm -rf ./out
- name: Build CYW30739 Lock App
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target cyw30739-cyw30739b2_p5_evk_01-lock \
--target cyw30739-cyw30739b2_p5_evk_02-lock \
--target cyw30739-cyw30739b2_p5_evk_03-lock \
build \
--copy-artifacts-to out/artifacts \
"
- name: Get lock size stats
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cyw30739 CYW30739B2-P5-EVK-01 lock \
out/artifacts/cyw30739-cyw30739b2_p5_evk_01-lock/lock_app-CYW30739B2-P5-EVK-01.elf \
/tmp/bloat_reports/
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cyw30739 CYW30739B2-P5-EVK-02 lock \
out/artifacts/cyw30739-cyw30739b2_p5_evk_02-lock/lock_app-CYW30739B2-P5-EVK-02.elf \
/tmp/bloat_reports/
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cyw30739 cyw930739m2evb_01 switch \
out/artifacts/cyw30739-cyw930739m2evb_01-switch/chip-cyw30739-light-switch-example.elf \
cyw30739 CYW30739B2-P5-EVK-03 lock \
out/artifacts/cyw30739-cyw30739b2_p5_evk_03-lock/lock_app-CYW30739B2-P5-EVK-03.elf \
/tmp/bloat_reports/
- name: Clean out build output
run: rm -rf ./out
- name: Uploading Size Reports
uses: ./.github/actions/upload-size-reports
if: ${{ !env.ACT }}
Expand Down
26 changes: 8 additions & 18 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@
[submodule "ot-stm32"]
path = third_party/openthread/ot-stm32
url = https://github.com/openthread/openthread
branch = eb6377f
platforms = stm32
branch = eb6377f
platforms = stm32
[submodule "third_party/openthread/ot-ifx"]
path = third_party/openthread/ot-ifx
url = https://github.com/Infineon/ot-ifx-release.git
Expand Down Expand Up @@ -189,22 +189,6 @@
[submodule "third_party/jsoncpp/repo"]
path = third_party/jsoncpp/repo
url = https://github.com/open-source-parsers/jsoncpp.git
[submodule "cyw30739_sdk/30739A0"]
path = third_party/infineon/cyw30739_sdk/repos/30739A0
url = https://github.com/Infineon/OT-Matter-30739A0.git
platforms = infineon
[submodule "cyw30739_sdk/include"]
path = third_party/infineon/cyw30739_sdk/repos/btsdk-include
url = https://github.com/Infineon/btsdk-include.git
platforms = infineon
[submodule "cyw30739_sdk/target"]
path = third_party/infineon/cyw30739_sdk/repos/CYW930739M2EVB-01
url = https://github.com/Infineon/OT-Matter-TARGET_CYW930739M2EVB-01.git
platforms = infineon
[submodule "cyw30739_sdk/tools"]
path = third_party/infineon/cyw30739_sdk/repos/btsdk-tools
url = https://github.com/Infineon/btsdk-tools.git
platforms = infineon
[submodule "third_party/p6/p6_sdk/libs/anycloud-ota"]
path = third_party/infineon/psoc6/psoc6_sdk/libs/anycloud-ota
url = https://github.com/Infineon/anycloud-ota
Expand All @@ -217,6 +201,12 @@
path = third_party/infineon/psoc6/psoc6_sdk/libs/serial-flash
url = https://github.com/Infineon/serial-flash
platforms = infineon
[submodule "infineon/matter-wpan-sdk"]
path = third_party/infineon/repos/matter-wpan-sdk
url = https://github.com/Infineon/matter-wpan-sdk.git
branch = main
platforms = infineon
recursive = true
[submodule "ti_simplelink_sdk"]
path = third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx
url = https://github.com/TexasInstruments/cc13xx_cc26xx_sdk.git
Expand Down
7 changes: 5 additions & 2 deletions examples/build_overrides/cyw30739_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
# limitations under the License.

declare_args() {
# Root directory for Matter WPAN SDK.
matter_wpan_sdk_build_root =
"//third_party/connectedhomeip/third_party/infineon/repos/matter-wpan-sdk"

# Root directory for CYW30739 SDK.
cyw30739_sdk_build_root =
"//third_party/connectedhomeip/third_party/infineon/cyw30739_sdk"
cyw30739_sdk_build_root = "//third_party/connectedhomeip/third_party/infineon/repos/matter-wpan-sdk/cyw30739"
}
75 changes: 29 additions & 46 deletions examples/light-switch-app/infineon/cyw30739/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -12,71 +12,54 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")
import("//build_overrides/cyw30739_sdk.gni")

import("${cyw30739_sdk_build_root}/cyw30739_executable.gni")
import("${cyw30739_sdk_build_root}/cyw30739_sdk.gni")
import("${chip_root}/examples/platform/infineon/cyw30739/args.gni")
import("${matter_wpan_sdk_build_root}/matter_wpan_executable.gni")

app_name = "light_switch_app"
cyw30739_project_dir =
"${chip_root}/examples/light-switch-app/infineon/cyw30739"
examples_plat_dir = "${chip_root}/examples/platform/infineon/cyw30739"

declare_args() {
setupPinCode = 20202021
setupDiscriminator = 3840
}

cyw30739_sdk("sdk") {
matter_wpan_example("wpan_example") {
sources = [ "${cyw30739_project_dir}/include/CHIPProjectConfig.h" ]

include_dirs = [
"${cyw30739_project_dir}/include",
"${examples_plat_dir}",
]

defines = [
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE=${setupPinCode}",
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setupDiscriminator}",
]
include_dirs = [ "${cyw30739_project_dir}/include" ]
}

cyw30739_executable("light_switch_app") {
output_name = "chip-cyw30739-light-switch-example.elf"

sources = [
"src/AppShellCommands.cpp",
"src/BindingHandler.cpp",
"src/ButtonHandler.cpp",
"src/LightSwitch.cpp",
"src/LightingManager.cpp",
"src/ZclCallbacks.cpp",
"src/main.cpp",
]
template("matter_wpan_app") {
forward_variables_from(invoker, [ "board" ])

deps = [
":sdk",
"${chip_root}/examples/light-switch-app/light-switch-common",
"${chip_root}/examples/providers:device_info_provider",
"${chip_root}/examples/shell/shell_common:shell_common",
"${chip_root}/src/lib",
]
import("${matter_wpan_sdk_build_root}/boards/${board}/args.gni")

include_dirs = [ "include" ]
matter_wpan_executable(target_name) {
sources = [
"src/AppShellCommands.cpp",
"src/AppTask.cpp",
"src/BindingHandler.cpp",
"src/ButtonHandler.cpp",
"src/LightSwitch.cpp",
"src/ZclCallbacks.cpp",
]

if (chip_enable_ota_requestor) {
sources += [
"${examples_plat_dir}/OTAConfig.cpp",
"${examples_plat_dir}/OTAConfig.h",
deps = [
"${chip_root}/examples/shell/shell_common:shell_common",
app_data_model,
]

include_dirs = [ "include" ]
}
}

group("cyw30739") {
deps = [ ":light_switch_app" ]
foreach(board, matter_wpan_sdk_board_list) {
matter_wpan_app("${app_name}-${board}") {
}
}

group("default") {
deps = [ ":cyw30739" ]
deps = []
foreach(board, matter_wpan_sdk_board_list) {
deps += [ ":${app_name}-${board}" ]
}
}
Loading

0 comments on commit 464ddb6

Please sign in to comment.