I have an Espressif esp32-c3-devkitm1. I wanted to add it to esphome running in Docker. I tried all sorts of different ways to get it recognized without success. I finally got it work by connecting it to the box running ubuntu and the Docker image. In the add device process there’s an option to use the host on which esphome is running. It didn’t work right off. I had to change the compose file to allow it to find the esp32-c3. This is my compose file:
That did the trick. I understand that privileged: true is a security risk so I’m going to turn it off now that I can connect to the esp32-c3 via wifi.
One other problem I had was that the device was in a boot loop. Over on the Discord channel, rradar gave me a fix for that. This is the pertinent part of the config.yaml:
I’m almost certain privileged mode is specific to Docker, but I’m far from a Docker expert. It appears to expose more of the underlying OS to the Docker container, something the wouldn’t be necessary running directly on the OS.
I could (somehow) not flash it via the windows flasher (exe) or the Linux (via docker). The only way was via the web flasher at https://web.esphome.io/
If anyone is having a problem with WeAct Studio ESP32C3 Core Board here is what i did to fix uploader getting stuck at “Running stub…”
I had to edit ./lib/python3.9/site-packages/esphome/__main__.py file, arround line 243 it look like this:
I had to add --no-stub option after esptool.py, like this:
cmd = [
"esptool.py",
"--no-stub", # Added this line
"--before",
"default_reset",
"--after",
"hard_reset",
"--baud",
After this the uploader works and esphome run on that board.
Remember to remove this paramter after you upload esphome the first time on that board, next uploads can be done using Wifi, This option is safe to keep for other boards but it make the uploading slower, and it’s best to use the “Stub” when the board doesn’t have a problem running it, It’s just a new bootloader to flash the image, if not used esptool will use original bootloader found on the board
Might save someone same time, cause this show up first when searching for this problem
UPDATE: FIXED! Thanks to user damex from Discord, it’s working now. The key problem is that you need to delay the start of BT stack until wifi is connected.
I seemed to really struggle with so many alternative variants being proposed for config necessary to get going with C3. So I just want to confirm that this minimal config works perfectly for ESP32 C3 Super Mini
i can flash the Tasmota32C3_factory.bin and it works. But haven’t got that to work with ESPHome…
Whenever the flash is done the board is just dead. Not even Bootloader shows up in Serial Console.
Hello again. I’m trying to compile for an Seed Studio XIAO ESP32C3. It always crashes during compiling in ESPhome on Home Assistant installed as HAOS on dedicated Rasperry Pi 3 with 1GB Ram.
INFO ESPHome 2024.2.2
INFO Reading configuration /config/esphome/esphome-web-0669cc.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing esp32-c3 (board: seeed_xiao_esp32c3; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
Removing unused dependencies...
Library Manager: Installing esphome/AsyncTCP-esphome @ 2.0.1
INFO Installing esphome/AsyncTCP-esphome @ 2.0.1
Unpacking [####################################] 100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Installing esphome/ESPAsyncWebServer-esphome @ 3.1.0
INFO Installing esphome/ESPAsyncWebServer-esphome @ 3.1.0
Unpacking [####################################] 100%
Library Manager: [email protected] has been installed!
INFO [email protected] has been installed!
Library Manager: Resolving dependencies...
INFO Resolving dependencies...
HARDWARE: ESP32C3 160MHz, 320KB RAM, 4MB Flash
- toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
Dependency Graph
|-- AsyncTCP-esphome @ 2.0.1
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.1.0
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- noise-c @ 0.1.4
Compiling .pioenvs/esp32-c3/src/esphome/components/api/api_connection.cpp.o
Compiling .pioenvs/esp32-c3/src/esphome/components/api/api_frame_helper.cpp.o
Compiling .pioenvs/esp32-c3/src/esphome/components/api/api_pb2.cpp.o
riscv32-esp-elf-g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
*** [.pioenvs/esp32-c3/src/esphome/components/api/api_pb2.cpp.o] Error 1
========================= [FAILED] Took 60.98 seconds =========================
Perhaps first two options under “esphome” are unnecesarry… (i didn’t test it). But f_cpu was “the one”, since without it i’ve got an error from esp’s uart: “cpu runs at 240MHz, which si unsupported by esp” (something in this style).