Open def1149 opened 7 months ago
@def1149 - Adafruit Feather ESP32-S2
uses Native USB CDC
to print using the Serial
object from Arduino.
It has no UART<->USB chip, therefore its USB port is directly connected to the S2 USB pins.
Indeed, Serial.println("\nThis Prints !!??")
works because USBCDC::begin()
is called in the Arduino Initialization, before the sketch starts in app_main()
.
I think that there is a reason for that, maybe related to being able to print Debug messages before the Sketch starts, if necessary.
@me-no-dev - The call to Serial.begin()
in main.cpp->void app_main()
started with #5422 followed by #5466 and then finally in #6341
In #5422 there is the commit d425a3fd5f94ace0e8c19d1174e5a54f4d0124c9 that says "USB CDC should also be started in main". Is it still valid? Do you remember the reason for that?
@SuGlider sorry, I did not understand this is USB. It would then make sense that it's ON
Board
Adafruit Feather ESP32-S2
Device Description
N/A
Hardware Configuration
N/A
Version
latest master (checkout manually)
IDE Name
Arduino IDE 2.3.2
Operating System
Windows 10
Flash frequency
80 Mhz
PSRAM enabled
yes
Upload speed
921600
Description
Serial.print() works WITHOUT a Serial.open()
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide