1 # Copyright (c) 2020 Project CHIP Authors
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
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")
20 import("${build_root}/config/defaults.gni")
22 import("${ti_simplelink_sdk_build_root}/ti_simplelink_executable.gni")
23 import("${ti_simplelink_sdk_build_root}/ti_simplelink_sdk.gni")
25 assert(current_os == "freertos")
27 project_dir = "${chip_root}/examples/lock-app/cc13x2x7_26x2x7"
29 ti_simplelink_sdk("sdk") {
30 include_dirs = [ "${project_dir}/main/include" ]
34 defines += [ "BUILD_RELEASE=0" ]
36 defines += [ "BUILD_RELEASE=1" ]
40 ti_sysconfig("sysconfig") {
41 sources = [ "${project_dir}/chip.syscfg" ]
43 "ti_devices_config.c",
46 "ti_drivers_config.c",
47 "ti_drivers_config.h",
50 "ti_dmm_application_policy.c",
51 "ti_dmm_application_policy.h",
53 # disabled until upstream generation is aligned
57 # not traditional source files
58 #"ti_utils_build_linker.cmd.genlibs",
60 #"ti_utils_runtime_model.gv",
61 #"ti_utils_runtime_Makefile",
62 #"ti_ble_app_config.opt",
63 #"ti_build_config.opt",
65 public_configs = [ ":sdk_dmm_config" ]
69 "@" + rebase_path("${target_gen_dir}/sysconfig/ti_ble_app_config.opt",
71 "@" + rebase_path("${target_gen_dir}/sysconfig/ti_build_config.opt",
76 ti_simplelink_executable("lock_app") {
78 "${chip_root}/src/app/util",
79 "${chip_root}/src/app/server",
81 "${project_dir}/main",
82 "${project_dir}/main/include",
85 output_name = "chip-${ti_simplelink_board}-lock-example.out"
90 "${chip_root}/examples/lock-app/lock-common",
91 "${chip_root}/src/lib",
92 "${openthread_root}:libopenthread-cli-ftd",
96 "${project_dir}/main/AppTask.cpp",
97 "${project_dir}/main/BoltLockManager.cpp",
98 "${project_dir}/main/ZclCallbacks.cpp",
99 "${project_dir}/main/main.cpp",
103 "-Wno-implicit-fallthrough",
107 output_dir = root_out_dir
109 ldscript = "${ti_simplelink_sdk_root}/source/ti/dmm/apps/common/freertos/cc13x2x7_cc26x2x7.lds"
112 "-L${ti_simplelink_sdk_root}/source",
113 rebase_path("${target_gen_dir}/sysconfig/ti_utils_build_linker.cmd.genlibs",
115 "-T" + rebase_path(ldscript, root_build_dir),
119 group("cc13x2x7_26x2x7") {
120 deps = [ ":lock_app" ]
124 deps = [ ":cc13x2x7_26x2x7" ]