ESP32-C3 framework arduino Serial.print USB

Hello,
I can’t find how to use USB to send messages (Serial.print () → framework arduino).
I read that with “menuconfig” you had to add:
CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG

I also read that “menuconfig” was only accessible with the ESP-idf framework.

Is there a solution to send by USB with the arduino framework?

It works in arduino V2 IDE, but I prefer to use platformIO.

Thank you for your answers.

Whether the Arduino-ESP32 framework uses hardware UART or USB-CDC as Serial depends on the value of the macros

So ARDUINO_USB_MODE can either be 0 or 1 (for either hardware USB-CDC or TinyUSB) but ARDUINO_USB_CDC_ON_BOOT must be 1.

Some board = ... selections preselect the value for you,

while others do not.

So as a first try, add

board_flags =
   -DARDUINO_USB_CDC_ON_BOOT=1

in the platformio.ini and reupload the firmware.

It works, thanks.
Quick, clear, explained, effective response.
Thanks.