| # 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/chip.gni") |
| import("//build_overrides/openthread.gni") |
| import("//build_overrides/ti_simplelink_sdk.gni") |
| |
| import("${ti_simplelink_sdk_build_root}/ti_simplelink_board.gni") |
| import("${ti_simplelink_sdk_build_root}/ti_simplelink_sdk.gni") |
| |
| openthread_ti_root = "${chip_root}/third_party/openthread/ot-ti" |
| |
| config("openthread_cc13x4_cc26x4_config") { |
| include_dirs = [ |
| "${openthread_root}/examples/platforms", |
| "${openthread_root}/src/core", |
| "${openthread_ti_root}/src", |
| ] |
| } |
| |
| source_set("libopenthread-cc13x4_cc26x4") { |
| cflags = [ |
| "-Wno-address-of-packed-member", |
| "-Wno-implicit-fallthrough", |
| "-Wno-unused-label", |
| ] |
| public_deps = [ |
| "${openthread_root}/src/core:libopenthread_core_headers", |
| "${ti_simplelink_sdk_build_root}:ti_simplelink_sdk", |
| "${ti_simplelink_sdk_build_root}:ti_simplelink_sysconfig", |
| ] |
| |
| configs -= [ "${build_root}/config/compiler:std_default" ] |
| configs += [ "${ti_simplelink_sdk_build_root}:ti_simplelink_posix_config" ] |
| |
| #configs += [ ":${sdk_target_name}_posix_config" ] |
| #configs += [ "${ti_simplelink_sdk_build_root}:ti_simplelink_sdk_posix_config" ] |
| sources = [ |
| #"${openthread_ti_root}/src/system.c", |
| "${openthread_root}/examples/platforms/utils/code_utils.h", |
| "${openthread_root}/examples/platforms/utils/link_metrics.cpp", |
| "${openthread_root}/examples/platforms/utils/link_metrics.h", |
| "${openthread_root}/examples/platforms/utils/mac_frame.cpp", |
| "${openthread_root}/examples/platforms/utils/mac_frame.h", |
| "${openthread_ti_root}/src/alarm.c", |
| "${openthread_ti_root}/src/alarm_micro.c", |
| "${openthread_ti_root}/src/diag.c", |
| "${openthread_ti_root}/src/entropy.c", |
| "${openthread_ti_root}/src/misc.c", |
| "${openthread_ti_root}/src/radio.c", |
| "${openthread_ti_root}/src/settings.c", |
| ] |
| |
| public_configs = [ |
| ":openthread_cc13x4_cc26x4_config", |
| "${openthread_root}:openthread_config", |
| ] |
| if (chip_openthread_ftd) { |
| public_configs += [ "${openthread_root}:openthread_ftd_config" ] |
| } else { |
| public_configs += [ "${openthread_root}:openthread_mtd_config" ] |
| } |
| } |