Error using camera configuration

Here’s the code:

# Configuration for ESPHome
esphome:
  # Name of the ESP32-S3 device
  name: esp32s3
  
  # PlatformIO build options
  platformio_options:
    build_flags: -DBOARD_HAS_PSRAM
    board_build.arduino.memory_type: qio_opi
    board_build.f_flash: 80000000L
    board_build.flash_mode: qio 

# Configuration for ESP32
esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:

# Over-the-Air update configuration
ota:

# Wi-Fi configuration
wifi:
  ssid: "your wifi name"
  password: "your password"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Xiao-Esp32s3 Fallback Hotspot"
    password: "MoLTqZUvHwWI"

# Captive portal configuration
captive_portal:

# Configuration for the ESP32 Camera
esp32_camera:
  id: espcam
  name: My Camera
  external_clock:
    pin: GPIO10
    frequency: 20MHz
  i2c_pins:
    sda: GPIO40
    scl: GPIO39
  data_pins: [GPIO15, GPIO17, GPIO18, GPIO16, GPIO14, GPIO12, GPIO11, GPIO48]
  vsync_pin: GPIO38
  href_pin: GPIO47
  pixel_clock_pin: GPIO13
  resolution: 800x600
  
# Configuration for the ESP32 Camera Web Server
esp32_camera_web_server:
  - port: 8080
    mode: stream
  - port: 8081
    mode: snapshot

Here’s the error:

## INFO ESPHome 2024.5.3
INFO Reading configuration /config/esphome/terminal-spi-camera.yaml…
INFO Generating C++ source…
INFO Compiling app…
Processing esp32s3 (board: esp32-s3-devkitc-1; framework: arduino; platform: platformio/[email protected])

HARDWARE: ESP32S3 240MHz, 320KB RAM, 8MB Flash

* toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
* toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch5
Dependency Graph
|-- AsyncTCP-esphome @ 2.1.3
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.2.0
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
Archiving .pioenvs/esp32s3/lib915/libESPmDNS.a
Compiling .pioenvs/esp32s3/FrameworkArduino/Esp.cpp.o
Compiling .pioenvs/esp32s3/FrameworkArduino/HardwareSerial.cpp.o
Compiling .pioenvs/esp32s3/FrameworkArduino/IPAddress.cpp.o
Compiling .pioenvs/esp32s3/FrameworkArduino/IPv6Address.cpp.o
In file included from /data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/spi_reg.h:1694,
from /data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/Esp.cpp:33:
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/check_config.h:881:2: error: #error “MBEDTLS_X509_CRT_WRITE_C defined, but not all prerequisites”
#error “MBEDTLS_X509_CRT_WRITE_C defined, but not all prerequisites”
^~~~~
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s3/include/mbedtls/mbedtls/include/mbedtls/check_config.h:885:2: error: #error “MBEDTLS_X509_CSR_WRITE_C defined, but not all prerequisites”
#error “MBEDTLS_X509_CSR_WRITE_C defined, but not all prerequisites”
^~~~~
In file included from /data/cache/platformio/packages/framework-arduinoespressif32/cores/esp32/Esp.cpp:33:
/data/cache/platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s3/include/soc/esp32s3/include/soc/spi_reg.h:1697:1: warning: null character(s) ignored


Does anyone know why? you’mei’you1 The solution?

Try a clean build

I’ve tried to clear the build and recompile, but it doesn’t work, it’s still the same error