Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support of ESP32C6 to OTBR example (CON-1513) #1244

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ out/
_build/
tools/chip-tool/
.zap/
.idea
cmake-build-*
venv
2 changes: 2 additions & 0 deletions examples/controller/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ if(NOT DEFINED ENV{ESP_MATTER_DEVICE_PATH})
set(ENV{ESP_MATTER_DEVICE_PATH} $ENV{ESP_MATTER_PATH}/device_hal/device/esp32c3_devkit_m)
elseif("${IDF_TARGET}" STREQUAL "esp32s3")
set(ENV{ESP_MATTER_DEVICE_PATH} $ENV{ESP_MATTER_PATH}/device_hal/device/esp32s3_devkit_c)
elseif ("${IDF_TARGET}" STREQUAL "esp32c6")
set(ENV{ESP_MATTER_DEVICE_PATH} $ENV{ESP_MATTER_PATH}/device_hal/device/esp32c6_devkit_c)
else()
message(FATAL_ERROR "Unsupported IDF_TARGET")
endif()
Expand Down
11 changes: 9 additions & 2 deletions examples/controller/main/esp_ot_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
.radio_mode = RADIO_MODE_NATIVE, \
}
#elif CONFIG_OPENTHREAD_RADIO_SPINEL_UART
#ifdef CONFIG_IDF_TARGET_ESP32C6
#define UART_RX_PIN GPIO_NUM_17
#define UART_TX_PIN GPIO_NUM_16
#else
#define UART_RX_PIN GPIO_NUM_17
#define UART_TX_PIN GPIO_NUM_18
#endif
#define ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG() \
{ \
.radio_mode = RADIO_MODE_UART_RCP, \
Expand All @@ -39,8 +46,8 @@
.rx_flow_ctrl_thresh = 0, \
.source_clk = UART_SCLK_DEFAULT, \
}, \
.rx_pin = GPIO_NUM_17, \
.tx_pin = GPIO_NUM_18, \
.rx_pin = UART_RX_PIN, \
.tx_pin = UART_TX_PIN, \
}, \
}
#else
Expand Down
2 changes: 2 additions & 0 deletions examples/thread_border_router/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ endif(NOT DEFINED ENV{ESP_MATTER_PATH})
if(NOT DEFINED ENV{ESP_MATTER_DEVICE_PATH})
if("${IDF_TARGET}" STREQUAL "esp32s3")
set(ENV{ESP_MATTER_DEVICE_PATH} $ENV{ESP_MATTER_PATH}/device_hal/device/esp32s3_devkit_c)
elseif ("${IDF_TARGET}" STREQUAL "esp32c6")
set(ENV{ESP_MATTER_DEVICE_PATH} $ENV{ESP_MATTER_PATH}/device_hal/device/esp32c6_devkit_c)
else()
message(FATAL_ERROR "Unsupported IDF_TARGET")
endif()
Expand Down
2 changes: 1 addition & 1 deletion examples/thread_border_router/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ See the [docs](https://docs.espressif.com/projects/esp-matter/en/latest/esp32/de

### 1.1 Hardware Platform

The [ESP Thread Border Router board](https://github.com/espressif/esp-thread-br?tab=readme-ov-file#esp-thread-border-router-board) which provides an integrated module of an ESP32-S3 and an ESP32-H2 is required for this example.
The [ESP Thread Border Router board](https://github.com/espressif/esp-thread-br?tab=readme-ov-file#esp-thread-border-router-board) which provides an integrated module of an ESP32-S3 and an ESP32-H2 is required for this example. Alternatively, the ESP32-S3 and ESP32-H2 might be replaced by the ESP32-C6.

### 1.2 Firmware for RCP

Expand Down
11 changes: 9 additions & 2 deletions examples/thread_border_router/main/esp_ot_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@
.radio_mode = RADIO_MODE_NATIVE, \
}
#elif CONFIG_OPENTHREAD_RADIO_SPINEL_UART
#ifdef CONFIG_IDF_TARGET_ESP32C6
#define UART_RX_PIN GPIO_NUM_17
#define UART_TX_PIN GPIO_NUM_16
#else
#define UART_RX_PIN GPIO_NUM_17
#define UART_TX_PIN GPIO_NUM_18
#endif
#define ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG() \
{ \
.radio_mode = RADIO_MODE_UART_RCP, \
Expand All @@ -40,8 +47,8 @@
.rx_flow_ctrl_thresh = 0, \
.source_clk = UART_SCLK_DEFAULT, \
}, \
.rx_pin = GPIO_NUM_17, \
.tx_pin = GPIO_NUM_18, \
.rx_pin = UART_RX_PIN, \
.tx_pin = UART_TX_PIN, \
}, \
}
#else
Expand Down