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/qpg6100_sdk.gni")
20 import("${build_root}/config/defaults.gni")
21 import("${qpg6100_sdk_build_root}/qpg6100_executable.gni")
22 import("${qpg6100_sdk_build_root}/qpg6100_sdk.gni")
24 assert(current_os == "freertos")
26 qpg6100_project_dir = "${chip_root}/examples/lighting-app/qpg6100"
27 examples_plat_dir = "${chip_root}/examples/platform/qpg6100"
31 "${chip_root}/src/platform/qpg6100",
32 "${examples_plat_dir}/project_include",
36 "${examples_plat_dir}/app/include/Service.h",
37 "${examples_plat_dir}/project_include/CHIPProjectConfig.h",
43 qpg6100_executable("lighting_app") {
46 output_name = "chip-qpg6100-lighting-example.out"
50 "${chip_root}/examples/lighting-app/lighting-common/",
51 "${chip_root}/src/lib",
52 "${chip_root}/src/setup_payload",
53 "${chip_root}/third_party/openthread/platforms:libopenthread-platform",
54 "${chip_root}/third_party/openthread/platforms:libopenthread-platform-utils",
55 "${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd",
56 "${chip_root}/third_party/openthread/repo:libopenthread-ftd",
60 "${qpg6100_project_dir}/include/",
61 "${chip_root}/src/app/util",
62 "${chip_root}/src/app/server",
63 "${examples_plat_dir}",
64 "${examples_plat_dir}/app/include",
68 "${examples_plat_dir}/app/Service.cpp",
69 "${examples_plat_dir}/app/main.cpp",
71 "src/LightingManager.cpp",
72 "src/ZclCallbacks.cpp",
75 output_dir = root_out_dir
77 ldscript = "${qpg6100_sdk_root}/qpg6100/ldscripts/chip-qpg6100-example.ld"
79 ldflags = [ "-T" + rebase_path(ldscript, root_build_dir) ]
83 deps = [ ":lighting_app" ]