diff --git a/components/esp_ot_cli_extension/Kconfig b/components/esp_ot_cli_extension/Kconfig index 59c21b6..a0a7800 100644 --- a/components/esp_ot_cli_extension/Kconfig +++ b/components/esp_ot_cli_extension/Kconfig @@ -24,7 +24,7 @@ menu "OpenThread Extension CLI" config OPENTHREAD_RCP_COMMAND bool "Enable rcp control command of border router" - depends on OPENTHREAD_CLI_ESP_EXTENSION && OPENTHREAD_BORDER_ROUTER - default n + depends on OPENTHREAD_CLI_ESP_EXTENSION && OPENTHREAD_BORDER_ROUTER && AUTO_UPDATE_RCP + default y if AUTO_UPDATE_RCP endmenu diff --git a/components/esp_ot_cli_extension/idf_component.yml b/components/esp_ot_cli_extension/idf_component.yml index 9237a6f..94e875e 100644 --- a/components/esp_ot_cli_extension/idf_component.yml +++ b/components/esp_ot_cli_extension/idf_component.yml @@ -1,4 +1,4 @@ -version: "1.2.1" +version: "1.2.2" description: Espressif OpenThread CLI Extension url: https://github.com/espressif/esp-thread-br/tree/main/components/esp_ot_cli_extension dependencies: diff --git a/examples/basic_thread_border_router/main/esp_ot_config.h b/examples/basic_thread_border_router/main/esp_ot_config.h index 71028d9..f414a97 100644 --- a/examples/basic_thread_border_router/main/esp_ot_config.h +++ b/examples/basic_thread_border_router/main/esp_ot_config.h @@ -71,6 +71,7 @@ } #endif // CONFIG_OPENTHREAD_RADIO_SPINEL_UART OR CONFIG_OPENTHREAD_RADIO_SPINEL_SPI +#if CONFIG_AUTO_UPDATE_RCP #define ESP_OPENTHREAD_RCP_UPDATE_CONFIG() \ { \ .rcp_type = RCP_TYPE_ESP32H2_UART, .uart_rx_pin = CONFIG_PIN_TO_RCP_TX, .uart_tx_pin = CONFIG_PIN_TO_RCP_RX, \ @@ -78,6 +79,12 @@ .boot_pin = CONFIG_PIN_TO_RCP_BOOT, .update_baudrate = 460800, \ .firmware_dir = "/" CONFIG_RCP_PARTITION_NAME "/ot_rcp", .target_chip = ESP32H2_CHIP, \ } +#else +#define ESP_OPENTHREAD_RCP_UPDATE_CONFIG() \ + { \ + 0 \ + } +#endif #if CONFIG_OPENTHREAD_CONSOLE_TYPE_UART #define ESP_OPENTHREAD_DEFAULT_HOST_CONFIG() \ diff --git a/examples/common/thread_border_router/src/border_router_launch.c b/examples/common/thread_border_router/src/border_router_launch.c index 0e0d968..75a66ca 100644 --- a/examples/common/thread_border_router/src/border_router_launch.c +++ b/examples/common/thread_border_router/src/border_router_launch.c @@ -193,7 +193,12 @@ void launch_openthread_border_router(const esp_openthread_platform_config_t *pla const esp_rcp_update_config_t *update_config) { s_openthread_platform_config = *platform_config; + +#if CONFIG_AUTO_UPDATE_RCP ESP_ERROR_CHECK(esp_rcp_update_init(update_config)); +#else + OT_UNUSED_VARIABLE(update_config); +#endif xTaskCreate(ot_task_worker, "ot_br_main", 8192, xTaskGetCurrentTaskHandle(), 5, NULL); } diff --git a/tools/ci/idf_component_otbr.yml b/tools/ci/idf_component_otbr.yml index 6f3bd3d..f501af3 100644 --- a/tools/ci/idf_component_otbr.yml +++ b/tools/ci/idf_component_otbr.yml @@ -6,3 +6,7 @@ dependencies: ## Required IDF version idf: version: ">=5.0" + protocol_examples_common: + path: ${IDF_PATH}/examples/common_components/protocol_examples_common + ot_led: + path: ${IDF_PATH}/examples/openthread/ot_common_components/ot_led diff --git a/tools/ci/idf_component_otcli.yml b/tools/ci/idf_component_otcli.yml index d710e61..b56454c 100644 --- a/tools/ci/idf_component_otcli.yml +++ b/tools/ci/idf_component_otcli.yml @@ -4,3 +4,5 @@ dependencies: path: "$ESP_THREAD_BR_PATH/components/esp_ot_cli_extension" idf: version: ">=4.1.0" + ot_led: + path: ${IDF_PATH}/examples/openthread/ot_common_components/ot_led \ No newline at end of file diff --git a/tools/ci/ot_br.cmake b/tools/ci/ot_br.cmake index 54ee408..144c3a0 100644 --- a/tools/ci/ot_br.cmake +++ b/tools/ci/ot_br.cmake @@ -8,9 +8,5 @@ set(ENV{EXTRA_CFLAGS} "-Werror -Werror=deprecated-declarations -Werror=unused-va set(ENV{EXTRA_CXXFLAGS} "-Werror -Werror=deprecated-declarations -Werror=unused-variable \ -Werror=unused-but-set-variable -Werror=unused-function") -# (Not part of the boilerplate) -# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection. -set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common) - include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(esp_ot_br)