[Solved] Recipes for debugging exceptions ...
Posted: Mon Sep 26, 2016 3:04 am
When we write programs and get something wrong, we see exceptions of the format:
Being new to this environment, I'm looking for recipes, hints and tips on how to diagnose such problems. What debugging technologies exist? At a minimum, I'm thinking that somewhere in this story we can generate a memory map of our compiled applications and somewhere in here there is the pointer at which the failure was detected (at a guess I'll imagine that "PC" means Program Counter).
... Later ... I made some progress. Modeling ESP32 on what we'd learned for ESP8266, I tried:
against my compiled application and, as hoped, it produced an assembly listing of the app. I could then take that listing and map that against the program counter shown in the exception ... and now I know which module within my code my exception occurred within. I think with some more practice, I might even be able to see how that relates to source statements.
Code: Select all
Guru Meditation Error of type IllegalInstruction occured on core 0. Exception was unhandled.
Register dump:
PC : 400f8806 PS : 00060130 A0 : 00000000 A1 : 3ffc9780
A2 : 00000000 A3 : 00000000 A4 : 00000000 A5 : 00000000
A6 : 00000000 A7 : 00000000 A8 : 800f8806 A9 : 3ffc9760
A10 : ffffffff A11 : 3f408600 A12 : 3ffc97a0 A13 : 3ffbddcc
A14 : 3ffbdde0 A15 : 00000000 SAR : 00000011 EXCCAUSE: 00000000
EXCVADDR: 00000000 LBEG : 400014fd LEND : 4000150d LCOUNT : fffffff8
Rebooting...
ets Jun 8 2016 00:22:57
... Later ... I made some progress. Modeling ESP32 on what we'd learned for ESP8266, I tried:
Code: Select all
xtensa-esp32-elf-objdump -x app-template.elf -d