Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ESP32-C3 USB console #6871

Answered by Zambiorix
Zambiorix asked this question in Q&A
Discussion options

Hi,

I have a custom development board with a ESP32-C3 and a USB connector directly connected to pins 18 & 19.
The default UART pins are used for another purpose.

I have a VSCode / PlatformIO / Arduino project.

Uploading works fine.

But how do I get the console output?

 Serial.begin(460800); 
 Serial.println("hello world");

Doesn't return anything ...

Thanks

You must be logged in to vote

For those with a esp32-c3-devkitm-1 board, or with a custom board, this does the trick:

board = esp32-c3-devkitm-1
monitor_speed = 460800
build_flags = 
	-D ARDUINO_USB_MODE=1
	-D ARDUINO_USB_CDC_ON_BOOT=1

Replies: 2 comments 8 replies

Comment options

You need to enable CDC On Boot for Serial to be mapped to the USB port

You must be logged in to vote
4 replies
Comment options

Thank you,

And how exactly do I do that on my VSCode / PlatformIO / Arduino project?
I have tried many variations of setting build flags in my platformio.ini file, but nothing seems to work.

Comment options

@Jason2866 do you know what flag needs to be added to PIO?

Comment options

This platformio boards.json should work https://github.com/platformio/platform-espressif32/blob/develop/boards/adafruit_qtpy_esp32c3.json since it is a board which uses CDC too

Comment options

Thank you

Comment options

For those with a esp32-c3-devkitm-1 board, or with a custom board, this does the trick:

board = esp32-c3-devkitm-1
monitor_speed = 460800
build_flags = 
	-D ARDUINO_USB_MODE=1
	-D ARDUINO_USB_CDC_ON_BOOT=1
You must be logged in to vote
4 replies
Comment options

This worked a treat with ESP32-C3 Super Mini just arrived from AliExpress. @Zambiorix

Comment options

Fix confirmed for ESP32-C3 Super Mini from Aliexpress ✔️

Comment options

Same here. Bang!

Comment options

Worked for ESP32-C3-Zero-M by Waveshare 25532. THANK YOU!!!

Answer selected by Zambiorix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /