| # 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_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", |
| |
| # 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_cc13x4_26x4_dmm_config" ] |
| |
| cflags = [ |
| "-Wno-comment", |
| "@" + rebase_path("${target_gen_dir}/sysconfig/ti_utils_build_compiler.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/air-quality-instance.cpp", |
| "${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/concentration-measurement-instances.cpp", |
| "${chip_root}/examples/all-clusters-app/all-clusters-common/src/device-energy-management-stub.cpp", |
| "${chip_root}/examples/all-clusters-app/all-clusters-common/src/energy-evse-stub.cpp", |
| "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", |
| "${chip_root}/examples/all-clusters-app/all-clusters-common/src/oven-modes.cpp", |
| "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-delegates.cpp", |
| "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", |
| "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", |
| "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", |
| "${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp", |
| "${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp", |
| "${chip_root}/examples/energy-management-app/energy-management-common/src/ElectricalPowerMeasurementDelegate.cpp", |
| "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp", |
| "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.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" ] |
| } |
| |
| defines = [] |
| |
| if (custom_factory_data) { |
| defines += [ "CC13XX_26XX_FACTORY_DATA" ] |
| } |
| |
| if (chip_enable_icd_server) { |
| defines += [ "TI_ICD_ENABLE_SERVER" ] |
| } |
| |
| include_dirs = [ |
| "${project_dir}", |
| "${project_dir}/main", |
| "${chip_root}/examples/all-clusters-app/all-clusters-common/include", |
| "${chip_root}/examples/energy-management-app/energy-management-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" ] |
| } |