blob: 239dcc5d1d5b4f4acd561d7c0e4a3fd17d52c194 [file] [log] [blame]
# 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("//build_overrides/pigweed.gni")
import("${chip_root}/src/platform/device.gni")
import("${chip_root}/build/chip/buildconfig_header.gni")
import("${chip_root}/src/crypto/crypto.gni")
assert(chip_device_platform == "efr32")
if (chip_enable_openthread) {
import("//build_overrides/openthread.gni")
}
if (chip_crypto == "platform") {
import("//build_overrides/mbedtls.gni")
}
static_library("EFR32") {
sources = [
"../FreeRTOS/SystemTimeSupport.cpp",
"../SingletonConfigurationManager.cpp",
"BLEManagerImpl.cpp",
"BLEManagerImpl.h",
"BlePlatformConfig.h",
"CHIPDevicePlatformConfig.h",
"CHIPDevicePlatformEvent.h",
"CHIPMem-Platform.cpp",
"CHIPPlatformConfig.h",
"ConfigurationManagerImpl.cpp",
"ConfigurationManagerImpl.h",
"ConnectivityManagerImpl.h",
"DiagnosticDataProviderImpl.cpp",
"DiagnosticDataProviderImpl.h",
"EFR32Config.cpp",
"EFR32Config.h",
"InetPlatformConfig.h",
"KeyValueStoreManagerImpl.cpp",
"KeyValueStoreManagerImpl.h",
"Logging.cpp",
"PlatformManagerImpl.cpp",
"PlatformManagerImpl.h",
"SystemPlatformConfig.h",
]
if (chip_enable_ota_requestor) {
sources += [
"OTAImageProcessorImpl.cpp",
"OTAImageProcessorImpl.h",
]
}
public_deps = [ "${chip_root}/src/platform:platform_base" ]
# Add platform crypto implementation
if (chip_crypto == "platform") {
sources += [
"CHIPCryptoPALPsaEfr32.cpp",
"Efr32OpaqueKeypair.h",
"Efr32PsaOpaqueKeypair.cpp",
"Efr32PsaOperationalKeystore.cpp",
"Efr32PsaOperationalKeystore.h",
]
public_deps += [
"${chip_root}/src/crypto",
"${mbedtls_root}:mbedtls",
]
}
# Add pigweed KVS
deps = [
"$dir_pw_kvs:crc16",
"$dir_pw_log",
]
public_deps += [
"$dir_pw_checksum",
"$dir_pw_kvs",
]
if (chip_enable_openthread) {
public_deps += [ "${chip_root}/third_party/openthread:openthread" ]
deps += [ "${chip_root}/third_party/openthread:openthread_cli" ]
sources += [
"../OpenThread/OpenThreadUtils.cpp",
"ConnectivityManagerImpl.cpp",
"ThreadStackManagerImpl.cpp",
"ThreadStackManagerImpl.h",
]
if (chip_mdns == "platform") {
sources += [ "../OpenThread/DnssdImpl.cpp" ]
deps += [ "${chip_root}/src/lib/dnssd:platform_header" ]
}
public_configs = [
"${chip_root}/src/lib/address_resolve:default_address_resolve_config",
]
}
if (chip_enable_wifi) {
sources += [
"ConnectivityManagerImpl_WIFI.cpp",
"NetworkCommissioningWiFiDriver.cpp",
"NetworkCommissioningWiFiDriver.h",
]
}
}