diff --git a/.gitignore b/.gitignore index a70301abf..5f57a43fd 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,6 @@ out/ _build/ tools/chip-tool/ .zap/ +.idea +cmake-build-* +venv \ No newline at end of file diff --git a/examples/controller/CMakeLists.txt b/examples/controller/CMakeLists.txt index d83cf47cb..4142c0d9f 100644 --- a/examples/controller/CMakeLists.txt +++ b/examples/controller/CMakeLists.txt @@ -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() diff --git a/examples/controller/main/esp_ot_config.h b/examples/controller/main/esp_ot_config.h index 76d8faf23..6c672d701 100644 --- a/examples/controller/main/esp_ot_config.h +++ b/examples/controller/main/esp_ot_config.h @@ -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, \ @@ -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 diff --git a/examples/thread_border_router/CMakeLists.txt b/examples/thread_border_router/CMakeLists.txt index 3a1f2cc6b..fad933946 100644 --- a/examples/thread_border_router/CMakeLists.txt +++ b/examples/thread_border_router/CMakeLists.txt @@ -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() diff --git a/examples/thread_border_router/README.md b/examples/thread_border_router/README.md index ffc1368a3..e56bedc62 100644 --- a/examples/thread_border_router/README.md +++ b/examples/thread_border_router/README.md @@ -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 diff --git a/examples/thread_border_router/main/esp_ot_config.h b/examples/thread_border_router/main/esp_ot_config.h index e73f8cf96..bd8f77918 100644 --- a/examples/thread_border_router/main/esp_ot_config.h +++ b/examples/thread_border_router/main/esp_ot_config.h @@ -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, \ @@ -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