Chat freely about anything...

User avatar
By rith87
#57974 I've successfully adapted some of the arduino code to print a call stack when my ESP (using non-OS SDK and rboot) crashes. First, we get the stack pointer using

Code: Select allregister uint32_t sp asm("a1");


Then we print out a whole bunch of frames:
Code: Select all[15634045]: ERR: 3ffffdb0:  00000002 00000000 40234080 00000000 
[15645658]: ERR: 3ffffdc0:  00000000 00000000 00000000 3ffedb40 
[15645667]: ERR: 3ffffdd0:  4024afb0 40234080 00000000 00000000 
[15657865]: ERR: 3ffffde0:  00000000 00000000 00000000 4020241e 
[15663679]: ERR: 3ffffdf0:  00000002 00000000 40234080 00000000 
[15672391]: ERR: 3ffffe00:  00000000 00000000 00000000 401003b7 
[15681112]: ERR: 3ffffe10:  40100398 3fffc100 00000001 00000000 
[15689828]: ERR: 3ffffe20:  00000000 40234080 3ffedb40 00000014 
[15697972]: ERR: 3ffffe30:  400005e1 00f05c98 3fff2a74 401052b0 
[15702619]: ERR: 3ffffe40:  40234080 00000030 00000010 7fffffff 
[15712504]: ERR: 3ffffe50:  4023405e 000000e0 000000e0 00000001 
[15720646]: ERR: 3ffffe60:  0000000a 00000014 000000f0 0000000a 
[15728789]: ERR: 3ffffe70:  0000fc00 3ffeee88 00000034 00000002 
[15735186]: ERR: 3ffffe80:  3fff4b68 00000001 3fff3cf0 00000000 
[15739834]: ERR: 3ffffe90:  4000050c 3fffc278 40105474 3fffc200 
[15749140]: ERR: 3ffffea0:  00000022 00000000 4022bdc2 3fff47b0 
[15756121]: ERR: 3ffffeb0:  40000f68 00000030 00000010 ffffffff 
[15760763]: ERR: 3ffffec0:  40000f58 00000000 00000020 00000000 
[15768913]: ERR: 3ffffed0:  3fff4f38 3ffeb31c 00000028 3fffbfe8 
[15775890]: ERR: 3ffffee0:  00000148 00000006 3fff1580 3fffdab0 
[15782875]: ERR: 3ffffef0:  00000000 3fffdc80 3fff4bd0 00000030 
[15789854]: ERR: 3fffff00:  00000184 3fff4c90 4025a058 402345a1 
[15797419]: ERR: 3fffff10:  00000002 3fff4798 00000042 00000001 
[15801475]: ERR: 3fffff20:  00006208 005e0001 402276a4 3fff1a00 
[15808462]: ERR: 3fffff30:  00000000 3fff4ca0 0000001c 402276bd 
[15813687]: ERR: 3fffff40:  00000000 40232ce0 3fffff80 3fff4b68 
[15824183]: ERR: 3fffff50:  0000000a 00000068 3fff31d8 4023405e 
[15830581]: ERR: 3fffff60:  00000002 3fff4b68 3ffeee88 40232d9f 
[15835807]: ERR: 3fffff70:  3fff4ca0 00000014 fc000000 3fff4ca0 
[15842206]: ERR: 3fffff80:  3fff4b68 3fffdc80 3fff4bd8 3fffdc80 
[15849778]: ERR: 3fffff90:  40206403 3fff4ca0 00000000 3fffdab0 
[15858524]: ERR: 3fffffa0:  40000f49 3fffdab0 3fffdab0 40000f49 
[15867860]: ERR: <<<stack<<<


I can match the frames that are in the form 402* and 401* to those in irom0.text and .text respectively but they don't seem to make much sense. Do I have a stack overflow? Or am I missing something?

I guess specifically, how does https://github.com/me-no-dev get such a beautiful call stack?