| # Copyright (c) 2020-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. |
| |
| declare_args() { |
| # Enable logging. Shorthand for chip_error_logging, etc. |
| chip_logging = true |
| } |
| |
| declare_args() { |
| # Configure target tyle: unix, embedded. |
| chip_target_style = "" |
| |
| # Enable error logging. |
| chip_error_logging = chip_logging |
| |
| # Enable progress logging. |
| chip_progress_logging = chip_logging |
| |
| # Enable detail logging. |
| chip_detail_logging = chip_logging |
| |
| # Enable automation logging. |
| chip_automation_logging = chip_logging |
| |
| # Configure the maximum size for logged messages |
| if (current_os == "linux" || current_os == "mac" || current_os == "ios") { |
| # Allow base64 encoding of 1 MTU (4 * (1280 / 3) + padding |
| chip_log_message_max_size = 1708 |
| } else { |
| chip_log_message_max_size = 256 |
| } |
| |
| # Enable pigweed tokenizer logging. |
| chip_pw_tokenizer_logging = false |
| |
| # Configure chip logging to output through pigweed logging. |
| chip_use_pw_logging = false |
| |
| # Configure chip logging to output through external logging implementation. |
| # External code will need to provide implementation for CHIP log output |
| # function (LogV), which is defined in "src/platform/logging/LogV.h". |
| chip_use_external_logging = false |
| |
| # Enable short error strings. |
| chip_config_short_error_str = false |
| |
| # Enable argument parser. |
| chip_config_enable_arg_parser = true |
| |
| # Memory management style: malloc, simple, platform. |
| chip_config_memory_management = "malloc" |
| |
| # Memory management debug option: enable additional checks. |
| chip_config_memory_debug_checks = false |
| |
| # Memory management debug option: use dmalloc |
| chip_config_memory_debug_dmalloc = false |
| |
| # When enabled trace messages using tansport trace hook. |
| chip_enable_transport_trace = current_os == "linux" || current_os == "mac" |
| |
| # When this is enabled trace messages will be sent to pw_trace. |
| chip_enable_transport_pw_trace = false |
| |
| # Enables using dynamic memory for minmdns tracking of operational |
| # responders. |
| # |
| # When not set, CHIP_CONFIG_MAX_FABRICS is used for static allocation |
| # of tracking information for operational advertisement. |
| chip_config_minmdns_dynamic_operational_responder_list = |
| current_os == "linux" || current_os == "android" || current_os == "darwin" |
| |
| # When using minmdns, set the number of parallel resolves |
| chip_config_minmdns_max_parallel_resolves = 2 |
| } |
| |
| if (chip_target_style == "") { |
| if (current_os != "freertos" && current_os != "zephyr" && |
| current_os != "mbed") { |
| chip_target_style = "unix" |
| } else { |
| chip_target_style = "embedded" |
| } |
| } |
| |
| assert(chip_target_style == "unix" || chip_target_style == "embedded", |
| "Please select a valid target style: unix, embedded") |
| |
| assert( |
| chip_config_memory_management == "malloc" || |
| chip_config_memory_management == "simple" || |
| chip_config_memory_management == "platform", |
| "Please select a valid memory management style: malloc, simple, platform") |