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
ESP32-S3 Not seeing stack trace in Arduino IDE Serial Monitor
-
- Posts: 25
- Joined: Mon Apr 05, 2021 4:03 am
-
- Posts: 25
- Joined: Mon Apr 05, 2021 4:03 am
Re: ESP32-S3 Not seeing stack trace in Arduino IDE Serial Monitor
Seems to be that the USB drivers stops upon a crash, and the traceback goes to UART0 instead of the USB CDC serial port.
The pins are like gpio pins that need a driver program to work. Micropython has a driver so it appears like there is USB hardware. Any pointers on where to find this?
I have the JTAG pins available on my custom board using GPIO 39, 40, 41, 42; However, I am not finding a compatible board definition that works with Platform.IO. I am temporarily using the Adafruit Feather ESP32 S3 No PSram board definition and it appears not to be compatible with Platform.IO.
-Frank
The pins are like gpio pins that need a driver program to work. Micropython has a driver so it appears like there is USB hardware. Any pointers on where to find this?
I have the JTAG pins available on my custom board using GPIO 39, 40, 41, 42; However, I am not finding a compatible board definition that works with Platform.IO. I am temporarily using the Adafruit Feather ESP32 S3 No PSram board definition and it appears not to be compatible with Platform.IO.
-Frank
Who is online
Users browsing this forum: No registered users and 79 guests