tree: fa79e6e231deb8c868ab27837438ad1ff417c1e0 [path history] [tgz]
  1. apps/
  2. platforms/
  3. CMakeLists.txt
  5. Makefile-cc2538
  6. Makefile-simulation

# Common switches

OpenThread allows you to configure the stack for different functionality and behavior. This configuration is based on changing compile-time constants during the build process using common switches listed in /examples/

This page lists the available common switches with description. Unless stated otherwise, the switches are set to 0 by default. For build command examples, see build examples.

Makefile switchCMake switchDescription
ANYCAST_LOCATOROT_ANYCAST_LOCATOREnables anycast locator functionality.
BACKBONE_ROUTEROT_BACKBONE_ROUTEREnables Backbone Router functionality for Thread 1.2.
BIG_ENDIANOT_BIG_ENDIANAllows the host platform to use big-endian byte order.
BORDER_AGENTOT_BORDER_AGENTEnables support for border agent. In most cases, enable this switch if you are building On-mesh Commissioner or Border Router with External Commissioning support.
BORDER_ROUTEROT_BORDER_ROUTEREnables support for Border Router. This switch is usually combined with the BORDER_AGENT and UDP_FORWARD (or PLATFORM_UDP in case of RCP design) switches to build Border Router device.
BORDER_ROUTINGOT_BORDER_ROUTINGEnables bi-directional border routing between Thread and Infrastructure networks for Border Router.
BORDER_ROUTING_NAT64OT_BORDER_ROUTING_NAT64Enables NAT64 border routing support for Border Router.
BUILTIN_MBEDTLS_MANAGEMENTOT_BUILTIN_MBEDTLS_MANAGEMENTEnables the built-in mbedTLS management. Enable this switch if the external mbedTLS is used, but mbedTLS memory allocation and debug config should be managed internally by OpenThread.
CHANNEL_MANAGEROT_CHANNEL_MANAGEREnables support for channel manager. Enable this switch on devices that are supposed to request a Thread network channel change. This switch should be used only with an FTD build.
CHANNEL_MONITOROT_CHANNEL_MONITOREnables support for channel monitor. Enable this switch on devices that are supposed to determine the cleaner channels.
CHILD_SUPERVISIONOT_CHILD_SUPERVISIONEnables support for child supervision. Enable this switch on a parent or child node with custom OpenThread application that manages the supervision, checks timeout intervals, and verifies connectivity between parent and child.
COAPOT_COAPEnables support for the CoAP API. Enable this switch if you want to control Constrained Application Protocol communication.
COAP_OBSERVEOT_COAP_OBSERVEEnables support for CoAP Observe (RFC7641) API.
COAPSOT_COAPSEnables support for the secure CoAP API. Enable this switch if you want to control Constrained Application Protocol Secure (CoAP over DTLS) communication.
COMMISSIONEROT_COMMISSIONEREnables support for Commissioner. Enable this switch on device that is able to perform Commissioner role.
COVERAGEOT_COVERAGEEnables the generation of code-coverage instances.
CSL_RECEIVEROT_CSL_RECEIVEREnables CSL receiver feature for Thread 1.2.
DEBUGnot implementedAllows building debug instance. Code optimization is disabled.
DHCP6_CLIENTOT_DHCP6_CLIENTEnables support for the DHCP6 client. The device is able to act as typical DHCP client. Enable this switch on a device that is supposed to request networking parameters from the DHCP server.
DHCP6_SERVEROT_DHCP6_SERVEREnables support for the DHCP6 server. The device is able to act as typical DHCP server. Enable this switch on a device that is supposed to provide networking parameters to devices with DHCP_CLIENT switch enabled.
DIAGNOSTICOT_DIAGNOSTICEnables diagnostic support. Enable this switch on a device that is tested in the factory production stage.
DISABLE_BUILTIN_MBEDTLSnot implementedDisables OpenThread's mbedTLS build. Enable this switch if you do not want to use the built-in mbedTLS and you do not want to manage mbedTLS internally. Enabling this switch will disable support for such features as memory allocation and debug.
DISABLE_DOCnot implementedDisables building of the documentation.
DISABLE_EXECUTABLEnot implementedDisables building of executables.
DISABLE_TOOLSnot implementedDisables building of tools.
DEBUG_UARTnot implementedEnables the Debug UART platform feature.
DEBUG_UART_LOGnot implementedEnables the log output for the debug UART. Requires OPENTHREAD_CONFIG_ENABLE_DEBUG_UART to be enabled.
DNS_CLIENTOT_DNS_CLIENTEnables support for DNS client. Enable this switch on a device that sends a DNS query for AAAA (IPv6) record.
DNS_DSOOT_DNS_DSOEnables support for DNS Stateful Operations (DSO).
DNSSD_SERVEROT_DNSSD_SERVEREnables support for DNS-SD server. DNS-SD server use service information from local SRP server to resolve DNS-SD query questions.
DUAOT_DUAEnables the Domain Unicast Address feature for Thread 1.2.
DYNAMIC_LOG_LEVELnot implementedEnables the dynamic log level feature. Enable this switch if OpenThread log level is required to be set at runtime. See Logging guide to learn more.
ECDSAOT_ECDSAEnables support for Elliptic Curve Digital Signature Algorithm. Enable this switch if ECDSA digital signature is used by application.
EXCLUDE_TCPLP_LIBOT_EXCLUDE_TCPLP_LIBExclude TCPlp library from the build.
EXTERNAL_HEAPOT_EXTERNAL_HEAPEnables support for external heap. Enable this switch if the platform uses its own heap. Make sure to specify the external heap Calloc and Free functions to be used by the OpenThread stack.
FULL_LOGSOT_FULL_LOGSEnables all log levels and regions. This switch sets the log level to OT_LOG_LEVEL_DEBG and turns on all region flags. See Logging guide to learn more.
HISTORY_TRACKEROT_HISTORY_TRACKEREnables support for History Tracker.
IP6_FRAGMOT_IP6_FRAGMEnables support for IPv6 fragmentation.
JAM_DETECTIONOT_JAM_DETECTIONEnables support for Jam Detection. Enable this switch if a device requires the ability to detect signal jamming on a specific channel.
JOINEROT_JOINEREnables support for Joiner. Enable this switch on a device that has to be commissioned to join the network.
LEGACYOT_LEGACYEnables support for legacy network.
LINK_RAWOT_LINK_RAWEnables the Link Raw service.
LOG_OUTPUTnot implementedDefines if the LOG output is to be created and where it goes. There are several options available: NONE, DEBUG_UART, APP, PLATFORM_DEFINED (default). See Logging guide to learn more.
MAC_FILTEROT_MAC_FILTEREnables support for the MAC filter.
MLE_LONG_ROUTESOT_MLE_LONG_ROUTESEnables the MLE long routes extension. Note: Enabling this feature breaks conformance to the Thread Specification.
MLROT_MLREnables Multicast Listener Registration feature for Thread 1.2.
MTD_NETDIAGOT_MTD_NETDIAGEnables the TMF network diagnostics on MTDs.
MULTIPLE_INSTANCEOT_MULTIPLE_INSTANCEEnables multiple OpenThread instances.
NETDATA_PUBLISHEROT_NETDATA_PUBLISHEREnables support for Thread Network Data publisher.
PING_SENDEROT_PING_SENDEREnables support for ping sender.
OTNSOT_OTNSEnables support for OpenThread Network Simulator. Enable this switch if you are building OpenThread for OpenThread Network Simulator.
PLATFORM_UDPOT_PLATFORM_UDPEnables platform UDP support.
REFERENCE_DEVICEOT_REFERENCE_DEVICEEnables support for Thread Test Harness reference device. Enable this switch on the reference device during certification.
SERVICEOT_SERVICEEnables support for injecting Service entries into the Thread Network Data.
SETTINGS_RAMOT_SETTINGS_RAMEnables volatile-only storage of settings.
SLAACOT_SLAACEnables support for adding auto-configured SLAAC addresses by OpenThread. This feature is enabled by default.
SNTP_CLIENTOT_SNTP_CLIENTEnables support for SNTP Client.
SPINEL_ENCRYPTER_LIBSnot implementedSpecifies library files (absolute paths) for implementing the NCP Spinel Encrypter.
SRP_CLIENTOT_SRP_CLIENTEnable support for SRP client.
SRP_SERVEROT_SRP_SERVEREnable support for SRP server.
THREAD_VERSIONOT_THREAD_VERSIONEnables the chosen Thread version (1.1 / 1.2 (default)). For example, set to 1.1 for Thread 1.1.
TIME_SYNCOT_TIME_SYNCEnables the time synchronization service feature. Note: Enabling this feature breaks conformance to the Thread Specification.
TRELOT_TRELEnables TREL radio link for Thread over Infrastructure feature.
UDP_FORWARDOT_UDP_FORWARDEnables support for UDP forward.
UPTIMEOT_UPTIMEEnables support for tracking OpenThread instance's uptime.