Interesting project presented over on the ESP32.com forum; an ESPCrashDecoder for Arduino IDE 2.x.
ESPCrashDecoder for Arduino IDE 2.x
The EspCrashDecoder is a standalone ESP exception decoder for use with the Arduino v2.x IDE.
The original EspExceptionDecoder relies on an API which is not currently provided by the Arduino v2.x IDE.
ESPCrashDecoder Readme.md in more detail
William
Hi.
Very interesting…
Have you tried it yourself? What is your feedback?
Regards,
Sara
Good Morning Sara,
Would you have sketch with Backtrace errors; I could try using “ESPCrashDecoder for Arduino IDE 2.x?” Tought about creating some errors is an example sketch; not sure best way to go about creating backtrace errors.
Regards,
William
Good Morning,
Tried followling code:
void setup() { Serial.begin(115200); // This will cause a crash. int *p = NULL; *p = 10; } void loop() { }
Exported compiled binary and placed in sketch folder. Copied the ESPCrashDecoder to the Crash.ino sketch folder. Double clicked the ESPCrashDecoder.bat file. Web page for pasting backtrace opened. Pasted backtrace in window for backtrace:
Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled. Core 1 register dump: PC : 0x400d13ce PS : 0x00060830 A0 : 0x800d2b82 A1 : 0x3ffc51c0 A2 : 0x00000000 A3 : 0x00000000 A4 : 0x00000014 A5 : 0x00000004 A6 : 0x3ffbd5ac A7 : 0x80000001 A8 : 0x00000000 A9 : 0x0000000a A10 : 0x3ffc1c60 A11 : 0x00000078 A12 : 0x0000e100 A13 : 0x00000003 A14 : 0x00000001 A15 : 0x00000001 SAR : 0x00000003 EXCCAUSE: 0x0000001d EXCVADDR: 0x00000000 LBEG : 0x40085e68 LEND : 0x40085e73 LCOUNT : 0xffffffff Backtrace: 0x400d13cb:0x3ffc51c0 0x400d2b7f:0x3ffc51f0
Exported Compiled Binary from Tools menu of Arduino IDE.
Backtrace generated ESPCrashDecoder.txt. Selected ESPCrashDecoder.out in Downloads folder. Blank backtrace html window. Size of ESPCrashDecode 0 KB. Left issue on ESPCrashDecoder Github issue page.
Must be doing somethink wrong; not sure if GDB has to be installed manually or it is part of the Arduino IDE (2.1.1). Unsure how GDB is used.
William
My apologies; user error, wrong board specified in ESPCrashDecoder.bat. Switched board compiling to ESP32 Dev Module, left .bat file set to ESP32. Works as advertized. Thank you!
0x400d1336: setup() in C:\Users\William\Documents\Arduino\libraries\Crash/Crash.ino at line 5
line 5: *p = 10;
0x400d1333: setup() in C:\Users\William\Documents\Arduino\libraries\Crash/Crash.ino at line 5
line 5: *p = 10;
0x400d277f: loopTask(void*) in C:\Users\William\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.11\cores\esp32\main.cpp at line 42
line 42: setup();
First board used to compile was an ESP32 Pico D4; with .bat file set to ESP32.
William
Good Morning,
ESPCrashDecoder; ESP32 Core 2.0.11, getting ESP32 Pico D4 to work…
Link to issue page for ESPCrashDecoder
William
Good Afternoon,
ESP Crash Decoder for Arduino IDE 2.x.x; true plug and play; after sraight forward installation. Developer’s Readme.md takes you step by step, easy install. Using “esp-exception-decoder” in the Arduino IDE requires lastest Arduino IDE nightly build. Accessing the tool press Control, Shift p; pop-up shows command paletter for Arduino IDE. Follow the author’s readme for more detailed instructions.
Once an exception occurs; copy the exception, press control, shift,p, paste into Serial montor, command terminal. “esp-exception-decoder” will decode the exception! Truely a joy to use; very easy to use!
dankeboy36 / esp-exception-decoder
William