| # Copyright (c) 2020 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/efr32_sdk.gni") |
| import("//build_overrides/openthread.gni") |
| |
| import("//build_overrides/openthread.gni") |
| |
| import("${efr32_sdk_build_root}/efr32_sdk.gni") |
| import("${efr32_sdk_build_root}/silabs_board.gni") |
| |
| config("openthread_efr32_config") { |
| defines = [ |
| "RADIO_CONFIG_DMP_SUPPORT=1", |
| "${silabs_board}=1", |
| "${silabs_mcu}", |
| ] |
| |
| include_dirs = [ |
| "${chip_root}/examples/platform/efr32", |
| "${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}", |
| "${sl_ot_efr32_root}", |
| ] |
| |
| # temporarily disable check until gsdk pulls in a more recent version of openthread |
| cflags = [ "-Wno-format-nonliteral" ] |
| } |
| |
| source_set("openthread_core_config_efr32") { |
| sources = [ |
| "${openthread_root}/src/cli/cli_config.h", |
| "${sl_ot_efr32_root}/openthread-core-efr32-config-check.h", |
| "${sl_ot_efr32_root}/openthread-core-efr32-config.h", |
| ] |
| |
| public_deps = [ "${efr32_sdk_build_root}:efr32_sdk" ] |
| |
| public_configs = [ ":openthread_efr32_config" ] |
| } |
| |
| source_set("libopenthread-efr32") { |
| sources = [ |
| "${openthread_root}/examples/apps/cli/cli_uart.cpp", |
| "${sl_ot_efr32_root}/alarm.c", |
| "${sl_ot_efr32_root}/crypto.c", |
| "${sl_ot_efr32_root}/entropy.c", |
| "${sl_ot_efr32_root}/flash.c", |
| "${sl_ot_efr32_root}/ieee802154-packet-utils.cpp", |
| "${sl_ot_efr32_root}/misc.c", |
| "${sl_ot_efr32_root}/radio.c", |
| "${sl_ot_efr32_root}/sleep.c", |
| "${sl_ot_efr32_root}/system.c", |
| ] |
| |
| public_deps = [ |
| ":openthread_core_config_efr32", |
| "${openthread_root}/src/core:libopenthread_core_headers", |
| "..:libopenthread-platform", |
| "..:libopenthread-platform-utils", |
| ] |
| } |