Add esp32c5 configuration (#1258)
Some checks failed
Build Boards / Determine variants to build (push) Has been cancelled
Build Boards / Build ${{ matrix.name }} (push) Has been cancelled

* Add esp32c5 configuration

* update idf_component.yml
This commit is contained in:
Xiaoxia 2025-10-05 09:59:28 +08:00 committed by GitHub
parent 3ee2195340
commit 549399b795
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 35 additions and 12 deletions

1
.gitignore vendored
View File

@ -16,3 +16,4 @@ main/mmap_generate_emoji.h
*.pyc *.pyc
*.bin *.bin
mmap_generate_*.h mmap_generate_*.h
.clangd

View File

@ -213,8 +213,10 @@ choice BOARD_TYPE
depends on IDF_TARGET_ESP32S3 depends on IDF_TARGET_ESP32S3
config BOARD_TYPE_ESP32S3_Touch_AMOLED_2_06 config BOARD_TYPE_ESP32S3_Touch_AMOLED_2_06
bool "Waveshare ESP32-S3-Touch-AMOLED-2.06" bool "Waveshare ESP32-S3-Touch-AMOLED-2.06"
depends on IDF_TARGET_ESP32S3
config BOARD_TYPE_ESP32S3_Touch_AMOLED_1_75 config BOARD_TYPE_ESP32S3_Touch_AMOLED_1_75
bool "Waveshare ESP32-S3-Touch-AMOLED-1.75" bool "Waveshare ESP32-S3-Touch-AMOLED-1.75"
depends on IDF_TARGET_ESP32S3
config BOARD_TYPE_ESP32S3_Touch_LCD_4B config BOARD_TYPE_ESP32S3_Touch_LCD_4B
bool "Waveshare ESP32-S3-Touch-LCD-4B" bool "Waveshare ESP32-S3-Touch-LCD-4B"
depends on IDF_TARGET_ESP32S3 depends on IDF_TARGET_ESP32S3
@ -365,6 +367,7 @@ choice BOARD_TYPE
select LV_GIF_CACHE_DECODE_DATA select LV_GIF_CACHE_DECODE_DATA
config BOARD_TYPE_JIUCHUAN config BOARD_TYPE_JIUCHUAN
bool "九川智能" bool "九川智能"
depends on IDF_TARGET_ESP32S3
config BOARD_TYPE_LABPLUS_MPYTHON_V3 config BOARD_TYPE_LABPLUS_MPYTHON_V3
bool "labplus mpython_v3 board" bool "labplus mpython_v3 board"
depends on IDF_TARGET_ESP32S3 depends on IDF_TARGET_ESP32S3
@ -604,7 +607,7 @@ config RECEIVE_CUSTOM_MESSAGE
help help
Enable custom message reception, allow the device to receive custom messages from the server (preferably through the MQTT protocol) Enable custom message reception, allow the device to receive custom messages from the server (preferably through the MQTT protocol)
menu TAIJIPAI_S3_CONFIG menu "TAIJIPAI_S3_CONFIG"
depends on BOARD_TYPE_ESP32S3_Taiji_Pi depends on BOARD_TYPE_ESP32S3_Taiji_Pi
choice I2S_TYPE_TAIJIPI_S3 choice I2S_TYPE_TAIJIPI_S3
prompt "taiji-pi-S3 I2S Type" prompt "taiji-pi-S3 I2S Type"

View File

@ -50,10 +50,13 @@ Es8311AudioCodec::Es8311AudioCodec(void* i2c_master_handle, i2c_port_t i2c_port,
es8311_cfg.hw_gain.codec_dac_voltage = 3.3; es8311_cfg.hw_gain.codec_dac_voltage = 3.3;
es8311_cfg.pa_reverted = pa_inverted_; es8311_cfg.pa_reverted = pa_inverted_;
codec_if_ = es8311_codec_new(&es8311_cfg); codec_if_ = es8311_codec_new(&es8311_cfg);
assert(codec_if_ != NULL);
if (codec_if_ == nullptr) {
ESP_LOGE(TAG, "Failed to create Es8311AudioCodec");
} else {
ESP_LOGI(TAG, "Es8311AudioCodec initialized"); ESP_LOGI(TAG, "Es8311AudioCodec initialized");
} }
}
Es8311AudioCodec::~Es8311AudioCodec() { Es8311AudioCodec::~Es8311AudioCodec() {
esp_codec_dev_delete(dev_); esp_codec_dev_delete(dev_);
@ -157,6 +160,9 @@ void Es8311AudioCodec::SetOutputVolume(int volume) {
void Es8311AudioCodec::EnableInput(bool enable) { void Es8311AudioCodec::EnableInput(bool enable) {
std::lock_guard<std::mutex> lock(data_if_mutex_); std::lock_guard<std::mutex> lock(data_if_mutex_);
if (codec_if_ == nullptr) {
return;
}
if (enable == input_enabled_) { if (enable == input_enabled_) {
return; return;
} }
@ -166,6 +172,9 @@ void Es8311AudioCodec::EnableInput(bool enable) {
void Es8311AudioCodec::EnableOutput(bool enable) { void Es8311AudioCodec::EnableOutput(bool enable) {
std::lock_guard<std::mutex> lock(data_if_mutex_); std::lock_guard<std::mutex> lock(data_if_mutex_);
if (codec_if_ == nullptr) {
return;
}
if (enable == output_enabled_) { if (enable == output_enabled_) {
return; return;
} }

View File

@ -12,12 +12,12 @@ dependencies:
espressif/esp_lcd_st7796: espressif/esp_lcd_st7796:
version: 1.3.5 version: 1.3.5
rules: rules:
- if: target not in [esp32c3, esp32c6] - if: target in [esp32, esp32s2, esp32s3, esp32p4]
espressif/esp_lcd_spd2010: ==1.0.2 espressif/esp_lcd_spd2010: ==1.0.2
espressif/esp_io_expander_tca9554: ==2.0.0 espressif/esp_io_expander_tca9554: ==2.0.0
espressif/esp_lcd_panel_io_additions: ^1.0.1 espressif/esp_lcd_panel_io_additions: ^1.0.1
78/esp_lcd_nv3023: ~1.0.0 78/esp_lcd_nv3023: ~1.0.0
78/esp-wifi-connect: ~2.5.2 78/esp-wifi-connect: ~2.6.0
78/esp-opus-encoder: ~2.4.1 78/esp-opus-encoder: ~2.4.1
78/esp-ml307: ~3.3.6 78/esp-ml307: ~3.3.6
78/xiaozhi-fonts: ~1.5.3 78/xiaozhi-fonts: ~1.5.3
@ -39,7 +39,11 @@ dependencies:
espressif2022/esp_emote_gfx: ^1.1.0 espressif2022/esp_emote_gfx: ^1.1.0
espressif/adc_mic: ^0.2.1 espressif/adc_mic: ^0.2.1
espressif/esp_mmap_assets: '>=1.2' espressif/esp_mmap_assets: '>=1.2'
txp666/otto-emoji-gif-component: ~1.0.2 txp666/otto-emoji-gif-component:
version: 1.0.2
rules:
- if: target not in [esp32c5]
espressif/adc_battery_estimation: ^0.2.0 espressif/adc_battery_estimation: ^0.2.0
# SenseCAP Watcher Board # SenseCAP Watcher Board
@ -48,11 +52,7 @@ dependencies:
rules: rules:
- if: target in [esp32s3] - if: target in [esp32s3]
tny-robotics/sh1106-esp-idf: tny-robotics/sh1106-esp-idf: ^1.0.0
version: ^1.0.0
rules:
- if: idf_version >= "5.4.0"
waveshare/esp_lcd_jd9365_10_1: waveshare/esp_lcd_jd9365_10_1:
version: '*' version: '*'
rules: rules:

View File

@ -47,7 +47,6 @@ CONFIG_CAMERA_DMA_BUFFER_SIZE_MAX=8192
# LVGL 9.2.2 # LVGL 9.2.2
CONFIG_LV_OS_NONE=y CONFIG_LV_OS_NONE=y
CONFIG_LV_USE_OS=0
CONFIG_LV_USE_CLIB_MALLOC=y CONFIG_LV_USE_CLIB_MALLOC=y
CONFIG_LV_USE_CLIB_STRING=y CONFIG_LV_USE_CLIB_STRING=y
CONFIG_LV_USE_CLIB_SPRINTF=y CONFIG_LV_USE_CLIB_SPRINTF=y

View File

@ -0,0 +1,11 @@
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y
CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=3
CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM=6
CONFIG_ESP_WIFI_RX_BA_WIN=3
CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=16
CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA=y