Skip to content

Commit

Permalink
[TI] Switch Application for CC13x4_26x4 (#34916)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
abiradarti authored and pull[bot] committed Sep 3, 2024
1 parent 7ba7f74 commit 1713540
Show file tree
Hide file tree
Showing 19 changed files with 2,466 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/examples-cc13xx_26xx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
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-mtd/chip-LP_EM_CC1354P10_6-lighting-example.out \
out/artifacts/ti-cc13x4_26x4-lighting-ftd/chip-LP_EM_CC1354P10_6-lighting-example.out \
/tmp/bloat_reports/
- name: Uploading Size Reports
uses: ./.github/actions/upload-size-reports
Expand Down
30 changes: 30 additions & 0 deletions examples/light-switch-app/cc13x4_26x4/.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 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")
pw_build_PIP_REQUIREMENTS +=
[ "${chip_root}/scripts/setup/requirements.ti.txt" ]
}
117 changes: 117 additions & 0 deletions examples/light-switch-app/cc13x4_26x4/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# 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/light-switch-app/cc13x4_26x4"

ti_simplelink_sdk("sdk") {
include_dirs = [ "${project_dir}/include" ]
public_configs = [ ":light-switch_app_config" ]
}

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

outputs = [
"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",

# CCFG generation disabled for OTA-able application
#"ti_devices_config.c",
#"ti_devices_config.h",
]

public_configs = [ ":sdk_cc13x4_26x4_dmm_config" ]

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

ti_simplelink_executable("light-switch_app") {
output_name = "chip-${ti_simplelink_board}-light-switch-example.out"

sources = [
"${chip_root}/examples/providers/DeviceInfoProviderImpl.cpp",
"${chip_root}/src/app/clusters/general-diagnostics-server/GenericFaultTestEventTriggerHandler.cpp",
"${project_dir}/src/AppTask.cpp",
"${project_dir}/src/BindingHandler.cpp",
"${project_dir}/src/LightSwitchManager.cpp",
"${project_dir}/src/ZclCallbacks.cpp",
"${project_dir}/src/main.cpp",
]

public = [
"${chip_root}/src/platform/cc13xx_26xx/DefaultTestEventTriggerDelegate.h",
]

deps = [
":sdk",
":sysconfig",
"${chip_root}/examples/light-switch-app/light-switch-common",
"${chip_root}/examples/platform/cc13x4_26x4:cc13x4_26x4-attestation-credentials",
"${chip_root}/src/lib",
"${chip_root}/third_party/openthread:openthread",
]
defines = []
if (custom_factory_data) {
defines += [ "CC13XX_26XX_FACTORY_DATA" ]
}

if (chip_enable_icd_server) {
defines += [ "TI_ICD_ENABLE_SERVER" ]
}

include_dirs = [
"${project_dir}",
"${chip_root}/examples/providers/",
]

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

output_dir = root_out_dir
}

group("cc13x4_26x4") {
deps = [ ":light-switch_app" ]
}

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

0 comments on commit 1713540

Please sign in to comment.