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

Add CC13x4 Example Application support #26576

Merged
Merged
Show file tree
Hide file tree
Changes from 5 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
100 changes: 98 additions & 2 deletions .github/workflows/examples-cc13x2x7_26x2x7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ on:
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
cancel-in-progress: true

env:
CHIP_NO_LOG_TIMESTAMPS: true
# XXX: Workaround for https://github.com/actions/cache/issues/1141
Expand Down Expand Up @@ -79,5 +78,102 @@ jobs:
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log


- name: Build examples
timeout-minutes: 100
run: |
scripts/run_in_build_env.sh "\
./scripts/build/build_examples.py \
--target ti-cc13x2x7_26x2x7-lock-mtd \
--target ti-cc13x2x7_26x2x7-pump-mtd \
--target ti-cc13x2x7_26x2x7-lighting \
--target ti-cc13x2x7_26x2x7-pump-controller-mtd \
--target ti-cc13x4_26x4-lock-ftd \
--target ti-cc13x4_26x4-lock-mtd \
--target ti-cc13x4_26x4-pump-mtd \
--target ti-cc13x4_26x4-pump-ftd \
--target ti-cc13x4_26x4-all-clusters \
--target ti-cc13x4_26x4-pump-controller-mtd \
--target ti-cc13x4_26x4-pump-controller-ftd \
build \
--copy-artifacts-to out/artifacts \
"
- name: Get lock MTD size stats
timeout-minutes: 5
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cc13x2_26x2 LP_CC2652R7 lock-mtd \
out/artifacts/ti-cc13x2x7_26x2x7-lock-mtd/chip-LP_CC2652R7-lock-example.out \
/tmp/bloat_reports/
- name: Get Pump App size stats
timeout-minutes: 5
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cc13x2_26x2 LP_CC2652R7 pump-app \
out/artifacts/ti-cc13x2x7_26x2x7-pump-mtd/chip-LP_CC2652R7-pump-example.out \
/tmp/bloat_reports/
- name: Get Pump Controller App size stats
timeout-minutes: 5
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cc13x2_26x2 LP_CC2652R7 pump-controller-app \
out/artifacts/ti-cc13x2x7_26x2x7-pump-controller-mtd/chip-LP_CC2652R7-pump-controller-example.out \
/tmp/bloat_reports/
- name: Get lock FTD size stats
timeout-minutes: 5
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cc13x4_26x4 LP_EM_CC1354P10_6 lock-ftd \
out/artifacts/ti-cc13x4_26x4-lock-ftd/chip-LP_EM_CC1354P10_6-lock-example.out \
/tmp/bloat_reports/
- name: Get lock MTD size stats
timeout-minutes: 5
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cc13x4_26x4 LP_EM_CC1354P10_6 lock-mtd \
out/artifacts/ti-cc13x4_26x4-lock-mtd/chip-LP_EM_CC1354P10_6-lock-example.out \
/tmp/bloat_reports/
- name: Get Pump App size stats
timeout-minutes: 5
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cc13x4_26x4 LP_EM_CC1354P10_6 pump-app \
out/artifacts/ti-cc13x4_26x4-pump-mtd/chip-LP_EM_CC1354P10_6-pump-example.out \
/tmp/bloat_reports/
- name: Get Pump Controller App size stats
timeout-minutes: 5
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cc13x4_26x4 LP_EM_CC1354P10_6 pump-controller-app \
out/artifacts/ti-cc13x4_26x4-pump-controller-mtd/chip-LP_EM_CC1354P10_6-pump-controller-example.out \
/tmp/bloat_reports/

- name: Get All-clusters App size stats
timeout-minutes: 5
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cc13x4_26x4 LP_EM_CC1354P10_6 all-clusters-app \
out/artifacts/ti-cc13x4_26x4-all-clusters/chip-LP_EM_CC1354P10_6-all-clusters-example.out \
/tmp/bloat_reports/

- name: Get Lighting App size stats
timeout-minutes: 5
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cc13x4_26x4 LP_EM_CC1354P10_6 lighting-app \
out/artifacts/ti-cc13x4_26x4-lighting/chip-LP_EM_CC1354P10_6-lighting-example.out \
/tmp/bloat_reports/
- name: Uploading Size Reports
uses: actions/upload-artifact@v2
if: ${{ !env.ACT }}
with:
name: Size,cc13x2x7_26x2x7-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }}
path: |
/tmp/bloat_reports/
- name: Uploading Size Reports
uses: actions/upload-artifact@v2
if: ${{ !env.ACT }}
with:
name: Size,cc13x4_26x4-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }}
path: |
/tmp/bloat_reports/
2 changes: 1 addition & 1 deletion docs/guides/darwin.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ Example:
- [Simulated Linux](./simulated_device_linux.md)
- [Telink](/examples/lighting-app/telink/README.md)
- [TI Platform](./ti_platform_overview.md)
- [TI All Clusters](/examples/all-clusters-app/cc13x2x7_26x2x7/README.md)
- [TI All Clusters](/examples/all-clusters-app/cc13x4_26x4/README.md)
- [Tizen](/examples/lighting-app/tizen/README.md)

## Providing Feedback to Apple
Expand Down
7 changes: 2 additions & 5 deletions examples/all-clusters-app/cc13x2x7_26x2x7/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@ Some initial setup is necessary for preparing the build environment. This
section will need to be done when migrating to new versions of the SDK. This
guide assumes that the environment is linux based, and recommends Ubuntu 20.04.

- Download and install [SysConfig][sysconfig] ([recommended
version][sysconfig_recommended]). This can be done simply with the following
commands.
- Download and install [SysConfig][sysconfig]. This can be done simply with
the following commands.

```
$ cd ~
Expand Down Expand Up @@ -236,8 +235,6 @@ Additionally, we welcome any feedback.
[matter-e2e-faq]:
https://e2e.ti.com/support/wireless-connectivity/zigbee-thread-group/zigbee-and-thread/f/zigbee-thread-forum/1082428/faq-cc2652r7-matter----getting-started-guide
[sysconfig]: https://www.ti.com/tool/SYSCONFIG
[sysconfig_recommended]:
https://software-dl.ti.com/ccs/esd/sysconfig/sysconfig-1.11.0_2225-setup.run
[ti_thread_dnd]:
https://www.ti.com/wireless-connectivity/thread/design-development.html
[ot_border_router_setup]: https://openthread.io/guides/border-router/build
Expand Down
28 changes: 28 additions & 0 deletions examples/all-clusters-app/cc13x4_26x4/.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright (c) 2020 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

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

# The location of the build configuration file.
buildconfig = "${build_root}/config/BUILDCONFIG.gn"

# CHIP uses angle bracket includes.
check_system_includes = true

default_args = {
target_cpu = "arm"
target_os = "freertos"

import("//args.gni")
}
125 changes: 125 additions & 0 deletions examples/all-clusters-app/cc13x4_26x4/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# Copyright (c) 2020 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# 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/openthread.gni")
import("//build_overrides/ti_simplelink_sdk.gni")

import("${build_root}/config/defaults.gni")

import("${chip_root}/src/platform/device.gni")

import("${ti_simplelink_sdk_build_root}/ti_simplelink_executable.gni")
import("${ti_simplelink_sdk_build_root}/ti_simplelink_sdk.gni")

assert(current_os == "freertos")

project_dir = "${chip_root}/examples/all-clusters-app/cc13x4_26x4"

ti_simplelink_sdk("sdk") {
include_dirs = [ "${project_dir}/main/include" ]
public_configs = [ ":all-clusters-app_config" ]
}

ti_sysconfig("sysconfig") {
sources = [ "${project_dir}/chip.syscfg" ]

outputs = [
"ti_devices_config.c",
"ti_radio_config.c",
"ti_radio_config.h",
"ti_drivers_config.c",
"ti_drivers_config.h",
"ti_ble_config.c",
"ti_ble_config.h",
"ti_dmm_application_policy.c",
"ti_dmm_application_policy.h",

# disabled until upstream generation is aligned
#"tiop_config.h",
#"tiop_config.c",

# not traditional source files
#"ti_utils_build_linker.cmd.genlibs",
#"syscfg_c.rov.xs",
#"ti_utils_runtime_model.gv",
#"ti_utils_runtime_Makefile",
#"ti_ble_app_config.opt",
#"ti_build_config.opt",
]

public_configs = [ ":sdk_dmm_config" ]

cflags = [
"-Wno-comment",
"@" + rebase_path("${target_gen_dir}/sysconfig/ti_ble_app_config.opt",
root_build_dir),
"@" + rebase_path("${target_gen_dir}/sysconfig/ti_build_config.opt",
root_build_dir),
]
}

ti_simplelink_executable("all-clusters-app") {
output_name = "chip-${ti_simplelink_board}-all-clusters-example.out"

sources = [
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp",
"${chip_root}/examples/providers/DeviceInfoProviderImpl.cpp",
"${project_dir}/main/AppTask.cpp",
"${project_dir}/main/ClusterManager.cpp",
"${project_dir}/main/Globals.cpp",
"${project_dir}/main/ZclCallbacks.cpp",
"${project_dir}/main/main.cpp",
]

deps = [
":sdk",
":sysconfig",
"${chip_root}/examples/all-clusters-app/all-clusters-common",
"${chip_root}/examples/platform/cc13x4_26x4:cc13x4_26x4-attestation-credentials",
"${chip_root}/src/lib",
]

if (chip_openthread_ftd) {
deps += [ "${chip_root}/third_party/openthread/repo:libopenthread-ftd" ]
} else {
deps += [ "${chip_root}/third_party/openthread/repo:libopenthread-mtd" ]
}

include_dirs = [
"${project_dir}",
"${project_dir}/main",
"${chip_root}/examples/all-clusters-app/all-clusters-common/include",
"${chip_root}/examples/providers/",
]

cflags = [
"-Wno-implicit-fallthrough",
"-Wno-sign-compare",
"-Wconversion",
]

output_dir = root_out_dir
}

group("cc13x4_26x4") {
deps = [ ":all-clusters-app" ]
}

group("default") {
deps = [ ":cc13x4_26x4" ]
}
Loading