Using esp32c3 SBC with CDC enabled on esphome

Please excuse me if I have posted this in the wrong category as Home Assistant is very new to me.

I have installed an older esp32 SBC without any problem using the esphome builder , but I wanted to use the newer esp32C3 due to better performance on batteries .

The Problem -
I could upload the base config but the esp failed to enable the config. After much head scratching I tried to upload a test config using the Arduino IDE - this did work but I had to enable CDC on boot.

After a lot of googling I came up with this for esphome -

I solved this problem, just add a definition in CMakeLists.txt ,then it will work
add_definitions
-DARDUINO_USB_MODE
-DARDUINO_USB_CDC_ON_BOOT

the only problem I have is that I have no idea where the "CMakeLists.txt" is

can you help ???

My system is installed on a Rasberry pi 4

  • Installation methodHome Assistant OS
  • Core2026.5.1
  • Supervisor2026.04.2
  • Operating System17.3
  • Frontend20260429.3

Thanks All

Show the yaml you are using, and what board you are using. You do not need to use CDC with ESPHome on a C3, the logger will either be to USB_SERIAL_JTAG (the default for C3) or UART0 if your board has a separate USB-serial interface chip (most don't.)

Thanks clydebarrow for your reply

To expand my explanation -
The serial port on the C3 reports as USB_SERIAL_JTAG

I cannot install the initial base config using a esp32c3 chip and using ESPhome Web .The base config uploads ok but does not run the config , so the when I try to install my WiFi name/password it fails. I have used both, the usb port on the pc and the usb port on the Rasberry pi 4 (running Home Assistant OS).

I have installed a esp32 WROOM 32D using the same serial port with no problems.

I have used the same C3 chip in an Arduino IDE and got the same result (i.e. uploads the config without errors, but then will not run . However after taking some advice I enabled "USB CDC on boot" in the Arduino tool menu and successfully ran a WiFi test script.

So It seems that the C3 chip is not faulty in any way.

Any Help would be most appreciated

Alan