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.
Once I set the flags in my pio.ini file I am unable to reflash the same project.
“-DARDUINO_USB_MODE=1”,
“-DARDUINO_USB_CDC_ON_BOOT=1”
I have to flash a different project that does not have the two flags from above. Is there a workaround or any clean way to leave these in and retain the ability to reflash the project?
I am pretty sure that you can flash a new sketch without these flags. However, the Serial object will then no longer output via the native USB port but via the UART pins. Therefore you will not see the serial output.
You can test it with a sketch that flashes an LED instead of Serial.println().
Thank you for the quick response!
The chart you linked is helpful but I am having trouble reading it. Is there a comb0 of the two values that will let me flash my device and retain usb debugging? I have never run into this before. It is only ever an issue with my Lilygo AMOLED board. I figure it has to do with the pins that go to the screen or something.