ESP32-C3 Arduino USB defines
build_flags =
-std=gnu++2a
; -D ARDUINO_USB_MODE=1
; -D ARDUINO_HW_CDC_ON_BOOT=1
; -D ARDUINO_USB_CDC_ON_BOOT=1
; -D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC
; -D USBCON
I had this stuff set in my platformio.ini for the ESP32-C3/Arduino on a super-mini-dev-board and learned a couple things.
- If the USB serial port is not open to a terminal, the ESP seems to be really sluggish.
- If the USB is not connected at all, and the board is powered via the 5V pin, the board doesn't work at all.
By remarking all those defines out, the problems went away. I'd have to turn them back on to see my serial logging again. I have another project using the same board, but powered via the 3V3 pin. I didn't notice any problems there. That is why this problem took me by surprise.
Posted Oct 6, 2024, 3:57 AM UTC
52