mirror of
https://github.com/espressif/openthread.git
synced 2026-06-05 21:14:49 +00:00
[config] define separate project and platform core config header (#9291)
This commit updates and enhances the specification of OT core config
header files. It adds `OPENTHREAD_PLATFORM_CORE_CONFIG_FILE`, which
can be used by platforms to provide a core config header file name.
The project and platform specific config header files are included in
the following order:
1. Project specific header (`OPENTHREAD_PROJECT_CORE_CONFIG_FILE`)
2. Platform specific header (`OPENTHREAD_PLATFORM_CORE_CONFIG_FILE`)
3. Default config values as specified by `config/{module}.h`
CMake config options `OT_PROJECT_CONFIG` and `OT_PLATFORM_CONFIG` are
also defined, which can be used to specify project and platform
config headers. Platforms can define a default config header for
`OT_PLATFORM_CONFIG`. The existing `OT_CONFIG` CMake option is marked
as deprecated (with a warning message which recommends use of the new
configs).
This commit also updates the default simulation and POSIX core config
headers to remove extra Doxygen-style documentation and ensure that
all definitions have an `#ifndef` guard check.
This commit is contained in:
committed by
GitHub
parent
b19b2cfa75
commit
793bf78df1
+16
-7
@@ -106,13 +106,11 @@ if(OT_PACKAGE_VERSION STREQUAL "")
|
||||
endif()
|
||||
message(STATUS "Package Version: ${OT_PACKAGE_VERSION}")
|
||||
|
||||
# OT_CONFIG allows users to specify the path to a customized OpenThread
|
||||
# config header file. The default value of this parameter is empty string.
|
||||
# When not specified by user (value is ""), a platform cmake file may
|
||||
# choose to change this variable to provide its own OpenThread config header
|
||||
# file instead.
|
||||
# Deprecated
|
||||
set(OT_CONFIG "" CACHE STRING "OpenThread config header file (deprecated, use `OT_PROJECT_CONFIG` or `OT_PLATFORM_CONFIG` instead")
|
||||
|
||||
set(OT_CONFIG "" CACHE STRING "OpenThread project-specific config header file chosen by user at configure time")
|
||||
set(OT_PROJECT_CONFIG "" CACHE STRING "OpenThread project-specific config header file")
|
||||
set(OT_PLATFORM_CONFIG "" CACHE STRING "OpenThread platform-specific config header file")
|
||||
|
||||
list(APPEND OT_PUBLIC_INCLUDES ${PROJECT_BINARY_DIR}/etc/cmake)
|
||||
list(APPEND OT_PUBLIC_INCLUDES ${PROJECT_SOURCE_DIR}/etc/cmake)
|
||||
@@ -131,7 +129,18 @@ endif()
|
||||
|
||||
if(OT_CONFIG)
|
||||
target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_FILE=\"${OT_CONFIG}\"")
|
||||
message(STATUS "OpenThread Config File: \"${OT_CONFIG}\"")
|
||||
message(WARNING "OT_CONFIG is deprecated - use `OT_PROJECT_CONFIG` and `OT_PLATFORM_CONFIG` instead")
|
||||
message(STATUS "OT_CONFIG=\"${OT_CONFIG}\"")
|
||||
endif()
|
||||
|
||||
if (OT_PROJECT_CONFIG)
|
||||
target_compile_definitions(ot-config INTERFACE "OPENTHREAD_PROJECT_CORE_CONFIG_FILE=\"${OT_PROJECT_CONFIG}\"")
|
||||
message(STATUS "OT_PROJECT_CONFIG=\"${OT_PROJECT_CONFIG}\"")
|
||||
endif()
|
||||
|
||||
if (OT_PLATFORM_CONFIG)
|
||||
target_compile_definitions(ot-config INTERFACE "OPENTHREAD_PLATFORM_CORE_CONFIG_FILE=\"${OT_PLATFORM_CONFIG}\"")
|
||||
message(STATUS "OT_PLATFORM_CONFIG=\"${OT_PLATFORM_CONFIG}\"")
|
||||
endif()
|
||||
|
||||
target_compile_definitions(ot-config INTERFACE ${OT_PLATFORM_DEFINES})
|
||||
|
||||
@@ -45,8 +45,8 @@ if(OT_SIMULATION_MAX_NETWORK_SIZE)
|
||||
target_compile_definitions(ot-simulation-config INTERFACE "OPENTHREAD_SIMULATION_MAX_NETWORK_SIZE=${OT_SIMULATION_MAX_NETWORK_SIZE}")
|
||||
endif()
|
||||
|
||||
if(NOT OT_CONFIG)
|
||||
set(OT_CONFIG "openthread-core-simulation-config.h" PARENT_SCOPE)
|
||||
if(NOT OT_PLATFORM_CONFIG)
|
||||
set(OT_PLATFORM_CONFIG "openthread-core-simulation-config.h" PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
list(APPEND OT_PLATFORM_DEFINES
|
||||
|
||||
@@ -39,128 +39,58 @@
|
||||
#define OPENTHREAD_RADIO 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_PLATFORM_INFO
|
||||
*
|
||||
* The platform-specific string to insert into the OpenThread version string.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_PLATFORM_INFO
|
||||
#define OPENTHREAD_CONFIG_PLATFORM_INFO "SIMULATION"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_LOG_OUTPUT
|
||||
*
|
||||
* Specify where the log output should go.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_LOG_OUTPUT /* allow command line override */
|
||||
#ifndef OPENTHREAD_CONFIG_LOG_OUTPUT
|
||||
#define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE
|
||||
*
|
||||
* Define as 1 to enable support for adding of auto-configured SLAAC addresses by OpenThread.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE /* allows command line override */
|
||||
#ifndef OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE
|
||||
#define OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 1
|
||||
#endif
|
||||
|
||||
#if OPENTHREAD_RADIO
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_SOFTWARE_ACK_TIMEOUT_ENABLE
|
||||
*
|
||||
* Define to 1 if you want to enable software ACK timeout logic.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef OPENTHREAD_CONFIG_MAC_SOFTWARE_ACK_TIMEOUT_ENABLE
|
||||
#define OPENTHREAD_CONFIG_MAC_SOFTWARE_ACK_TIMEOUT_ENABLE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_SOFTWARE_ENERGY_SCAN_ENABLE
|
||||
*
|
||||
* Define to 1 if you want to enable software energy scanning logic.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MAC_SOFTWARE_ENERGY_SCAN_ENABLE
|
||||
#define OPENTHREAD_CONFIG_MAC_SOFTWARE_ENERGY_SCAN_ENABLE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_SOFTWARE_RETRANSMIT_ENABLE
|
||||
*
|
||||
* Define to 1 if you want to enable software retransmission logic.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MAC_SOFTWARE_RETRANSMIT_ENABLE
|
||||
#define OPENTHREAD_CONFIG_MAC_SOFTWARE_RETRANSMIT_ENABLE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_SOFTWARE_CSMA_BACKOFF_ENABLE
|
||||
*
|
||||
* Define to 1 if you want to enable software CSMA-CA backoff logic.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MAC_SOFTWARE_CSMA_BACKOFF_ENABLE
|
||||
#define OPENTHREAD_CONFIG_MAC_SOFTWARE_CSMA_BACKOFF_ENABLE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_SOFTWARE_TX_SECURITY_ENABLE
|
||||
*
|
||||
* Define to 1 if you want to enable software transmission security logic.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MAC_SOFTWARE_TX_SECURITY_ENABLE
|
||||
#define OPENTHREAD_CONFIG_MAC_SOFTWARE_TX_SECURITY_ENABLE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MAC_SOFTWARE_TX_TIMING_ENABLE
|
||||
*
|
||||
* Define to 1 to enable software transmission target time logic.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MAC_SOFTWARE_TX_TIMING_ENABLE
|
||||
#define OPENTHREAD_CONFIG_MAC_SOFTWARE_TX_TIMING_ENABLE 1
|
||||
#endif
|
||||
|
||||
#endif // OPENTHREAD_RADIO
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE
|
||||
*
|
||||
* Define to 1 if you want to support microsecond timer in platform.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE
|
||||
#define OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_PLATFORM_FLASH_API_ENABLE
|
||||
*
|
||||
* Define to 1 to enable otPlatFlash* APIs to support non-volatile storage.
|
||||
*
|
||||
* When defined to 1, the platform MUST implement the otPlatFlash* APIs instead of the otPlatSettings* APIs.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_PLATFORM_FLASH_API_ENABLE
|
||||
#define OPENTHREAD_CONFIG_PLATFORM_FLASH_API_ENABLE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def CLI_COAP_SECURE_USE_COAP_DEFAULT_HANDLER
|
||||
*
|
||||
* Define to 1 to use DefaultHandler for unhandled requests
|
||||
*
|
||||
*/
|
||||
#ifndef CLI_COAP_SECURE_USE_COAP_DEFAULT_HANDLER
|
||||
#define CLI_COAP_SECURE_USE_COAP_DEFAULT_HANDLER 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE
|
||||
*
|
||||
* Define to 1 if you want to enable radio coexistence implemented in platform.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE
|
||||
#define OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE 1
|
||||
#endif
|
||||
@@ -169,129 +99,50 @@
|
||||
#define OPENTHREAD_CONFIG_PARENT_SEARCH_ENABLE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_LOG_PLATFORM
|
||||
*
|
||||
* Define to enable platform region logging.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_LOG_PLATFORM
|
||||
#define OPENTHREAD_CONFIG_LOG_PLATFORM 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_CLI_MAX_LINE_LENGTH
|
||||
*
|
||||
* The maximum size of the CLI line in bytes.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_CLI_MAX_LINE_LENGTH
|
||||
#define OPENTHREAD_CONFIG_CLI_MAX_LINE_LENGTH 640
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE
|
||||
*
|
||||
* The size of CLI UART RX buffer in bytes.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE
|
||||
#define OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE 640
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MLE_MAX_CHILDREN
|
||||
*
|
||||
* The maximum number of children.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MLE_MAX_CHILDREN
|
||||
#define OPENTHREAD_CONFIG_MLE_MAX_CHILDREN 128
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MLE_INFORM_PREVIOUS_PARENT_ON_REATTACH
|
||||
*
|
||||
* Define as 1 for a child to inform its previous parent when it attaches to a new parent.
|
||||
*
|
||||
* If this feature is enabled, when a device attaches to a new parent, it will send an IP message (with empty payload
|
||||
* and mesh-local IP address as the source address) to its previous parent.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MLE_INFORM_PREVIOUS_PARENT_ON_REATTACH
|
||||
#define OPENTHREAD_CONFIG_MLE_INFORM_PREVIOUS_PARENT_ON_REATTACH 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_UPTIME_ENABLE
|
||||
*
|
||||
* Define to 1 to enable tracking the uptime of OpenThread instance.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_UPTIME_ENABLE
|
||||
#define OPENTHREAD_CONFIG_UPTIME_ENABLE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_LOG_PREPEND_UPTIME
|
||||
*
|
||||
* Define as 1 to prepend the current uptime to all log messages.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_LOG_PREPEND_UPTIME
|
||||
#define OPENTHREAD_CONFIG_LOG_PREPEND_UPTIME 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_SRP_CLIENT_BUFFERS_MAX_SERVICES
|
||||
*
|
||||
* Specifies number of service entries in the SRP client service pool.
|
||||
*
|
||||
* This config is applicable only when `OPENTHREAD_CONFIG_SRP_CLIENT_BUFFERS_ENABLE` is enabled.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_SRP_CLIENT_BUFFERS_MAX_SERVICES
|
||||
#define OPENTHREAD_CONFIG_SRP_CLIENT_BUFFERS_MAX_SERVICES 20
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_DETERMINISTIC_ECDSA_ENABLE
|
||||
*
|
||||
* Define to 1 to generate ECDSA signatures deterministically
|
||||
* according to RFC 6979 instead of randomly.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_DETERMINISTIC_ECDSA_ENABLE
|
||||
#define OPENTHREAD_CONFIG_DETERMINISTIC_ECDSA_ENABLE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_POWER_CALIBRATION_ENABLE
|
||||
*
|
||||
* Define as 1 to enable power calibration support.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_POWER_CALIBRATION_ENABLE
|
||||
#define OPENTHREAD_CONFIG_POWER_CALIBRATION_ENABLE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_PLATFORM_POWER_CALIBRATION_ENABLE
|
||||
*
|
||||
* Define as 1 to enable platform power calibration support.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_PLATFORM_POWER_CALIBRATION_ENABLE
|
||||
#define OPENTHREAD_CONFIG_PLATFORM_POWER_CALIBRATION_ENABLE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_RADIO_STATS_ENABLE
|
||||
*
|
||||
* Set to 1 to enable support for Radio Statistics. Note that this option only works for OPENTHREAD_FTD and
|
||||
* OPENTHREAD_MTD.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_RADIO_STATS_ENABLE
|
||||
#define OPENTHREAD_CONFIG_RADIO_STATS_ENABLE 1
|
||||
#endif
|
||||
|
||||
@@ -45,6 +45,15 @@
|
||||
|
||||
#define OPENTHREAD_CORE_CONFIG_H_IN
|
||||
|
||||
/**
|
||||
* Include project and platform specific header files in the following order:
|
||||
*
|
||||
* 1. Project specific header file (`OPENTHREAD_PROJECT_CORE_CONFIG_FILE`)
|
||||
* 2. Platform specific header file (`OPENTHREAD_PLATFORM_CORE_CONFIG_FILE`)
|
||||
* 3. Default config values as specified by `config/{module}.h`
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef OPENTHREAD_PROJECT_CORE_CONFIG_FILE
|
||||
#include OPENTHREAD_PROJECT_CORE_CONFIG_FILE
|
||||
#elif defined(OPENTHREAD_CONFIG_CORE_USER_CONFIG_HEADER_ENABLE)
|
||||
@@ -53,6 +62,10 @@
|
||||
#include "openthread-core-user-config.h"
|
||||
#endif
|
||||
|
||||
#ifdef OPENTHREAD_PLATFORM_CORE_CONFIG_FILE
|
||||
#include OPENTHREAD_PLATFORM_CORE_CONFIG_FILE
|
||||
#endif
|
||||
|
||||
#ifndef OPENTHREAD_CONFIG_THREAD_VERSION
|
||||
#define OPENTHREAD_CONFIG_THREAD_VERSION OT_THREAD_VERSION_1_3
|
||||
#endif
|
||||
|
||||
@@ -91,8 +91,8 @@ if(OT_POSIX_NAT64_CIDR)
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT OT_CONFIG)
|
||||
set(OT_CONFIG "openthread-core-posix-config.h" PARENT_SCOPE)
|
||||
if(NOT OT_PLATFORM_CONFIG)
|
||||
set(OT_PLATFORM_CONFIG "openthread-core-posix-config.h" PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-rdynamic ${CMAKE_EXE_LINKER_FLAGS}" PARENT_SCOPE)
|
||||
|
||||
@@ -34,113 +34,46 @@
|
||||
#ifndef OPENTHREAD_CORE_POSIX_CONFIG_H_
|
||||
#define OPENTHREAD_CORE_POSIX_CONFIG_H_
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS
|
||||
*
|
||||
* The number of message buffers in the buffer pool.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS
|
||||
#define OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS 256
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_DIAG_OUTPUT_BUFFER_SIZE
|
||||
*
|
||||
* Define OpenThread diagnostic mode output buffer size in bytes
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_DIAG_OUTPUT_BUFFER_SIZE
|
||||
#define OPENTHREAD_CONFIG_DIAG_OUTPUT_BUFFER_SIZE 500
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_LOG_PLATFORM
|
||||
*
|
||||
* Define to enable platform region logging.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_LOG_PLATFORM
|
||||
#define OPENTHREAD_CONFIG_LOG_PLATFORM 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_LOG_OUTPUT
|
||||
*
|
||||
* Select the log output.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_LOG_OUTPUT
|
||||
#define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_LOG_LEVEL
|
||||
*
|
||||
* Define the compile-time log level which is the lowest log level
|
||||
* that can be set at run-time by `otLoggingSetLevel`.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_LOG_LEVEL
|
||||
#define OPENTHREAD_CONFIG_LOG_LEVEL OT_LOG_LEVEL_DEBG
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_LOG_LEVEL_INIT
|
||||
*
|
||||
* The initial log level used when OpenThread is initialized. See
|
||||
* `OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE`.
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_LOG_LEVEL_INIT
|
||||
#define OPENTHREAD_CONFIG_LOG_LEVEL_INIT OT_LOG_LEVEL_CRIT
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE
|
||||
*
|
||||
* Define as 1 to enable dynamic log level control.
|
||||
*
|
||||
* Note that the OPENTHREAD_CONFIG_LOG_LEVEL determines the log level at
|
||||
* compile time. The dynamic log level control (if enabled) only allows
|
||||
* decreasing the log level from the compile time value.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE
|
||||
#define OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_PLATFORM_INFO
|
||||
*
|
||||
* The platform-specific string to insert into the OpenThread version string.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_PLATFORM_INFO
|
||||
#define OPENTHREAD_CONFIG_PLATFORM_INFO "POSIX"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE
|
||||
*
|
||||
* Define as 1 to enable support for adding of auto-configured SLAAC addresses by OpenThread.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE /* allows command line override */
|
||||
#ifndef OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE
|
||||
#define OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_NCP_HDLC_ENABLE
|
||||
*
|
||||
* Define to 1 to enable NCP HDLC support.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_NCP_HDLC_ENABLE
|
||||
#define OPENTHREAD_CONFIG_NCP_HDLC_ENABLE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE
|
||||
*
|
||||
* Define to 1 if you want to enable radio coexistence implemented in platform.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE
|
||||
#define OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE 1
|
||||
#endif
|
||||
@@ -157,164 +90,66 @@
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_LOG_MAX_SIZE
|
||||
*
|
||||
* The maximum log string size (number of chars).
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_LOG_MAX_SIZE
|
||||
#define OPENTHREAD_CONFIG_LOG_MAX_SIZE 1024
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_COMMISSIONER_MAX_JOINER_ENTRIES
|
||||
*
|
||||
* The maximum number of Joiner entries maintained by the Commissioner.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_COMMISSIONER_MAX_JOINER_ENTRIES
|
||||
#define OPENTHREAD_CONFIG_COMMISSIONER_MAX_JOINER_ENTRIES 4
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MLE_MAX_CHILDREN
|
||||
*
|
||||
* The maximum number of children.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MLE_MAX_CHILDREN
|
||||
#define OPENTHREAD_CONFIG_MLE_MAX_CHILDREN 64
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MLE_IP_ADDRS_PER_CHILD
|
||||
*
|
||||
* The maximum number of supported IPv6 address registrations per child.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MLE_IP_ADDRS_PER_CHILD
|
||||
#define OPENTHREAD_CONFIG_MLE_IP_ADDRS_PER_CHILD 16
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_IP6_MAX_EXT_UCAST_ADDRS
|
||||
*
|
||||
* The maximum number of supported IPv6 addresses allows to be externally added.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_IP6_MAX_EXT_UCAST_ADDRS
|
||||
#define OPENTHREAD_CONFIG_IP6_MAX_EXT_UCAST_ADDRS 8
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS
|
||||
*
|
||||
* The maximum number of supported IPv6 multicast addresses allows to be externally added.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS
|
||||
#define OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS 8
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE
|
||||
*
|
||||
* Define as 1 to enable History Tracker module.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE
|
||||
#define OPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE
|
||||
*
|
||||
* The size of heap buffer when DTLS is enabled.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE
|
||||
#define OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE (63 * 1024)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE_NO_DTLS
|
||||
*
|
||||
* The size of heap buffer when DTLS is disabled.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE_NO_DTLS
|
||||
#define OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE_NO_DTLS (63 * 1024)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_CLI_MAX_LINE_LENGTH
|
||||
*
|
||||
* The maximum size of the CLI line in bytes.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_CLI_MAX_LINE_LENGTH
|
||||
#define OPENTHREAD_CONFIG_CLI_MAX_LINE_LENGTH 640
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE
|
||||
*
|
||||
* The size of CLI UART RX buffer in bytes.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE
|
||||
#define OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE 640
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_UPTIME_ENABLE
|
||||
*
|
||||
* Define to 1 to enable tracking the uptime of OpenThread instance.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_UPTIME_ENABLE
|
||||
#define OPENTHREAD_CONFIG_UPTIME_ENABLE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_LOG_PREPEND_UPTIME
|
||||
*
|
||||
* Define as 1 to prepend the current uptime to all log messages.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_LOG_PREPEND_UPTIME
|
||||
#define OPENTHREAD_CONFIG_LOG_PREPEND_UPTIME 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_SRP_CLIENT_BUFFERS_MAX_SERVICES
|
||||
*
|
||||
* Specifies number of service entries in the SRP client service pool.
|
||||
*
|
||||
* This config is applicable only when `OPENTHREAD_CONFIG_SRP_CLIENT_BUFFERS_ENABLE` is enabled.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_SRP_CLIENT_BUFFERS_MAX_SERVICES
|
||||
#define OPENTHREAD_CONFIG_SRP_CLIENT_BUFFERS_MAX_SERVICES 20
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_ASSERT_CHECK_API_POINTER_PARAM_FOR_NULL
|
||||
*
|
||||
* Define as 1 to enable assert check of pointer-type API input parameters against null.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_ASSERT_CHECK_API_POINTER_PARAM_FOR_NULL
|
||||
#define OPENTHREAD_CONFIG_ASSERT_CHECK_API_POINTER_PARAM_FOR_NULL 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_PLATFORM_POWER_CALIBRATION_ENABLE
|
||||
*
|
||||
* Define as 1 to enable platform power calibration support.
|
||||
*
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_PLATFORM_POWER_CALIBRATION_ENABLE
|
||||
#define OPENTHREAD_CONFIG_PLATFORM_POWER_CALIBRATION_ENABLE 1
|
||||
#endif
|
||||
|
||||
+14
-14
@@ -109,7 +109,7 @@ case ${build_config} in
|
||||
cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=OFF -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \
|
||||
-DOT_OPERATIONAL_DATASET_AUTO_INIT=ON \
|
||||
-DOT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \
|
||||
-DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \
|
||||
"${top_srcdir}" || die
|
||||
ninja || die
|
||||
;;
|
||||
@@ -122,7 +122,7 @@ case ${build_config} in
|
||||
cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=OFF -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \
|
||||
-DOT_15_4=ON -DOT_TREL=OFF -DOT_OPERATIONAL_DATASET_AUTO_INIT=ON \
|
||||
-DOT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \
|
||||
-DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \
|
||||
"${top_srcdir}" || die
|
||||
ninja || die
|
||||
cp -p ${top_builddir}/examples/apps/ncp/ot-ncp-ftd ${top_builddir}/examples/apps/ncp/ot-ncp-ftd-15.4
|
||||
@@ -136,7 +136,7 @@ case ${build_config} in
|
||||
cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=OFF -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \
|
||||
-DOT_15_4=OFF -DOT_TREL=ON -DOT_OPERATIONAL_DATASET_AUTO_INIT=ON \
|
||||
-DOT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \
|
||||
-DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \
|
||||
"${top_srcdir}" || die
|
||||
ninja || die
|
||||
cp -p ${top_builddir}/examples/apps/ncp/ot-ncp-ftd ${top_builddir}/examples/apps/ncp/ot-ncp-ftd-trel
|
||||
@@ -150,7 +150,7 @@ case ${build_config} in
|
||||
cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=OFF -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \
|
||||
-DOT_15_4=ON -DOT_TREL=ON -DOT_OPERATIONAL_DATASET_AUTO_INIT=ON \
|
||||
-DOT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \
|
||||
-DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \
|
||||
"${top_srcdir}" || die
|
||||
ninja || die
|
||||
cp -p ${top_builddir}/examples/apps/ncp/ot-ncp-ftd ${top_builddir}/examples/apps/ncp/ot-ncp-ftd-15.4-trel
|
||||
@@ -163,7 +163,7 @@ case ${build_config} in
|
||||
cd "${top_builddir}" || die "cd failed"
|
||||
cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=ON -DOT_APP_NCP=OFF -DOT_APP_RCP=OFF \
|
||||
-DOT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \
|
||||
-DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \
|
||||
"${top_srcdir}" || die
|
||||
ninja || die
|
||||
;;
|
||||
@@ -176,7 +176,7 @@ case ${build_config} in
|
||||
cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=ON -DOT_APP_NCP=OFF -DOT_APP_RCP=OFF \
|
||||
-DOT_15_4=ON -DOT_TREL=OFF \
|
||||
-DOT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \
|
||||
-DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \
|
||||
"${top_srcdir}" || die
|
||||
ninja || die
|
||||
cp -p ${top_builddir}/examples/apps/cli/ot-cli-ftd ${top_builddir}/examples/apps/cli/ot-cli-ftd-15.4
|
||||
@@ -190,7 +190,7 @@ case ${build_config} in
|
||||
cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=ON -DOT_APP_NCP=OFF -DOT_APP_RCP=OFF \
|
||||
-DOT_15_4=OFF -DOT_TREL=ON \
|
||||
-DOT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \
|
||||
-DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \
|
||||
"${top_srcdir}" || die
|
||||
ninja || die
|
||||
cp -p ${top_builddir}/examples/apps/cli/ot-cli-ftd ${top_builddir}/examples/apps/cli/ot-cli-ftd-trel
|
||||
@@ -204,7 +204,7 @@ case ${build_config} in
|
||||
cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=ON -DOT_APP_NCP=OFF -DOT_APP_RCP=OFF \
|
||||
-DOT_15_4=ON -DOT_TREL=ON \
|
||||
-DOT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \
|
||||
-DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \
|
||||
"${top_srcdir}" || die
|
||||
ninja || die
|
||||
cp -p ${top_builddir}/examples/apps/cli/ot-cli-ftd ${top_builddir}/examples/apps/cli/ot-cli-ftd-15.4-trel
|
||||
@@ -217,7 +217,7 @@ case ${build_config} in
|
||||
cd "${top_builddir}" || die "cd failed"
|
||||
cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=OFF -DOT_APP_NCP=OFF -DOT_APP_RCP=ON \
|
||||
-DOT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \
|
||||
-DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \
|
||||
"${top_srcdir}" || die
|
||||
ninja || die
|
||||
;;
|
||||
@@ -229,7 +229,7 @@ case ${build_config} in
|
||||
cd "${top_builddir}" || die "cd failed"
|
||||
cmake -GNinja -DOT_PLATFORM=posix -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=ON -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \
|
||||
-DOT_CONFIG=../tests/toranj/openthread-core-toranj-config-posix.h \
|
||||
-DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-posix.h \
|
||||
"${top_srcdir}" || die
|
||||
ninja || die
|
||||
;;
|
||||
@@ -242,7 +242,7 @@ case ${build_config} in
|
||||
cmake -GNinja -DOT_PLATFORM=posix -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=ON -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \
|
||||
-DOT_15_4=ON -DOT_TREL=OFF \
|
||||
-DOT_CONFIG=../tests/toranj/openthread-core-toranj-config-posix.h \
|
||||
-DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-posix.h \
|
||||
"${top_srcdir}" || die
|
||||
ninja || die
|
||||
;;
|
||||
@@ -255,7 +255,7 @@ case ${build_config} in
|
||||
cmake -GNinja -DOT_PLATFORM=posix -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=ON -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \
|
||||
-DOT_15_4=OFF -DOT_TREL=ON \
|
||||
-DOT_CONFIG=../tests/toranj/openthread-core-toranj-config-posix.h \
|
||||
-DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-posix.h \
|
||||
"${top_srcdir}" || die
|
||||
ninja || die
|
||||
;;
|
||||
@@ -268,7 +268,7 @@ case ${build_config} in
|
||||
cmake -GNinja -DOT_PLATFORM=posix -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=ON -DOT_APP_NCP=ON -DOT_APP_RCP=OFF \
|
||||
-DOT_15_4=ON -DOT_TREL=ON \
|
||||
-DOT_CONFIG=../tests/toranj/openthread-core-toranj-config-posix.h \
|
||||
-DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-posix.h \
|
||||
"${top_srcdir}" || die
|
||||
ninja || die
|
||||
;;
|
||||
@@ -280,7 +280,7 @@ case ${build_config} in
|
||||
cd "${top_builddir}" || die "cd failed"
|
||||
cmake -GNinja -DOT_PLATFORM=simulation -DOT_COMPILE_WARNING_AS_ERROR=ON -DOT_COVERAGE=${ot_coverage} \
|
||||
-DOT_THREAD_VERSION=1.3.1 -DOT_APP_CLI=ON -DOT_APP_NCP=ON -DOT_APP_RCP=ON \
|
||||
-DOT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \
|
||||
-DOT_PROJECT_CONFIG=../tests/toranj/openthread-core-toranj-config-simulation.h \
|
||||
"${top_srcdir}" || die
|
||||
ninja || die
|
||||
;;
|
||||
|
||||
@@ -45,6 +45,8 @@
|
||||
|
||||
#endif
|
||||
|
||||
#define OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE 0
|
||||
|
||||
#define OPENTHREAD_CONFIG_PLATFORM_FLASH_API_ENABLE 1
|
||||
|
||||
#define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED
|
||||
|
||||
Reference in New Issue
Block a user