forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.gn
117 lines (103 loc) · 4.03 KB
/
BUILD.gn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# Copyright (c) 2021 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("${chip_root}/src/platform/device.gni")
import("${chip_root}/build/chip/buildconfig_header.gni")
import("${chip_root}/src/crypto/crypto.gni")
import("${chip_root}/src/platform/silabs/wifi_args.gni")
import("${chip_root}/third_party/silabs/SiWx917_sdk.gni")
import("${chip_root}/third_party/silabs/silabs_board.gni")
silabs_platform_dir = "${chip_root}/src/platform/silabs"
assert(chip_device_platform == "SiWx917")
if (chip_crypto == "platform") {
import("//build_overrides/mbedtls.gni")
}
config("siwx917-platform-wifi-config") {
include_dirs = [ "wifi" ]
defines = []
}
static_library("SiWx917") {
sources = [
"${silabs_platform_dir}/BLEManagerImpl.h",
"${silabs_platform_dir}/BlePlatformConfig.h",
"${silabs_platform_dir}/CHIPDevicePlatformConfig.h",
"${silabs_platform_dir}/CHIPDevicePlatformEvent.h",
"${silabs_platform_dir}/CHIPMem-Platform.cpp",
"${silabs_platform_dir}/CHIPPlatformConfig.h",
"${silabs_platform_dir}/ConfigurationManagerImpl.cpp",
"${silabs_platform_dir}/ConfigurationManagerImpl.h",
"${silabs_platform_dir}/ConnectivityManagerImpl.h",
"${silabs_platform_dir}/DiagnosticDataProviderImpl.cpp",
"${silabs_platform_dir}/DiagnosticDataProviderImpl.h",
"${silabs_platform_dir}/InetPlatformConfig.h",
"${silabs_platform_dir}/KeyValueStoreManagerImpl.cpp",
"${silabs_platform_dir}/KeyValueStoreManagerImpl.h",
"${silabs_platform_dir}/MigrationManager.cpp",
"${silabs_platform_dir}/MigrationManager.h",
"${silabs_platform_dir}/PlatformManagerImpl.cpp",
"${silabs_platform_dir}/PlatformManagerImpl.h",
"${silabs_platform_dir}/SilabsConfig.cpp",
"${silabs_platform_dir}/SilabsConfig.h",
"${silabs_platform_dir}/SystemPlatformConfig.h",
"${silabs_platform_dir}/platformAbstraction/SilabsPlatform.h",
"${silabs_platform_dir}/platformAbstraction/SilabsPlatformBase.h",
"${silabs_platform_dir}/platformAbstraction/WiseMcuSpam.cpp",
"../../FreeRTOS/SystemTimeSupport.cpp",
"../../SingletonConfigurationManager.cpp",
"../rs911x/BLEManagerImpl.cpp",
"../rs911x/rsi_ble_config.h",
"../rs911x/wfx_sl_ble_init.c",
"../rs911x/wfx_sl_ble_init.h",
]
if (chip_enable_ota_requestor) {
sources += [
"${silabs_platform_dir}/OTAImageProcessorImpl.h",
"OTAImageProcessorImpl.cpp",
]
}
public_deps = [
"${chip_root}/src/app/icd/server:icd-server-config",
"${chip_root}/src/platform:platform_base",
]
deps = [ "${chip_root}/src/platform/logging:headers" ]
# Add platform crypto implementation
if (chip_crypto == "platform") {
if (sl_si91x_crypto_flavor == "tinycrypt") {
sources += [ "CHIPCryptoPALTinyCrypt.cpp" ]
}
if (sl_si91x_crypto_flavor == "psa") {
sources += [ "${silabs_platform_dir}/efr32/CHIPCryptoPALPsaEfr32.cpp" ]
}
public_deps += [
"${chip_root}/src/crypto",
"${mbedtls_root}:mbedtls",
]
}
sources += [
"${silabs_platform_dir}/ConnectivityManagerImpl_WIFI.cpp",
"${silabs_platform_dir}/NetworkCommissioningWiFiDriver.cpp",
"${silabs_platform_dir}/NetworkCommissioningWiFiDriver.h",
"${silabs_platform_dir}/wifi/wfx_host_events.h",
"wifi/wfx_msgs.h",
"wifi/wifi_config.h",
]
public_configs = [ ":siwx917-platform-wifi-config" ]
}
source_set("logging") {
sources = [ "${chip_root}/src/platform/silabs/Logging.cpp" ]
deps = [
"${chip_root}/src/platform:platform_base",
"${chip_root}/src/platform/logging:headers",
]
}