diff --git a/components/openthread/Kconfig b/components/openthread/Kconfig index d0c39d1ee7..bca02ec1fb 100644 --- a/components/openthread/Kconfig +++ b/components/openthread/Kconfig @@ -263,6 +263,13 @@ menu "OpenThread" help Select this option to enable link metrics feature + config OPENTHREAD_BORDER_AGENT_ENABLE + bool "Enable border agent feature" + default y if OPENTHREAD_BORDER_ROUTER + default n if !OPENTHREAD_BORDER_ROUTER + help + Select this option to enable border agent feature + config OPENTHREAD_MACFILTER_ENABLE bool "Enable mac filter feature" default n diff --git a/components/openthread/linker.lf b/components/openthread/linker.lf index aa59cc6701..ffadcdff91 100644 --- a/components/openthread/linker.lf +++ b/components/openthread/linker.lf @@ -2,12 +2,14 @@ archive: libopenthread.a entries: if OPENTHREAD_CSL_ENABLE = y || OPENTHREAD_LINK_METRICS = y: - mesh_forwarder (noflash_text) - mac_frame (noflash_text) - csl_tx_scheduler (noflash_text) - link_metrics (noflash_text) - mac (noflash_text) - sub_mac (noflash_text) + csl_tx_scheduler (noflash) + link_metrics (noflash) + link_quality (noflash) + mac (noflash) + mac_frame (noflash) + mesh_forwarder (noflash) + radio (noflash) + sub_mac (noflash) if OPENTHREAD_RCP_SPI = y: - ncp_spi (noflash_text) + ncp_spi (noflash) diff --git a/components/openthread/private_include/openthread-core-esp32x-ftd-config.h b/components/openthread/private_include/openthread-core-esp32x-ftd-config.h index 59d3780fa9..57e19977d0 100644 --- a/components/openthread/private_include/openthread-core-esp32x-ftd-config.h +++ b/components/openthread/private_include/openthread-core-esp32x-ftd-config.h @@ -367,19 +367,24 @@ #endif #define OPENTHREAD_CONFIG_MAC_MAX_CSMA_BACKOFFS_DIRECT CONFIG_OPENTHREAD_MAC_MAX_CSMA_BACKOFFS_DIRECT -/*----The following options set fixed default values but can be overridden by the user header file.----*/ - -#if CONFIG_OPENTHREAD_BORDER_ROUTER /** * @def OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE * * Define to 1 to enable Border Agent support. * */ -#ifndef OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE +#ifdef OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE +#error `OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE` is redefined. +#endif +#if CONFIG_OPENTHREAD_BORDER_AGENT_ENABLE #define OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE 1 +#else +#define OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE 0 #endif +/*----The following options set fixed default values but can be overridden by the user header file.----*/ + +#if CONFIG_OPENTHREAD_BORDER_ROUTER /** * @def OPENTHREAD_CONFIG_BORDER_AGENT_ID_ENABLE *