Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Infineon] Update CYW30739 to support CYW30739B2-P5-EVK-XX boards. #33065

Merged
merged 4 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 58 additions & 17 deletions .github/workflows/examples-infineon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,41 +107,82 @@ jobs:
out/artifacts/infineon-psoc6-light/chip-psoc6-lighting-example.out \
/tmp/bloat_reports/

- name: Build example CYW30739 Apps
- name: Build some CYW30739 Lighting Apps
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-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-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-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-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-light/lighting_app-CYW930739M2EVB-02.elf \
/tmp/bloat_reports/
- name: Clean out build output
run: rm -rf ./out
- name: Build some CYW30739 Light Switch Apps
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target cyw30739-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-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-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-light-switch/light_switch_app-CYW30739B2-P5-EVK-03.elf \
/tmp/bloat_reports/
- name: Clean out build output
run: rm -rf ./out
- name: Build some CYW30739 Lock Apps
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target cyw30739-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-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-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-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
Loading