Skip to content

Commit

Permalink
Merge branch 'fix/fix_the_rcp_update_issue' into 'main'
Browse files Browse the repository at this point in the history
fix(rcp update): fix a compilation issue

See merge request espressif/esp-thread-br!138
  • Loading branch information
chshu committed Sep 10, 2024
2 parents 6011f07 + 93716d9 commit ceeb84a
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 7 deletions.
4 changes: 2 additions & 2 deletions components/esp_ot_cli_extension/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion components/esp_ot_cli_extension/idf_component.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
7 changes: 7 additions & 0 deletions examples/basic_thread_border_router/main/esp_ot_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,20 @@
}
#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, \
.uart_port = 1, .uart_baudrate = 115200, .reset_pin = CONFIG_PIN_TO_RCP_RESET, \
.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() \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
4 changes: 4 additions & 0 deletions tools/ci/idf_component_otbr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions tools/ci/idf_component_otcli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 0 additions & 4 deletions tools/ci/ot_br.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit ceeb84a

Please sign in to comment.