This is only intended for the STM32 Arduino core.
If you want
That translates to adding
build_flags =
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1
to the platformio.ini
, as previously discussed in e.g. ESP32-C3 SHA-256 comparison failed and no start - #2 by maxgerhardt.