Skip to content

Commit a5ed23e

Browse files
committed
Merge branch 'pr_130' into 'main'
feat(rcp_update): use esp serial flasher 1.8.0 and support esp32c6 See merge request espressif/esp-thread-br!159
2 parents c3dfaeb + 175715b commit a5ed23e

File tree

6 files changed

+18
-14
lines changed

6 files changed

+18
-14
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
version: "1.3.1"
1+
version: "1.4.0"
22
description: Espressif RCP Update Component for Thread Border Router and Zigbee Gateway
33
url: https://github.com/espressif/esp-thread-br/tree/main/components/esp_rcp_update
44
dependencies:
55
espressif/esp-serial-flasher:
6-
version: "~0.0.0"
6+
version: "1.8.0"
77

88
idf:
99
version: ">=5.0"

components/esp_rcp_update/include/esp_rcp_update.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,15 @@ extern "C" {
1818
#define RCP_URL_MAX_SIZE 100
1919

2020
typedef enum {
21-
RCP_TYPE_INVALID = 0, /* Invalid type */
22-
RCP_TYPE_ESP32H2_UART, /* ESP32H2 connected via UART */
21+
RCP_TYPE_INVALID = 0, /* Invalid type */
22+
RCP_TYPE_UART = 1, /* Connected via UART */
23+
RCP_TYPE_MAX = 2, /* Max type */
2324
} esp_rcp_type_t;
2425

26+
/* For compatibility, will be removed in the next major update. */
27+
#define RCP_TYPE_ESP32H2_UART \
28+
_Pragma("GCC warning \"'RCP_TYPE_ESP32H2_UART' enum is deprecated, use 'RCP_TYPE_UART' instead\"") RCP_TYPE_UART
29+
2530
/**
2631
* @brief The RCP update config for OpenThread.
2732
*

components/esp_rcp_update/src/esp_rcp_update.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ esp_err_t esp_rcp_submit_new_image()
207207
esp_err_t esp_rcp_update_init(const esp_rcp_update_config_t *update_config)
208208
{
209209
ESP_RETURN_ON_ERROR(nvs_open("storage", NVS_READWRITE, &s_handle.nvs_handle), "TAG", "Failed to open nvs");
210-
ESP_RETURN_ON_FALSE(update_config->rcp_type == RCP_TYPE_ESP32H2_UART, ESP_ERR_INVALID_ARG, TAG,
211-
"Unsupported RCP type");
210+
ESP_RETURN_ON_FALSE(update_config->rcp_type > RCP_TYPE_INVALID && update_config->rcp_type < RCP_TYPE_MAX,
211+
ESP_ERR_INVALID_ARG, TAG, "Unsupported RCP type");
212212

213213
s_handle.update_config = *update_config;
214214
load_rcp_update_seq(&s_handle);

examples/basic_thread_border_router/main/esp_ot_config.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@
7272
#endif // CONFIG_OPENTHREAD_RADIO_SPINEL_UART OR CONFIG_OPENTHREAD_RADIO_SPINEL_SPI
7373

7474
#if CONFIG_AUTO_UPDATE_RCP
75-
#define ESP_OPENTHREAD_RCP_UPDATE_CONFIG() \
76-
{ \
77-
.rcp_type = RCP_TYPE_ESP32H2_UART, .uart_rx_pin = CONFIG_PIN_TO_RCP_TX, .uart_tx_pin = CONFIG_PIN_TO_RCP_RX, \
78-
.uart_port = 1, .uart_baudrate = 115200, .reset_pin = CONFIG_PIN_TO_RCP_RESET, \
79-
.boot_pin = CONFIG_PIN_TO_RCP_BOOT, .update_baudrate = 460800, \
80-
.firmware_dir = "/" CONFIG_RCP_PARTITION_NAME "/ot_rcp", .target_chip = ESP32H2_CHIP, \
75+
#define ESP_OPENTHREAD_RCP_UPDATE_CONFIG() \
76+
{ \
77+
.rcp_type = RCP_TYPE_UART, .uart_rx_pin = CONFIG_PIN_TO_RCP_TX, .uart_tx_pin = CONFIG_PIN_TO_RCP_RX, \
78+
.uart_port = 1, .uart_baudrate = 115200, .reset_pin = CONFIG_PIN_TO_RCP_RESET, \
79+
.boot_pin = CONFIG_PIN_TO_RCP_BOOT, .update_baudrate = 460800, \
80+
.firmware_dir = "/" CONFIG_RCP_PARTITION_NAME "/ot_rcp", .target_chip = ESP32H2_CHIP, \
8181
}
8282
#else
8383
#define ESP_OPENTHREAD_RCP_UPDATE_CONFIG() \

examples/basic_thread_border_router/main/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ dependencies:
44
espressif/esp_ot_cli_extension:
55
version: "~1.2.0"
66
espressif/esp_rcp_update:
7-
version: "~1.3.0"
7+
version: "~1.4.0"
88
esp_br_http_ota:
99
path: ../../../components/esp_br_http_ota
1010
esp_ot_br_server:

tools/ci/idf_component_local.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ dependencies:
55
path: ${ESP_THREAD_BR_PATH}/components/esp_ot_cli_extension
66
espressif/esp_rcp_update:
77
path: ${ESP_THREAD_BR_PATH}/components/esp_rcp_update
8-
espressif/esp-serial-flasher: "~0.0.0"
98
esp_br_http_ota:
109
path: ${ESP_THREAD_BR_PATH}/components/esp_br_http_ota
1110
esp_ot_br_server:

0 commit comments

Comments
 (0)