From dde1f36b18003991f6a6309f969d95ac5add1733 Mon Sep 17 00:00:00 2001 From: Madison Steiner <8176115+mh0pe@users.noreply.github.com> Date: Thu, 26 Mar 2026 10:40:01 -0700 Subject: [PATCH 1/3] bindings: fix v6.0 header issues and add new driver bindings - Fix ESP_IDF_COMP_ESP_PARTITION guard (missing _ENABLED suffix) - Guard lwip/lwip_napt.h for v6.0 (removed upstream) - Guard esp_vfs_cdcacm.h for v6.0 (moved to esp_usb_cdc_rom_console) - Fix esp_lcd_panel_rgb.h to remain available on v6.0 via SOC_LCD_RGB_SUPPORTED - Add new TWAI driver bindings (esp_twai.h, esp_twai_onchip.h) for v6.0+ - Add SDM driver bindings (driver/sdm.h) for v5.3+ - Add v6.0+ driver bindings: Camera, ISP, JPEG, Analog Comparator, Parallel IO Co-Authored-By: Claude Opus 4.6 (1M context) --- src/include/esp-idf/bindings.h | 76 +++++++++++++++++++++++++++++++--- 1 file changed, 71 insertions(+), 5 deletions(-) diff --git a/src/include/esp-idf/bindings.h b/src/include/esp-idf/bindings.h index 44577517ad..98d914154f 100644 --- a/src/include/esp-idf/bindings.h +++ b/src/include/esp-idf/bindings.h @@ -82,7 +82,7 @@ #include "esp_spi_flash.h" #endif #endif -#ifdef ESP_IDF_COMP_ESP_PARTITION +#ifdef ESP_IDF_COMP_ESP_PARTITION_ENABLED #include "esp_partition.h" #endif #else @@ -251,7 +251,9 @@ #ifdef ESP_IDF_COMP_VFS_ENABLED #include "esp_vfs.h" +#if ESP_IDF_VERSION_MAJOR < 6 #include "esp_vfs_cdcacm.h" +#endif #include "esp_vfs_dev.h" #include "esp_vfs_semihost.h" #ifdef SOC_USB_SERIAL_JTAG_SUPPORTED @@ -291,9 +293,15 @@ #endif #endif +#ifdef ESP_IDF_COMP_ESP_USB_CDC_ROM_CONSOLE_ENABLED +#include "esp_vfs_cdcacm.h" +#endif + #ifdef ESP_IDF_COMP_LWIP_ENABLED #include "lwip/dns.h" +#if ESP_IDF_VERSION_MAJOR < 6 #include "lwip/lwip_napt.h" +#endif #include "lwip/netdb.h" #include "lwip/sockets.h" #if ESP_IDF_VERSION_MAJOR > 4 @@ -423,6 +431,11 @@ #if OLD_DRIVER_COMP_TWAI || defined(ESP_IDF_COMP_ESP_DRIVER_TWAI_ENABLED) #include "driver/twai.h" #endif +#if ESP_IDF_VERSION_MAJOR > 5 && defined(ESP_IDF_COMP_ESP_DRIVER_TWAI_ENABLED) +#include "esp_twai.h" +#include "esp_twai_types.h" +#include "esp_twai_onchip.h" +#endif // DAC #if OLD_DRIVER_COMP || defined(ESP_IDF_COMP_ESP_DRIVER_DAC_ENABLED) @@ -553,10 +566,13 @@ #include "sdmmc_cmd.h" #endif -// Sigma-delta +// Sigma-delta / SDM #if ESP_IDF_VERSION_MAJOR < 6 #include "driver/sigmadelta.h" #endif +#ifdef ESP_IDF_COMP_ESP_DRIVER_SDM_ENABLED +#include "driver/sdm.h" +#endif // SPI #if OLD_DRIVER_COMP || defined(ESP_IDF_COMP_ESP_DRIVER_SPI_ENABLED) @@ -588,6 +604,58 @@ #endif #endif +// New drivers (ESP-IDF v6.0+) +#if ESP_IDF_VERSION_MAJOR > 5 + +#ifdef ESP_IDF_COMP_ESP_DRIVER_CAM_ENABLED +#include "esp_cam_ctlr.h" +#include "esp_cam_ctlr_types.h" +#ifdef SOC_MIPI_CSI_SUPPORTED +#include "esp_cam_ctlr_csi.h" +#endif +#endif + +#ifdef ESP_IDF_COMP_ESP_DRIVER_ISP_ENABLED +#ifdef SOC_ISP_SUPPORTED +#include "driver/isp.h" +#include "driver/isp_core.h" +#include "driver/isp_types.h" +#include "driver/isp_af.h" +#include "driver/isp_ae.h" +#include "driver/isp_awb.h" +#include "driver/isp_bf.h" +#include "driver/isp_ccm.h" +#include "driver/isp_gamma.h" +#include "driver/isp_hist.h" +#include "driver/isp_sharpen.h" +#endif +#endif + +#ifdef ESP_IDF_COMP_ESP_DRIVER_JPEG_ENABLED +#ifdef SOC_JPEG_CODEC_SUPPORTED +#include "driver/jpeg_types.h" +#ifdef SOC_JPEG_DECODE_SUPPORTED +#include "driver/jpeg_decode.h" +#endif +#ifdef SOC_JPEG_ENCODE_SUPPORTED +#include "driver/jpeg_encode.h" +#endif +#endif +#endif + +#ifdef ESP_IDF_COMP_ESP_DRIVER_ANA_CMPR_ENABLED +#include "driver/ana_cmpr.h" +#include "driver/ana_cmpr_types.h" +#endif + +#ifdef ESP_IDF_COMP_ESP_DRIVER_PARLIO_ENABLED +#include "driver/parlio_types.h" +#include "driver/parlio_tx.h" +#include "driver/parlio_rx.h" +#endif + +#endif // ESP_IDF_VERSION_MAJOR > 5 + #ifdef ESP_IDF_COMP_ESPCOREDUMP_ENABLED #ifdef CONFIG_ESP_COREDUMP_ENABLE #include "esp_core_dump.h" @@ -749,10 +817,8 @@ #include "esp_lcd_types.h" #include "esp_lcd_panel_interface.h" #include "esp_lcd_panel_io_interface.h" -#if ESP_IDF_VERSION_MAJOR < 6 -#if ESP_IDF_VERSION_MAJOR == 4 && ESP_IDF_VERSION_MINOR >= 4 || (ESP_IDF_VERSION_MAJOR >= 5 && ESP_IDF_VERSION_MINOR <= 2 || SOC_LCD_RGB_SUPPORTED) +#if (ESP_IDF_VERSION_MAJOR == 4 && ESP_IDF_VERSION_MINOR >= 4) || (ESP_IDF_VERSION_MAJOR == 5 && ESP_IDF_VERSION_MINOR <= 2) || defined(SOC_LCD_RGB_SUPPORTED) #include "esp_lcd_panel_rgb.h" -#endif //(ESP_IDF_VERSION_MAJOR == 4 && ESP_IDF_VERSION_MINOR >= 4) || ((ESP_IDF_VERSION_MAJOR >= 5 && ESP_IDF_VERSION_MINOR <= 2) || SOC_LCD_RGB_SUPPORTED) #endif #if ESP_IDF_VERSION_MAJOR > 5 || ESP_IDF_VERSION_MAJOR == 5 && ESP_IDF_VERSION_MINOR >= 3 #include "esp_lcd_panel_dev.h" From 187c8c7047bad7442f88dc85eab2245a641733f6 Mon Sep 17 00:00:00 2001 From: Madison Steiner <8176115+mh0pe@users.noreply.github.com> Date: Thu, 26 Mar 2026 10:40:47 -0700 Subject: [PATCH 2/3] CI: enable full version matrix with exclusions, add deprecation suppression Uncomment all ESP-IDF versions (v4.4.8 through v6.0) in the CI matrix and add proper exclusions for targets not supported in older versions: - riscv32imac (ESP32-C6/H2): exclude v4.4.8 - riscv32imafc (ESP32-P4): exclude v4.4.8 through v5.2.5 This gives 43 CI jobs covering the entire supported version range. Also add deprecation warning suppression for legacy i2c/twai/touch drivers in sdkconfig.defaults (v6.0-only Kconfig options, silently ignored by v5.x). Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/configs/sdkconfig.defaults | 5 +++++ .github/workflows/ci.yml | 21 +++++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/configs/sdkconfig.defaults b/.github/configs/sdkconfig.defaults index 580175fef9..58b31dd8c2 100644 --- a/.github/configs/sdkconfig.defaults +++ b/.github/configs/sdkconfig.defaults @@ -7,3 +7,8 @@ CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=4096 # OpenThread support CONFIG_OPENTHREAD_ENABLED=y + +# Suppress deprecation warnings for legacy drivers still included in bindings +CONFIG_I2C_SUPPRESS_DEPRECATE_WARN=y +CONFIG_TWAI_SUPPRESS_DEPRECATE_WARN=y +CONFIG_TOUCH_SUPPRESS_DEPRECATE_WARN=y diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d9fd554d27..e0095c5499 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,14 +28,27 @@ jobs: - xtensa-esp32s2-espidf - xtensa-esp32s3-espidf idf-version: -# - v4.4.8 -# - v5.0.9 -# - v5.1.6 -# - v5.2.5 + - v4.4.8 + - v5.0.9 + - v5.1.6 + - v5.2.5 - v5.3.4 - v5.4.3 - v5.5.3 - v6.0 + exclude: + # ESP32-C6/H2 (riscv32imac) not supported before v5.0 + - target: riscv32imac-esp-espidf + idf-version: v4.4.8 + # ESP32-P4 (riscv32imafc) not supported before v5.3 + - target: riscv32imafc-esp-espidf + idf-version: v4.4.8 + - target: riscv32imafc-esp-espidf + idf-version: v5.0.9 + - target: riscv32imafc-esp-espidf + idf-version: v5.1.6 + - target: riscv32imafc-esp-espidf + idf-version: v5.2.5 steps: - name: Setup | Checkout uses: actions/checkout@v3 From f220717b2b23088cd2372ccab28db3fff84b89a6 Mon Sep 17 00:00:00 2001 From: Madison Steiner <8176115+mh0pe@users.noreply.github.com> Date: Thu, 26 Mar 2026 11:12:05 -0700 Subject: [PATCH 3/3] bindings: fix uart_vfs.h and mbedtls guards for v4.4/v5.0 compatibility - uart_vfs.h: tighten guard from >= 5.0 to >= 5.3 (header only exists since the driver component split in v5.3) - mbedtls: replace build_info.h + MBEDTLS_VERSION_MAJOR < 4 guard with ESP_IDF_VERSION_MAJOR < 6 (build_info.h does not exist in MbedTLS 2.x used by ESP-IDF v4.4) Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/ci.yml | 4 +++- src/include/esp-idf/bindings.h | 5 ++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e0095c5499..7d6a495ef5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,9 +37,11 @@ jobs: - v5.5.3 - v6.0 exclude: - # ESP32-C6/H2 (riscv32imac) not supported before v5.0 + # ESP32-C6/H2 (riscv32imac) not supported before v5.1 - target: riscv32imac-esp-espidf idf-version: v4.4.8 + - target: riscv32imac-esp-espidf + idf-version: v5.0.9 # ESP32-P4 (riscv32imafc) not supported before v5.3 - target: riscv32imafc-esp-espidf idf-version: v4.4.8 diff --git a/src/include/esp-idf/bindings.h b/src/include/esp-idf/bindings.h index 98d914154f..950243ded3 100644 --- a/src/include/esp-idf/bindings.h +++ b/src/include/esp-idf/bindings.h @@ -317,9 +317,8 @@ #endif #ifdef ESP_IDF_COMP_MBEDTLS_ENABLED -#include "mbedtls/build_info.h" #include "mbedtls/ssl.h" -#if MBEDTLS_VERSION_MAJOR < 4 +#if ESP_IDF_VERSION_MAJOR < 6 #include "mbedtls/aes.h" #include "mbedtls/cipher.h" #include "mbedtls/entropy.h" @@ -592,7 +591,7 @@ #if OLD_DRIVER_COMP || defined(ESP_IDF_COMP_ESP_DRIVER_UART_ENABLED) #include "driver/uart.h" #include "driver/uart_select.h" -#if ESP_IDF_VERSION_MAJOR >= 5 && defined(ESP_IDF_COMP_VFS_ENABLED) +#if defined(ESP_IDF_COMP_VFS_ENABLED) && (ESP_IDF_VERSION_MAJOR > 5 || (ESP_IDF_VERSION_MAJOR == 5 && ESP_IDF_VERSION_MINOR >= 3)) #include "driver/uart_vfs.h" #endif #endif