1# Copyright (c) 2020, The OpenThread Authors. 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are met: 6# 1. Redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer. 8# 2. Redistributions in binary form must reproduce the above copyright 9# notice, this list of conditions and the following disclaimer in the 10# documentation and/or other materials provided with the distribution. 11# 3. Neither the name of the copyright holder nor the 12# names of its contributors may be used to endorse or promote products 13# derived from this software without specific prior written permission. 14# 15# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 19# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE] 24# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25# POSSIBILITY OF SUCH DAMAGE. 26# 27 28_openthread_config_file = "" 29 30declare_args() { 31 # OpenThread config header. 32 openthread_config_file = _openthread_config_file 33 34 # Extra deps for OpenThread configuration. 35 openthread_config_deps = [] 36 37 # Include directories for project specific configs. 38 openthread_project_include_dirs = [] 39 40 # OpenThread project-specific core config header 41 openthread_project_core_config_file = "" 42 43 # OpenThread platform-specific config check header 44 openthread_core_config_platform_check_file = "" 45 46 # Extra deps for OpenThread core configuration. 47 openthread_core_config_deps = [] 48 49 # Use external platform. 50 openthread_external_platform = "" 51 52 # Use external mbedtls. If blank, internal mbedtls will be used. 53 openthread_external_mbedtls = "" 54 55 # Package name for OpenThread. 56 openthread_package_name = "OPENTHREAD" 57 58 # Package version for OpenThread. 59 openthread_package_version = "1.0.0" 60} 61 62declare_args() { 63 # Configure OpenThread via GN arguments. 64 openthread_enable_core_config_args = openthread_project_core_config_file == "" 65} 66 67if (openthread_enable_core_config_args) { 68 declare_args() { 69 # Thread version: 1.1, 1.2 70 openthread_config_thread_version = "" 71 72 # Log output: none, debug_uart, app, platform 73 openthread_config_log_output = "" 74 75 # Enable assertions. 76 openthread_config_assert_enable = true 77 78 # Enable anycast locator functionality 79 openthread_config_anycast_locator_enable = false 80 81 # Enable backbone router functionality 82 openthread_config_backbone_router_enable = false 83 84 # Enable border agent support 85 openthread_config_border_agent_enable = false 86 87 # Enable border agent ID 88 openthread_config_border_agent_id_enable = false 89 90 # Enable border router support 91 openthread_config_border_router_enable = false 92 93 # Enable border routing support 94 openthread_config_border_routing_enable = false 95 96 # Enable channel manager support 97 openthread_config_channel_manager_enable = false 98 99 # Enable channel monitor support 100 openthread_config_channel_monitor_enable = false 101 102 # Enable child supervision support 103 openthread_config_child_supervision_enable = false 104 105 # Enable coap api support 106 openthread_config_coap_api_enable = false 107 108 # Enable secure coap api support 109 openthread_config_coap_secure_api_enable = false 110 111 # Enable coap observe (RFC7641) api support 112 openthread_config_coap_observe_api_enable = false 113 114 # Enable commissioner support 115 openthread_config_commissioner_enable = false 116 117 # Enable csl receiver 118 openthread_config_mac_csl_receiver_enable = false 119 120 # Enable DHCP6 client support 121 openthread_config_dhcp6_client_enable = false 122 123 # Enable DHCP6 server support 124 openthread_config_dhcp6_server_enable = false 125 126 # Enable diagnostic support 127 openthread_config_diag_enable = false 128 129 # Enable DNS client support 130 openthread_config_dns_client_enable = false 131 132 # Enable DNS-SD server support 133 openthread_config_dnssd_server_enable = false 134 135 # Enable ECDSA support 136 openthread_config_ecdsa_enable = false 137 138 # Enable Domain Unicast Address feature for Thread 1.2 139 openthread_config_dua_enable = false 140 141 # Enable Multicast Listener Registration feature for Thread 1.2 142 openthread_config_mlr_enable = false 143 144 # Enable external heap support 145 openthread_config_heap_external_enable = false 146 147 # Enable ipv6 fragmentation support 148 openthread_config_ip6_fragmentation_enable = false 149 150 # Enable jam detection support 151 openthread_config_jam_detection_enable = false 152 153 # Enable joiner support 154 openthread_config_joiner_enable = false 155 156 # Enable legacy network support 157 openthread_config_legacy_enable = false 158 159 # Enable link metrics initiator 160 openthread_config_link_metrics_initiator_enable = false 161 162 # Enable link metrics subject 163 openthread_config_link_metrics_subject_enable = false 164 165 # Enable link raw service 166 openthread_config_link_raw_enable = false 167 168 # Enable dynamic log level control 169 openthread_config_log_level_dynamic_enable = false 170 171 # Enable mac filter support 172 openthread_config_mac_filter_enable = false 173 174 # Enable use built-in heap for message buffers 175 openthread_config_message_use_heap = false 176 177 # Enable MLE long routes extension (experimental, breaks Thread conformance] 178 openthread_config_mle_long_routes_enable = false 179 180 # Enable TMF network diagnostics client 181 openthread_config_tmf_netdiag_client_enable = false 182 183 # Enable multiple instances 184 openthread_config_multiple_instance_enable = false 185 186 # Enable platform netif support 187 openthread_config_platform_netif_enable = false 188 189 # Enable platform UDP support 190 openthread_config_platform_udp_enable = false 191 192 # Enable Thread Test Harness reference device support 193 openthread_config_reference_device_enable = false 194 195 # Enable support for injecting Service entries into the Thread Network Data 196 openthread_config_tmf_netdata_service_enable = false 197 198 # Enable volatile-only storage of settings 199 openthread_settings_ram = false 200 201 # Enable support for adding of auto-configured SLAAC addresses by OpenThread 202 openthread_config_ip6_slaac_enable = false 203 204 # Enable SNTP Client support 205 openthread_config_sntp_client_enable = false 206 207 # Enable SRP Client support 208 openthread_config_srp_client_enable = false 209 210 # Enable SRP Server support 211 openthread_config_srp_server_enable = false 212 213 # Enable ping sender support 214 openthread_config_ping_sender = false 215 216 # Enable the time synchronization service feature 217 openthread_config_time_sync_enable = false 218 219 # Enable UDP forward support 220 openthread_config_udp_forward_enable = false 221 222 # Enable full logs 223 openthread_config_full_logs = false 224 225 # Enable OTNS support 226 openthread_config_otns_enable = false 227 228 # Enable NCP SPI support 229 openthread_config_ncp_spi_enable = false 230 231 # Enable NCP HDLC support 232 openthread_config_ncp_hdlc_enable = false 233 234 # Enable builtin mbedtls management 235 openthread_config_enable_builtin_mbedtls_management = 236 openthread_external_mbedtls == "" 237 238 # Enable radio coexistence 239 openthread_config_coexistence_enable = false 240 } 241} 242 243if (openthread_external_mbedtls != "") { 244 mbedtls_target = openthread_external_mbedtls 245} else { 246 mbedtls_target = "../../third_party/mbedtls" 247} 248