However, with esp32c3 it seems impossible as the Monitor crashed itself upon register dump printing.
For example, when my esp32c3 crashes it prints the following to serial port:
Code: Select all
abort() was called at PC 0x42125df9 on core 0
Core 0 register dump:
MEPC : 0x42024d3e RA : 0x40389740 SP : 0x3fca5200 GP : 0x3fc92400
TP : 0x3fc3f8d8 T0 : 0x37363534 T1 : 0x7271706f T2 : 0x33323130
S0/FP : 0x00000004 S1 : 0x3fca5264 A0 : 0x3fca522c A1 : 0x3fca5262
A2 : 0x00000000 A3 : 0x3fca5259 A4 : 0x00000001 A5 : 0x3fc9d000
A6 : 0x7a797877 A7 : 0x76757473 S2 : 0x00002000 S3 : 0x3fcd46e0
S4 : 0x3fca4134 S5 : 0x3fcc06e0 S6 : 0x000640fa S7 : 0x00000078
S8 : 0x00014000 S9 : 0x00000258 S10 : 0x6ccc958d S11 : 0x6ccc958d
T3 : 0x6e6d6c6b T4 : 0x6a696867 T5 : 0x66656463 T6 : 0x62613938
MSTATUS : 0x00001881 MTVEC : 0x40380001 MCAUSE : 0x00000007 MTVAL : 0x00000000
MHARTID : 0x00000000
Stack memory:
3fca5200: 0x00000000 0x00000000 0x3fca5260 0x4039052e 0x00000000 0x00000000 0x3fca078c 0x3fc975c8
3fca5220: 0x3fca5264 0x3fc975e4 0x3fca5260 0x726f6261 0x20292874 0x20736177 0x6c6c6163 0x61206465
3fca5240: 0x43502074 0x34783020 0x35323132 0x20396664 0x63206e6f 0x2065726f 0x00000030 0x40380000
Code: Select all
abort() was called at PC 0x42125df9 on core 0
0x42125df9: __cxxabiv1::__terminate(void (*)()) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/riscv32-esp-elf/src/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:47
Stack dump detected
Core 0 register dump:
MEPC : 0x42024d3e RA : 0x40389740 SP : 0x3fca52c0 GP : 0x3fc92400
0x42024d3e: panic_abort at C:/esp-idf/components/esp_system/panic.c:390
0x40389740: __ubsan_include at C:/esp-idf/components/esp_system/ubsan.c:294
TP : 0x3fc3f998 T0 : 0x37363534 T1 : 0x7271706f T2 : 0x33323130
S0/FP : 0x00000004 S1 : 0x3fca5324 A0 : 0x3fca52ec A1 : 0x3fca5322
A2 : 0x00000000 A3 : 0x3fca5319 A4 : 0x00000001 A5 : 0x3fc9d000
A6 : 0x7a797877 A7 : 0x76757473 S2 : 0x00002000 S3 : 0x3fcd46e0
S4 : 0x3fca41f8 S5 : 0x3fcc06e0 S6 : 0x0005c4f1 S7 : 0x00000033
S8 : 0x00014000 S9 : 0x00000258 S10 : 0x1087c176 S11 : 0x1087c176
T3 : 0x6e6d6c6b T4 : 0x6a696867 T5 : 0x66656463 T6 : 0x62613938
MSTATUS : 0x00001881 MTVEC : 0x40380001 MCAUSE : 0x00000007 MTVAL : 0x00000000
0x40380001: _vector_table at ??:?
MHARTID : 0x00000000