blob: 061a2c4c26846526330f113c2373208aa3928d80 [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")
import("${chip_root}/third_party/st/stm32_board.gni")
assert(chip_device_platform == "stm32")
if (chip_crypto == "platform") {
import("//build_overrides/mbedtls.gni")
}
if (chip_enable_openthread) {
import("//build_overrides/openthread.gni")
}
static_library("stm32") {
friend = [ ":lighting_app" ]
deps = [ "${chip_root}/src/setup_payload" ]
if (stm32_board == "STM32WB5MM-DK") {
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",
"DeviceInfoProviderImpl.cpp",
"DeviceInfoProviderImpl.h",
"DiagnosticDataProviderImpl.cpp",
"DiagnosticDataProviderImpl.h",
"FactoryDataProvider.cpp",
"FactoryDataProvider.h",
"InetPlatformConfig.h",
"KeyValueStoreManagerImpl.cpp",
"KeyValueStoreManagerImpl.h",
"OTAImageProcessorImpl.cpp",
"OTAImageProcessorImpl.h",
"PlatformManagerImpl.cpp",
"PlatformManagerImpl.h",
"STM32Config.cpp",
"STM32Config.h",
"STM32FreeRtosHooks.cpp",
"STM32FreeRtosHooks.h",
"SystemPlatformConfig.h",
]
deps += [ "${chip_root}/src/platform/logging:stdio" ]
}
public = [
"${chip_root}/src/credentials/DeviceAttestationCredsProvider.h",
"${chip_root}/src/credentials/examples/ExampleDACs.h",
]
public_deps = [
"${chip_root}/src/crypto",
"${chip_root}/src/platform:platform_base",
]
if (chip_enable_openthread) {
sources += [
"../OpenThread/DnssdImpl.cpp",
"../OpenThread/OpenThreadDnssdImpl.cpp",
"../OpenThread/OpenThreadUtils.cpp",
"ConnectivityManagerImpl.cpp",
"ConnectivityManagerImpl.h",
"ThreadStackManagerImpl.cpp",
"ThreadStackManagerImpl.h",
]
import("//build_overrides/stm32_sdk.gni")
import("${stm32_sdk_build_root}/stm32_sdk.gni")
public_deps += [ "${stm32_sdk_build_root}:stm32_sdk" ]
deps += [ "${chip_root}/src/lib/dnssd:platform_header" ]
}
# Set the compiler flags
cflags = [
"-Wno-error=unused-parameter",
"-Wno-error=unused-variable",
"-Wno-error=format=",
"-Wno-error=return-type",
]
# Add platform crypto implementation
if (chip_crypto == "platform") {
sources += []
public_deps += [
"${chip_root}/src/crypto",
"${mbedtls_root}:mbedtls",
]
}
}