Seeed XIAO ESP32C3 not usable so far with ESPHome?

Hi

I use ESPHome for my ESP devices and I wanted to use it with the Xiao ESP32C3 module I bought. Unhappy it looks like support in ESPHome for such chipset is far too basic for now :frowning: Trying just to add code for PWM output and then it doesn’t compile anymore in ESPHome :frowning:
Also the web_server and captive_portal features ane rot avalaible as it needs to use for now the ESP-IDF :frowning:

ESPHome sketch:

esphome:
  friendly_name: esp32c3
  name: esp32c3
  platformio_options:
    board_build.flash_mode: dio  

esp32:
  board: seeed_xiao_esp32c3
  variant: esp32c3
  framework:
    type: esp-idf

wifi:
  networks:
  - ssid: !secret wifi_ssid
    password: !secret wifi_password
  - ssid: !secret wifi_puppy
    password: !secret wifi_puppy_passwd
  ap:
    ssid: $friendly_name

sensor:
  - platform: wifi_signal
    name: $name WiFi Signal
    update_interval: 60s
  - platform: uptime
    name: $name Uptime
    filters:
      - lambda: return x / 60.0;
    unit_of_measurement: minutes

logger:

ota:

#web_server:

#captive_portal:

api:

output:
  - platform: ledc
    pin: GPIO4
    id: sortie_1
  - platform: ledc
    pin: GPIO6
    id: sortie_2

light:
  - platform: monochromatic
    output: sortie_1
    name: "Light 1"
  - platform: monochromatic
    output: sortie_2
    name: "Light 2"

Errors during compile:

INFO Reading configuration /config/esphome/esp32c3.yaml…
INFO Generating C++ source…
INFO Compiling app…
Processing esp32c3 (board: seeed_xiao_esp32c3; framework: espidf; platform: platformio/espressif32 @ 5.2.0)

HARDWARE: ESP32C3 160MHz, 320KB RAM, 4MB Flash

  • framework-espidf @ 3.40402.0 (4.4.2)
  • tool-cmake @ 3.16.4
  • tool-ninja @ 1.7.1
  • toolchain-esp32ulp @ 2.35.0-20220830
  • toolchain-riscv32-esp @ 8.4.0+2021r2-patch3
    Reading CMake configuration…
    LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
    No dependencies
    Compiling /data/esp32c3/.pioenvs/esp32c3/src/main.o
    Linking /data/esp32c3/.pioenvs/esp32c3/firmware.elf
    /data/cache/platformio/packages/toolchain-riscv32-esp/bin/…/lib/gcc/riscv32-esp-elf/8.4.0/…/…/…/…/riscv32-esp-elf/bin/ld: /data/esp32c3/.pioenvs/esp32c3/src/esphome/components/api/api_connection.o: in function std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&)': /data/cache/platformio/packages/toolchain-riscv32-esp/riscv32-esp-elf/include/c++/8.4.0/bits/basic_string.h:6011: undefined reference to esphome::light::LightState::make_call()’
    /data/cache/platformio/packages/toolchain-riscv32-esp/bin/…/lib/gcc/riscv32-esp-elf/8.4.0/…/…/…/…/riscv32-esp-elf/bin/ld: /data/esp32c3/.pioenvs/esp32c3/src/esphome/components/api/api_connection.o: in function esphome::api::APIConnection::light_command(esphome::api::LightCommandRequest const&)': /config/esphome/.esphome/build/esp32c3/src/esphome/components/api/api_connection.cpp:375: undefined reference to esphome::light::LightCall::set_state(bool)’
    /data/cache/platformio/packages/toolchain-riscv32-esp/bin/…/lib/gcc/riscv32-esp-elf/8.4.0/…/…/…/…/riscv32-esp-elf/bin/ld: /config/esphome/.esphome/build/esp32c3/src/esphome/components/api/api_connection.cpp:377: undefined reference to esphome::light::LightCall::set_brightness(float)' /data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /config/esphome/.esphome/build/esp32c3/src/esphome/components/api/api_connection.cpp:379: undefined reference to esphome::light::LightCall::set_color_mode(esphome::light::ColorMode)’
    /data/cache/platformio/packages/toolchain-riscv32-esp/bin/…/lib/gcc/riscv32-esp-elf/8.4.0/…/…/…/…/riscv32-esp-elf/bin/ld: /config/esphome/.esphome/build/esp32c3/src/esphome/components/api/api_connection.cpp:381: undefined reference to esphome::light::LightCall::set_color_brightness(float)' /data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /config/esphome/.esphome/build/esp32c3/src/esphome/components/api/api_connection.cpp:383: undefined reference to esphome::light::LightCall::set_red(float)’
    /data/cache/platformio/packages/toolchain-riscv32-esp/bin/…/lib/gcc/riscv32-esp-elf/8.4.0/…/…/…/…/riscv32-esp-elf/bin/ld: /config/esphome/.esphome/build/esp32c3/src/esphome/components/api/api_connection.cpp:384: undefined reference to esphome::light::LightCall::set_green(float)' /data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /config/esphome/.esphome/build/esp32c3/src/esphome/components/api/api_connection.cpp:385: undefined reference to esphome::light::LightCall::set_blue(float)’
    /data/cache/platformio/packages/toolchain-riscv32-esp/bin/…/lib/gcc/riscv32-esp-elf/8.4.0/…/…/…/…/riscv32-esp-elf/bin/ld: /config/esphome/.esphome/build/esp32c3/src/esphome/components/api/api_connection.cpp:388: undefined reference to esphome::light::LightCall::set_white(float)' /data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /config/esphome/.esphome/build/esp32c3/src/esphome/components/api/api_connection.cpp:390: undefined reference to esphome::light::LightCall::set_color_temperature(float)’
    /data/cache/platformio/packages/toolchain-riscv32-esp/bin/…/lib/gcc/riscv32-esp-elf/8.4.0/…/…/…/…/riscv32-esp-elf/bin/ld: /config/esphome/.esphome/build/esp32c3/src/esphome/components/api/api_connection.cpp:392: undefined reference to esphome::light::LightCall::set_cold_white(float)' /data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /config/esphome/.esphome/build/esp32c3/src/esphome/components/api/api_connection.cpp:394: undefined reference to esphome::light::LightCall::set_warm_white(float)’
    /data/cache/platformio/packages/toolchain-riscv32-esp/bin/…/lib/gcc/riscv32-esp-elf/8.4.0/…/…/…/…/riscv32-esp-elf/bin/ld: /config/esphome/.esphome/build/esp32c3/src/esphome/components/api/api_connection.cpp:396: undefined reference to esphome::light::LightCall::set_transition_length(unsigned long)' /data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /config/esphome/.esphome/build/esp32c3/src/esphome/components/api/api_connection.cpp:398: undefined reference to esphome::light::LightCall::set_flash_length(unsigned long)’
    /data/cache/platformio/packages/toolchain-riscv32-esp/bin/…/lib/gcc/riscv32-esp-elf/8.4.0/…/…/…/…/riscv32-esp-elf/bin/ld: /config/esphome/.esphome/build/esp32c3/src/esphome/components/api/api_connection.cpp:400: undefined reference to esphome::light::LightCall::set_effect(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /config/esphome/.esphome/build/esp32c3/src/esphome/components/api/api_connection.cpp:401: undefined reference to esphome::light::LightCall::perform()’
    /data/cache/platformio/packages/toolchain-riscv32-esp/bin/…/lib/gcc/riscv32-esp-elf/8.4.0/…/…/…/…/riscv32-esp-elf/bin/ld: /data/esp32c3/.pioenvs/esp32c3/src/esphome/components/api/api_connection.o: in function esphome::api::APIConnection::send_light_state(esphome::light::LightState*)': /config/esphome/.esphome/build/esp32c3/src/esphome/components/api/api_connection.cpp:314: undefined reference to esphome::light::LightState::get_traits()’
    /data/cache/platformio/packages/toolchain-riscv32-esp/bin/…/lib/gcc/riscv32-esp-elf/8.4.0/…/…/…/…/riscv32-esp-elf/bin/ld: /config/esphome/.esphome/build/esp32c3/src/esphome/components/api/api_connection.cpp:329: undefined reference to esphome::light::LightState::supports_effects()' /data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /config/esphome/.esphome/build/esp32c3/src/esphome/components/api/api_connection.cpp:332: undefined reference to esphome::light::LightState::get_effect_nameabi:cxx11
    /data/cache/platformio/packages/toolchain-riscv32-esp/bin/…/lib/gcc/riscv32-esp-elf/8.4.0/…/…/…/…/riscv32-esp-elf/bin/ld: /data/esp32c3/.pioenvs/esp32c3/src/esphome/components/api/api_connection.o: in function std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()': /data/cache/platformio/packages/toolchain-riscv32-esp/riscv32-esp-elf/include/c++/8.4.0/bits/basic_string.h:657: undefined reference to esphome::light::LightState::get_traits()’
    /data/cache/platformio/packages/toolchain-riscv32-esp/bin/…/lib/gcc/riscv32-esp-elf/8.4.0/…/…/…/…/riscv32-esp-elf/bin/ld: /data/esp32c3/.pioenvs/esp32c3/src/esphome/components/api/api_connection.o: in function esphome::api::APIConnection::send_light_info(esphome::light::LightState*)': /config/esphome/.esphome/build/esp32c3/src/esphome/components/api/api_connection.cpp:351: undefined reference to esphome::light::LightState::supports_effects()’
    /data/cache/platformio/packages/toolchain-riscv32-esp/bin/…/lib/gcc/riscv32-esp-elf/8.4.0/…/…/…/…/riscv32-esp-elf/bin/ld: /config/esphome/.esphome/build/esp32c3/src/esphome/components/api/api_connection.cpp:354: undefined reference to esphome::light::LightState::get_effects() const' /data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /data/esp32c3/.pioenvs/esp32c3/src/esphome/core/controller.o: in function esphome::Controller::setup_controller(bool)‘:
    /config/esphome/.esphome/build/esp32c3/src/esphome/core/controller.cpp:23: undefined reference to esphome::light::LightState::add_new_remote_values_callback(std::function<void ()>&&)' /data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /data/esp32c3/.pioenvs/esp32c3/src/main.o: in function esphome::monochromatic::MonochromaticLightOutput::write_state(esphome::light::LightState*)’:
    /config/esphome/.esphome/build/esp32c3/src/esphome/components/monochromatic/monochromatic_light_output.h:20: undefined reference to esphome::light::LightState::current_values_as_brightness(float*)' /data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /config/esphome/.esphome/build/esp32c3/src/esphome/components/monochromatic/monochromatic_light_output.h:21: undefined reference to esphome::output::FloatOutput::set_level(float)’
    /data/cache/platformio/packages/toolchain-riscv32-esp/bin/…/lib/gcc/riscv32-esp-elf/8.4.0/…/…/…/…/riscv32-esp-elf/bin/ld: /data/esp32c3/.pioenvs/esp32c3/src/main.o: in function setup()': /config/esphome/.esphome/build/esp32c3/src/main.cpp:198: undefined reference to esphome::ledc::next_ledc_channel’
    /data/cache/platformio/packages/toolchain-riscv32-esp/bin/…/lib/gcc/riscv32-esp-elf/8.4.0/…/…/…/…/riscv32-esp-elf/bin/ld: /data/esp32c3/.pioenvs/esp32c3/src/main.o: in function std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()': /data/cache/platformio/packages/toolchain-riscv32-esp/riscv32-esp-elf/include/c++/8.4.0/bits/basic_string.h:657: undefined reference to esphome::ledc::next_ledc_channel’
    /data/cache/platformio/packages/toolchain-riscv32-esp/bin/…/lib/gcc/riscv32-esp-elf/8.4.0/…/…/…/…/riscv32-esp-elf/bin/ld: /data/esp32c3/.pioenvs/esp32c3/src/main.o: in function setup()': /config/esphome/.esphome/build/esp32c3/src/main.cpp:199: undefined reference to vtable for esphome::ledc::LEDCOutput’
    /data/cache/platformio/packages/toolchain-riscv32-esp/bin/…/lib/gcc/riscv32-esp-elf/8.4.0/…/…/…/…/riscv32-esp-elf/bin/ld: /config/esphome/.esphome/build/esp32c3/src/main.cpp:199: undefined reference to vtable for esphome::ledc::LEDCOutput' /data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /config/esphome/.esphome/build/esp32c3/src/main.cpp:200: undefined reference to vtable for esphome::ledc::LEDCOutput’
    /data/cache/platformio/packages/toolchain-riscv32-esp/bin/…/lib/gcc/riscv32-esp-elf/8.4.0/…/…/…/…/riscv32-esp-elf/bin/ld: /config/esphome/.esphome/build/esp32c3/src/main.cpp:200: undefined reference to vtable for esphome::ledc::LEDCOutput' /data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /config/esphome/.esphome/build/esp32c3/src/main.cpp:202: undefined reference to esphome::ledc::next_ledc_channel’
    /data/cache/platformio/packages/toolchain-riscv32-esp/bin/…/lib/gcc/riscv32-esp-elf/8.4.0/…/…/…/…/riscv32-esp-elf/bin/ld: /config/esphome/.esphome/build/esp32c3/src/main.cpp:203: undefined reference to esphome::output::FloatOutput::set_zero_means_zero(bool)' /data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /data/esp32c3/.pioenvs/esp32c3/src/main.o: in function .L0 ‘:
    /data/cache/platformio/packages/toolchain-riscv32-esp/riscv32-esp-elf/include/c++/8.4.0/bits/std_function.h:676: undefined reference to esphome::ledc::next_ledc_channel' /data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /data/esp32c3/.pioenvs/esp32c3/src/main.o: in function setup()’:
    /config/esphome/esp32c3.yaml:30: undefined reference to esphome::ledc::next_ledc_channel' /data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /config/esphome/esp32c3.yaml:31: undefined reference to esphome::output::FloatOutput::set_zero_means_zero(bool)’
    /data/cache/platformio/packages/toolchain-riscv32-esp/bin/…/lib/gcc/riscv32-esp-elf/8.4.0/…/…/…/…/riscv32-esp-elf/bin/ld: /config/esphome/esp32c3.yaml:33: undefined reference to esphome::light::LightState::LightState(esphome::light::LightOutput*)' /data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /config/esphome/esp32c3.yaml:57: undefined reference to esphome::light::LightState::set_restore_mode(esphome::light::LightRestoreMode)’
    /data/cache/platformio/packages/toolchain-riscv32-esp/bin/…/lib/gcc/riscv32-esp-elf/8.4.0/…/…/…/…/riscv32-esp-elf/bin/ld: /config/esphome/esp32c3.yaml:57: undefined reference to esphome::light::LightState::set_default_transition_length(unsigned long)' /data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /data/esp32c3/.pioenvs/esp32c3/src/main.o: in function esphome::ledc::LEDCOutput::LEDCOutput(esphome::InternalGPIOPin*)‘:
    /config/esphome/.esphome/build/esp32c3/src/esphome/components/ledc/ledc_output.h:18: undefined reference to esphome::light::LightState::set_flash_transition_length(unsigned long)' /data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /data/esp32c3/.pioenvs/esp32c3/src/main.o: in function setup()’:
    /config/esphome/esp32c3.yaml:57: undefined reference to esphome::light::LightState::set_gamma_correct(float)' /data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /data/esp32c3/.pioenvs/esp32c3/src/main.o: in function esphome::output::FloatOutput::FloatOutput()‘:
    /config/esphome/.esphome/build/esp32c3/src/esphome/components/output/float_output.h:31: undefined reference to esphome::light::LightState::add_effects(std::vector<esphome::light::LightEffect*, std::allocator<esphome::light::LightEffect*> > const&)' /data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /data/esp32c3/.pioenvs/esp32c3/src/main.o: in function esphome::ledc::LEDCOutput::set_frequency(float)’:
    /config/esphome/.esphome/build/esp32c3/src/esphome/components/ledc/ledc_output.h:21: undefined reference to esphome::light::LightState::LightState(esphome::light::LightOutput*)' /data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /data/esp32c3/.pioenvs/esp32c3/src/main.o: in function esphome::ledc::LEDCOutput::LEDCOutput(esphome::InternalGPIOPin*)‘:
    /config/esphome/.esphome/build/esp32c3/src/esphome/components/ledc/ledc_output.h:18: undefined reference to esphome::light::LightState::set_restore_mode(esphome::light::LightRestoreMode)' /data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /data/esp32c3/.pioenvs/esp32c3/src/main.o: in function setup()’:
    /config/esphome/esp32c3.yaml:83: undefined reference to esphome::light::LightState::set_default_transition_length(unsigned long)' /data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /data/esp32c3/.pioenvs/esp32c3/src/main.o: in function esphome::output::FloatOutput::FloatOutput()‘:
    /config/esphome/.esphome/build/esp32c3/src/esphome/components/output/float_output.h:31: undefined reference to esphome::light::LightState::set_flash_transition_length(unsigned long)' /data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /data/esp32c3/.pioenvs/esp32c3/src/main.o: in function esphome::ledc::LEDCOutput::LEDCOutput(esphome::InternalGPIOPin*)’:
    /config/esphome/.esphome/build/esp32c3/src/esphome/components/ledc/ledc_output.h:18: undefined reference to esphome::light::LightState::set_gamma_correct(float)' /data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /data/esp32c3/.pioenvs/esp32c3/src/main.o: in function esphome::ledc::LEDCOutput* esphome::Application::register_componentesphome::ledc::LEDCOutput(esphome::ledc::LEDCOutput*)‘:
    /config/esphome/.esphome/build/esp32c3/src/esphome/core/application.h:132: undefined reference to esphome::light::LightState::add_effects(std::vector<esphome::light::LightEffect*, std::allocator<esphome::light::LightEffect*> > const&)' /data/cache/platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld: /data/esp32c3/.pioenvs/esp32c3/src/main.o:(.rodata._ZTVN7esphome13monochromatic24MonochromaticLightOutputE[_ZTVN7esphome13monochromatic24MonochromaticLightOutputE]+0xc): undefined reference to esphome::light::LightOutput::create_default_transition()’
    collect2: error: ld returned 1 exit status
    *** [/data/esp32c3/.pioenvs/esp32c3/firmware.elf] Error 1
    ========================= [FAILED] Took 12.64 seconds =========================

Someone else with same issues ?

Thanks

Vincèn

I think only the “classic” ESP32 supports all esphome functions for now. All the newer versions like -C, -S, -H and probably the picow only work with a subset of functions/components. :pinching_hand:

Probably the situation will only improve over time and not very rapidly. :snail::dash:

I feel in the “same” rabbit hole and wired a ESP32C3 module to work as media player and when the hardware part was finished the show stopper actually was the upload of esphome as it didn’t work because of not compatible components :bowing_man: Completely forgot that this actually can happen as I only used esp82** and the “classic” esp32 for the last 5 years…

Actually the esphome docs state that support is limited:

Note:

Support for the ESP32-S2 and ESP32-C3 is still in development and there could be issues.

yeah unhappy it has been in early development stages since ages :frowning: I guess it needs to get all these functions/components updated for the latest ESP-IDF…

Looks like these Xiao ESP32C3 modules are going to take dust on shelves for quite a while yet :frowning:

While it looks “easy” to port functions from the “classic” esp32 to a esp32-c3 for example - it is not! :warning:

The device share names but virtually have nothing in common as they feature completely different processors :point_down:

  • The ESP32 features a (quite old) Tensilica Xtensa LX6 processor which as today has very over 7 years of active software development and is in a very mature state

  • The ESP32-C3 features a (quite new) RISC-V processor which has kind of nothing in common with the “classic” ESP32 beside both being 32-bit. It is around for about a year and the software support is still in active development.

What unifies them is that for both espressif is commitment to make them work with the esp-idf - still at this point only the “classic” esp32 benefits from years of development and improvements while the “newcomers” still have a long road ahead :railway_track:

Maybe “at least” use them as (the :pinching_hand: tiniest?) BLE Proxies in your home?

1 Like

Hi all,

Got my Xiao esp32c3 board working, kinda.
At first I got the board flashed and integrated into HA.
But after a power cycle of the board it stayed offline.
After a lot of trail and error I found out that if you disable logger it works.
Looks like there is still a bit of work todo on the full support of the board.
here’s my .yaml file which works:

esphome:
  name: garage-sensor
  friendly_name: Garage Sensor

esp32:
  board: seeed_xiao_esp32c3
  variant: esp32c3
  framework:
    type: arduino

# Enable Home Assistant API
api:
  encryption:
    key: "thisisasecret:)"

ota:
  password: "thisisasecret:)"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "thisisasecret:)"
    password: "thisisasecret:)"

captive_portal:

switch:
  - platform: gpio
    pin: 2
    name: "Garage poort open/dicht"

What method are you using to flash? I cant get anything to flash appropriately on this chip and have what looks like a bootloader issue “invalid header: 0xffffffffff” even when I literally copy and paste what you wrote lol. It flashes correctly from what I can tell in the flash tool but then just craps out.

I use the ESP Web Tools.
Br
Raymond

1 Like

Thank you so much! No idea why that worked but all the other flash methods did not, but it works via web tool and not via the desktop flasher.

I also can only flash from the ESP Web tools. No idea why. I bet flashing directly from where HA runs will work but it’s a bit hard to get to for my case. ESP Web makes it much easier.

I’ve managed to get it to work with these with 2023.4.0

esphome:
  name: seeed-xiao
  platformio_options:
    board_build.flash_mode: dio
    platform_packages:
    - toolchain-riscv32-esp # @8.4.0+2021r2-patch5

esp32:
  board: seeed_xiao_esp32c3
  variant: esp32c3
  framework:
    type: arduino

I tried to use a SGP30 module via i2C and it worked initially when I hand held the wires to test. Now I’ve just soldered it it now keeps getting i2c errors (scan returns none). Weird. I’m testing with another board to see if it’s something wrong of this Seeed Xiao.

mm… i just attached the SGP30 to an Atom Lite M5 and it works right away. There must be something wrong with Seeed Xiao support or something is broken when I tried to solder the wires…

I’ve observed the same thing as RayBe above; their provided yaml works, but when logger is enabled, then it is unable to connect to the network (or log anything even over USB, for that matter). This continues to be the case on 2023.7.1

Specifically, the issue seems to be that the logger is causing a bootloop. If I have one of these chips flashed with a logger enabled, I can watch it pop onto and off of the network every 10 seconds or so, never online long enough to actually register as such with esphome.

UPDATE: I was able to get logging working. I had to update the UART to use JTAG. Here’s the config that works for me:

esphome:
  name: your-name-here
  platformio_options:
    board_build.flash_mode: dio

esp32:
  board: seeed_xiao_esp32c3
  variant: esp32c3
  framework:
    type: esp-idf

# Enable logging
logger:
  hardware_uart: USB_SERIAL_JTAG
1 Like

I’ve just got myself a few of these but am having no success in getting any ESPHome code to run. I can install the .bin through ESPHome - Web by holding the Boot whilst pressing and releasing the Reset button. I get the Erasing and flashing complete messages but the device doesn’t join my network and when I look at the serial logs I get a whole load of “esp-idf” messages.

This is an extract from the code I’m currently using;

esphome:
  name: ${name}
  friendly_name: ${friendly_name}
  platformio_options:
    board_build.flash_mode: dio
    board_build.mcu: esp32c3

esp32:
  board: esp32-c3-devkitm-1 #seeed_xiao_esp32c3 # 
  variant: esp32c3
  framework:
    type: esp-idf

# Enable logging
logger:
  hardware_uart: USB_SERIAL_JTAG
  level: NONE

I’ve tried a few other variants but getting nowhere, has anyone got any pointers?

Chris

1 Like

To answer my own query and I hope this helps someone. I just made the one change and things burst into life! I’m pretty sure I already tried this combination but maybe not;

  hardware_uart: UART0 # Not USB_SERIAL_JTAG

is the line in question. Now to tinker!!!

1 Like