ESP32-S3 Not seeing stack trace in Arduino IDE Serial Monitor
Posted: Sun Jul 24, 2022 6:01 pm
Hi Everyone, I need tips, help, and suggestions on how to see the stack trace in the Serial Monitor after a crash. I run this sketch:
void setup() {
Serial.begin(115200);
Serial.setDebugOutput(true);
long time = millis();
while (!Serial && ( millis() < time + 5000) ); // wait up to 5 seconds for Arduino Serial Monitor
Serial.println("Hoober research");
Serial.println("Hi");
int i = 0;
Serial.println( 100/i );
Serial.print("done");
}
void loop() {
// put your main code here, to run repeatedly:
}
Serial Monitor displays "Hi", crashes on the divide-by-zero exception, does NOT print the stack trace, and then restarts. I see "Hi" printed after each crash, but no stack trace.
My Arduino IDE settings are:
USB mode USB-OTG
USB CDC enabled
Firmware MSC disabled
DFU on boot: disabled
My board has the ESP32 connected over D- D+ to the USB port directly. I'm thinking maybe the crash takes down the USB connection?
I need tips, help, and suggestions on how to see the stack trace in the Serial Monitor
Thanks!
-Frank
void setup() {
Serial.begin(115200);
Serial.setDebugOutput(true);
long time = millis();
while (!Serial && ( millis() < time + 5000) ); // wait up to 5 seconds for Arduino Serial Monitor
Serial.println("Hoober research");
Serial.println("Hi");
int i = 0;
Serial.println( 100/i );
Serial.print("done");
}
void loop() {
// put your main code here, to run repeatedly:
}
Serial Monitor displays "Hi", crashes on the divide-by-zero exception, does NOT print the stack trace, and then restarts. I see "Hi" printed after each crash, but no stack trace.
My Arduino IDE settings are:
USB mode USB-OTG
USB CDC enabled
Firmware MSC disabled
DFU on boot: disabled
My board has the ESP32 connected over D- D+ to the USB port directly. I'm thinking maybe the crash takes down the USB connection?
I need tips, help, and suggestions on how to see the stack trace in the Serial Monitor
Thanks!
-Frank