Skip to content

Commit e9f64bb

Browse files
authored
[TI] Switch Application for CC13x4_26x4 (project-chip#34916)
* Switch Application for TI CC13x4_26x4 * Added light-switch to CI and restyled changes * OOB configs * CI fix * CI fix in all_targets_linux_x64.txt * revert CI changes for switch-app * updated args.gni comment for logging
1 parent b823a29 commit e9f64bb

19 files changed

+2466
-1
lines changed

.github/workflows/examples-cc13xx_26xx.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
run: |
106106
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
107107
cc13x4_26x4 LP_EM_CC1354P10_6 lighting-app \
108-
out/artifacts/ti-cc13x4_26x4-lighting-mtd/chip-LP_EM_CC1354P10_6-lighting-example.out \
108+
out/artifacts/ti-cc13x4_26x4-lighting-ftd/chip-LP_EM_CC1354P10_6-lighting-example.out \
109109
/tmp/bloat_reports/
110110
- name: Uploading Size Reports
111111
uses: ./.github/actions/upload-size-reports
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Copyright (c) 2020 Project CHIP Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
import("//build_overrides/build.gni")
16+
17+
# The location of the build configuration file.
18+
buildconfig = "${build_root}/config/BUILDCONFIG.gn"
19+
20+
# CHIP uses angle bracket includes.
21+
check_system_includes = true
22+
23+
default_args = {
24+
target_cpu = "arm"
25+
target_os = "freertos"
26+
27+
import("//args.gni")
28+
pw_build_PIP_REQUIREMENTS +=
29+
[ "${chip_root}/scripts/setup/requirements.ti.txt" ]
30+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# Copyright (c) 2020 Project CHIP Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
import("//build_overrides/build.gni")
16+
import("//build_overrides/chip.gni")
17+
import("//build_overrides/openthread.gni")
18+
import("//build_overrides/ti_simplelink_sdk.gni")
19+
20+
import("${build_root}/config/defaults.gni")
21+
22+
import("${chip_root}/src/platform/device.gni")
23+
24+
import("${ti_simplelink_sdk_build_root}/ti_simplelink_executable.gni")
25+
import("${ti_simplelink_sdk_build_root}/ti_simplelink_sdk.gni")
26+
27+
assert(current_os == "freertos")
28+
29+
project_dir = "${chip_root}/examples/light-switch-app/cc13x4_26x4"
30+
31+
ti_simplelink_sdk("sdk") {
32+
include_dirs = [ "${project_dir}/include" ]
33+
public_configs = [ ":light-switch_app_config" ]
34+
}
35+
36+
ti_sysconfig("sysconfig") {
37+
sources = [ "${project_dir}/chip.syscfg" ]
38+
39+
outputs = [
40+
"ti_radio_config.c",
41+
"ti_radio_config.h",
42+
"ti_drivers_config.c",
43+
"ti_drivers_config.h",
44+
"ti_ble_config.c",
45+
"ti_ble_config.h",
46+
"ti_dmm_application_policy.c",
47+
"ti_dmm_application_policy.h",
48+
49+
# CCFG generation disabled for OTA-able application
50+
#"ti_devices_config.c",
51+
#"ti_devices_config.h",
52+
]
53+
54+
public_configs = [ ":sdk_cc13x4_26x4_dmm_config" ]
55+
56+
cflags = [
57+
"-Wno-comment",
58+
"@" + rebase_path("${target_gen_dir}/sysconfig/ti_utils_build_compiler.opt",
59+
root_build_dir),
60+
]
61+
}
62+
63+
ti_simplelink_executable("light-switch_app") {
64+
output_name = "chip-${ti_simplelink_board}-light-switch-example.out"
65+
66+
sources = [
67+
"${chip_root}/examples/providers/DeviceInfoProviderImpl.cpp",
68+
"${chip_root}/src/app/clusters/general-diagnostics-server/GenericFaultTestEventTriggerHandler.cpp",
69+
"${project_dir}/src/AppTask.cpp",
70+
"${project_dir}/src/BindingHandler.cpp",
71+
"${project_dir}/src/LightSwitchManager.cpp",
72+
"${project_dir}/src/ZclCallbacks.cpp",
73+
"${project_dir}/src/main.cpp",
74+
]
75+
76+
public = [
77+
"${chip_root}/src/platform/cc13xx_26xx/DefaultTestEventTriggerDelegate.h",
78+
]
79+
80+
deps = [
81+
":sdk",
82+
":sysconfig",
83+
"${chip_root}/examples/light-switch-app/light-switch-common",
84+
"${chip_root}/examples/platform/cc13x4_26x4:cc13x4_26x4-attestation-credentials",
85+
"${chip_root}/src/lib",
86+
"${chip_root}/third_party/openthread:openthread",
87+
]
88+
defines = []
89+
if (custom_factory_data) {
90+
defines += [ "CC13XX_26XX_FACTORY_DATA" ]
91+
}
92+
93+
if (chip_enable_icd_server) {
94+
defines += [ "TI_ICD_ENABLE_SERVER" ]
95+
}
96+
97+
include_dirs = [
98+
"${project_dir}",
99+
"${chip_root}/examples/providers/",
100+
]
101+
102+
cflags = [
103+
"-Wno-implicit-fallthrough",
104+
"-Wno-sign-compare",
105+
"-Wconversion",
106+
]
107+
108+
output_dir = root_out_dir
109+
}
110+
111+
group("cc13x4_26x4") {
112+
deps = [ ":light-switch_app" ]
113+
}
114+
115+
group("default") {
116+
deps = [ ":cc13x4_26x4" ]
117+
}

0 commit comments

Comments
 (0)