1 # Copyright (c) 2021 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/chip.gni")
16 import("//build_overrides/k32w_sdk.gni")
17 import("//build_overrides/openthread.gni")
19 import("${k32w_sdk_build_root}/k32w_executable.gni")
20 import("${k32w_sdk_build_root}/k32w_sdk.gni")
22 assert(current_os == "freertos")
24 k32w_platform_dir = "${chip_root}/examples/platform/k32w"
30 "${k32w_platform_dir}/app/project_include",
31 "${k32w_platform_dir}/app/support",
32 "${chip_root}/examples/lighting-app/lighting-common",
33 "${chip_root}/src/app/util",
34 "${chip_root}/src/app/server",
35 "${k32w_platform_dir}/util/include",
39 "${k32w_platform_dir}/app/project_include/CHIPProjectConfig.h",
40 "${k32w_platform_dir}/app/project_include/FreeRTOSConfig.h",
41 "${k32w_platform_dir}/app/project_include/OpenThreadConfig.h",
42 "main/include/app_config.h",
46 [ "${chip_root}/third_party/openthread/platforms:libopenthread-platform" ]
50 defines += [ "BUILD_RELEASE=0" ]
52 defines += [ "BUILD_RELEASE=1" ]
56 k32w_executable("light_app") {
57 output_name = "chip-k32w061-light-example"
60 "${k32w_platform_dir}/util/LEDWidget.cpp",
61 "${k32w_platform_dir}/util/include/LEDWidget.h",
63 "main/LightingManager.cpp",
64 "main/ZclCallbacks.cpp",
65 "main/include/AppEvent.h",
66 "main/include/AppTask.h",
67 "main/include/LightingManager.h",
73 "${chip_root}/examples/common/QRCode",
74 "${chip_root}/examples/lighting-app/lighting-common",
75 "${chip_root}/src/lib",
76 "${chip_root}/third_party/mbedtls:mbedtls",
77 "${k32w_platform_dir}/app/support:freertos_mbedtls_utils",
78 "${openthread_root}:libopenthread-cli-ftd",
79 "${openthread_root}:libopenthread-ftd",
82 output_dir = root_out_dir
84 ldscript = "${k32w_platform_dir}/app/ldscripts/chip-k32w061-linker.ld"
86 ldflags = [ "-T" + rebase_path(ldscript, root_build_dir) ]
90 deps = [ ":light_app" ]