blob: 72744392f314e33cf6a6c0b0c9f0790beb1cc8b6 [file] [log] [blame]
# 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("${chip_root}/src/lwip/lwip.gni")
declare_args() {
# Use the lwIP library.
chip_system_config_use_lwip = chip_with_lwip && current_os == "freertos"
# Use BSD/POSIX socket API.
chip_system_config_use_sockets = current_os != "freertos"
# Mutex implementation: posix, freertos, none.
chip_system_config_locking = ""
# Clock implementation: clock_gettime, gettimeofday
chip_system_config_clock = "clock_gettime"
# Enable metrics collection.
chip_system_config_provide_statistics = true
}
if (chip_system_config_locking == "") {
if (current_os != "freertos") {
chip_system_config_locking = "posix"
} else {
chip_system_config_locking = "none"
}
}
assert(chip_system_config_locking == "posix" ||
chip_system_config_locking == "freertos" ||
chip_system_config_locking == "none",
"Please select a valid mutex implementation: posix, freertos, none")
assert(
chip_system_config_clock == "clock_gettime" ||
chip_system_config_clock == "gettimeofday",
"Please select a valid clock implementation: clock_gettime, gettimeofday")