blob: e32738e9a595300036ab4635539dde42337b5206 [file] [log] [blame]
# Copyright (c) 2022 Project CHIP Authors
# All rights reserved.
#
# 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")
assert(chip_device_platform == "bl702")
assert(false == (chip_enable_wifi && chip_enable_openthread),
"Not support Wi-Fi and Thread together")
if (chip_enable_openthread) {
import("//build_overrides/openthread.gni")
}
static_library("BL702") {
sources = [
"DiagnosticDataProviderImpl.cpp",
"PlatformManagerImpl.cpp",
]
common_sources = [
"../../FreeRTOS/SystemTimeSupport.cpp",
"../../SingletonConfigurationManager.cpp",
"../common/BLConfig.cpp",
"../common/ConfigurationManagerImpl.cpp",
"../common/ConnectivityManagerImpl.cpp",
"../common/DiagnosticDataProviderImpl.cpp",
"../common/KeyValueStoreManagerImpl.cpp",
"../common/Logging.cpp",
"../common/PlatformManagerImpl.cpp",
# "${chip_root}/src/credentials/CHIPCert.h",
# "${chip_root}/src/credentials/DeviceAttestationCredsProvider.h",
# "../common/FactoryDataProvider.cpp",
# "../common/FactoryDataProvider.h",
]
if (chip_enable_ota_requestor) {
sources += [
"../common/OTAImageProcessorImpl.cpp",
"../common/OTAImageProcessorImpl.h",
]
}
if (chip_enable_ble) {
sources += [
"../common/BLEManagerImpl.cpp",
"../common/BLEManagerImpl.h",
]
}
sources += common_sources
if (chip_enable_openthread) {
# needed for MTD/FTD
import("//build_overrides/bouffalolab_iot_sdk.gni")
import("${bouffalolab_iot_sdk_build_root}/bl702/bl_iot_sdk.gni")
deps = [ "${bouffalolab_iot_sdk_build_root}/bl702:bl_iot_sdk" ]
sources += [
"../../OpenThread/OpenThreadUtils.cpp",
"ThreadStackManagerImpl.cpp",
]
if (chip_mdns == "platform") {
sources += [
"../../OpenThread/DnssdImpl.cpp",
"../../OpenThread/OpenThreadDnssdImpl.cpp",
"../../OpenThread/OpenThreadDnssdImpl.h",
]
deps += [ "${chip_root}/src/lib/dnssd:platform_header" ]
}
} else {
sources += [
"ConfigurationManagerImpl.cpp",
"ConnectivityManagerImpl.cpp",
"EthernetInterface.c",
]
deps = [ "${chip_root}/src/lib/dnssd:platform_header" ]
}
public_deps = [ "${chip_root}/src/platform:platform_base" ]
}