From 85fd83288da8ce5985f6b960c93d97682f8b7c91 Mon Sep 17 00:00:00 2001 From: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com> Date: Fri, 5 Jun 2026 18:29:33 -0400 Subject: [PATCH] [esp32_camera] Bump esp32-camera to 2.1.7 (#16846) --- .clang-tidy.hash | 2 +- esphome/components/camera_encoder/__init__.py | 9 ++------- esphome/components/esp32/__init__.py | 5 ++++- esphome/components/esp32_camera/__init__.py | 10 ++-------- esphome/components/zigbee/zigbee_esp32.py | 7 +++---- esphome/idf_component.yml | 2 +- 6 files changed, 13 insertions(+), 22 deletions(-) diff --git a/.clang-tidy.hash b/.clang-tidy.hash index cab077385d..0782b065f3 100644 --- a/.clang-tidy.hash +++ b/.clang-tidy.hash @@ -1 +1 @@ -6f2f1745246a413712801462c8a02b92aae003d75b6cf45ca1a3cb2996b41f57 +0b8325f52fca9224efb80dacca51ccbc8b3499bde7bb4aaa6f28a848c2e0a6a8 diff --git a/esphome/components/camera_encoder/__init__.py b/esphome/components/camera_encoder/__init__.py index 7d4cdc881e..344248fcf3 100644 --- a/esphome/components/camera_encoder/__init__.py +++ b/esphome/components/camera_encoder/__init__.py @@ -1,8 +1,5 @@ import esphome.codegen as cg -from esphome.components.esp32 import ( - add_idf_component, - require_libc_picolibc_newlib_compat, -) +from esphome.components.esp32 import add_idf_component import esphome.config_validation as cv from esphome.const import CONF_BUFFER_SIZE, CONF_ID, CONF_TYPE from esphome.types import ConfigType @@ -53,9 +50,7 @@ async def to_code(config: ConfigType) -> None: buffer = cg.new_Pvariable(config[CONF_ENCODER_BUFFER_ID]) cg.add(buffer.set_buffer_size(config[CONF_BUFFER_SIZE])) if config[CONF_TYPE] == ESP32_CAMERA_ENCODER: - add_idf_component(name="espressif/esp32-camera", ref="2.1.5") - # esp32-camera 2.1.5 needs the Newlib shim on IDF 6.0+; remove when fixed upstream - require_libc_picolibc_newlib_compat() + add_idf_component(name="espressif/esp32-camera", ref="2.1.7") cg.add_define("USE_ESP32_CAMERA_JPEG_ENCODER") var = cg.new_Pvariable( config[CONF_ID], diff --git a/esphome/components/esp32/__init__.py b/esphome/components/esp32/__init__.py index 6ecb41bff8..7e7b127814 100644 --- a/esphome/components/esp32/__init__.py +++ b/esphome/components/esp32/__init__.py @@ -1375,8 +1375,11 @@ def require_libc_picolibc_newlib_compat() -> None: """Keep CONFIG_LIBC_PICOLIBC_NEWLIB_COMPATIBILITY enabled on IDF 6.0+. Call this from components that link against precompiled Newlib binaries - referencing types/symbols the shim provides (e.g. esp32-camera). + referencing types/symbols the shim provides (e.g. zigbee). No-op on + IDF < 6.0.0. """ + if idf_version() < cv.Version(6, 0, 0): + return CORE.data[KEY_ESP32][KEY_LIBC_PICOLIBC_NEWLIB_COMPAT_REQUIRED] = True diff --git a/esphome/components/esp32_camera/__init__.py b/esphome/components/esp32_camera/__init__.py index 763a1f3405..c3b35a8279 100644 --- a/esphome/components/esp32_camera/__init__.py +++ b/esphome/components/esp32_camera/__init__.py @@ -3,11 +3,7 @@ import logging from esphome import automation, pins import esphome.codegen as cg from esphome.components import i2c -from esphome.components.esp32 import ( - add_idf_component, - add_idf_sdkconfig_option, - require_libc_picolibc_newlib_compat, -) +from esphome.components.esp32 import add_idf_component, add_idf_sdkconfig_option from esphome.components.psram import DOMAIN as psram_domain import esphome.config_validation as cv from esphome.const import ( @@ -403,11 +399,9 @@ async def to_code(config): if config[CONF_JPEG_QUALITY] != 0 and config[CONF_PIXEL_FORMAT] != "JPEG": cg.add_define("USE_ESP32_CAMERA_JPEG_CONVERSION") - add_idf_component(name="espressif/esp32-camera", ref="2.1.5") + add_idf_component(name="espressif/esp32-camera", ref="2.1.7") add_idf_sdkconfig_option("CONFIG_SCCB_HARDWARE_I2C_DRIVER_NEW", True) add_idf_sdkconfig_option("CONFIG_SCCB_HARDWARE_I2C_DRIVER_LEGACY", False) - # esp32-camera 2.1.5 needs the Newlib shim on IDF 6.0+; remove when fixed upstream - require_libc_picolibc_newlib_compat() for conf in config.get(CONF_ON_STREAM_START, []): trigger = cg.new_Pvariable(conf[CONF_TRIGGER_ID], var) diff --git a/esphome/components/zigbee/zigbee_esp32.py b/esphome/components/zigbee/zigbee_esp32.py index a0fadbce8b..086cdcc267 100644 --- a/esphome/components/zigbee/zigbee_esp32.py +++ b/esphome/components/zigbee/zigbee_esp32.py @@ -9,7 +9,7 @@ from esphome.components.esp32 import ( add_idf_component, add_idf_sdkconfig_option, add_partition, - idf_version, + require_libc_picolibc_newlib_compat, require_vfs_select, ) import esphome.config_validation as cv @@ -240,9 +240,8 @@ async def _zigbee_add_sdkconfigs(config: ConfigType) -> None: # dynamic log level control to be enabled add_idf_sdkconfig_option("CONFIG_LOG_DYNAMIC_LEVEL_CONTROL", True) # The pre-built Zigbee library is compiled against newlib which requires newlib - # reentrancy to be enabled with picolibc compatibility. - if idf_version() >= cv.Version(6, 0, 0): - add_idf_sdkconfig_option("CONFIG_LIBC_PICOLIBC_NEWLIB_COMPATIBILITY", True) + # reentrancy to be enabled with picolibc compatibility (IDF 6.0+ only). + require_libc_picolibc_newlib_compat() async def attributes_to_code( diff --git a/esphome/idf_component.yml b/esphome/idf_component.yml index 9c87a7e5cf..3a5b050072 100644 --- a/esphome/idf_component.yml +++ b/esphome/idf_component.yml @@ -20,7 +20,7 @@ dependencies: espressif/esp-tflite-micro: version: 1.3.3~1 espressif/esp32-camera: - version: 2.1.5 + version: 2.1.7 espressif/mdns: version: 1.11.0 espressif/esp_wifi_remote: