After I connect a SRST to CHIP_UP, actually I'm able to setup a working debug flow, which means 'b'/'c'/'p' commands all working as expected...but I need to type 'monitor reset' in gdb after the gdb session is established.
Now I'm facing a new problem, my test application run into a core dump error, and keep rebooting, so gdb side cannot working as expect to trap any exception.
Minicom output like below:
Code: Select all
ets Jun 8 2016 00:22:57
rst:0x3 (SW_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3ffc0008,len:0
load:0x3ffc0008,len:1964
load:0x40078000,len:3668
load:0x40080000,len:260
entry 0x40080034
I (1370) heap_alloc_caps: Initializing. RAM available for dynamic allocation:
I (1371) heap_alloc_caps: At 3FFC141C len 0001EBE4 (122 KiB): DRAM
I (1402) heap_alloc_caps: At 3FFE8000 len 00018000 (96 KiB): D/IRAM
I (1466) heap_alloc_caps: At 4009B920 len 000046E0 (17 KiB): IRAM
I (1528) cpu_start: Pro cpu up.
I (1563) cpu_start: Single core mode
I (1603) cpu_start: Pro cpu start user code
I (2492) phy: phy_version: 258, Nov 29 2016, 15:51:07, 0, 0
I (3604) cpu_start: Starting scheduler on PRO CPU.
tcpip_task_hdlxxx : 3ffc4f38, prio:18,stack:2048
I (3617) wifi: frc2_timer_task_hdl:3ffc69cc, prio:22, stack:2048
I (3617) wifi: pp_task_hdl : 3ffc9218, prio:23, stack:8192
I (3617) mqtt: Setting WiFi configuration SSID cjzc-wifi...
I (3627) wifi: mode : sta (24:0a:c4:04:04:e4)
mg_connect(www.xxxx.com:1883) OK.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Register dump:
PC : 0x40104746 PS : 0x00060430 A0 : 0x00000000 A1 : 0x3ffcaae0
A2 : 0x00000000 A3 : 0x00000000 A4 : 0x00000000 A5 : 0x00000000
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x80104746 A9 : 0x3ffcaa90
A10 : 0x00000025 A11 : 0x3f406e60 A12 : 0x3f406e30 A13 : 0x00000000
A14 : 0x00000000 A15 : 0x00000004 SAR : 0x00000012 EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffffa
Backtrace: 0x40104746:0x3ffcaae0 0x00000000:0x3ffcab20
Rebooting...
ets Jun 8 2016 00:22:57
rst:0x3 (SW_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3ffc0008,len:0
load:0x3ffc0008,len:1964
load:0x40078000,len:3668
load:0x40080000,len:260
entry 0x40080034
I (1370) heap_alloc_caps: Initializing. RAM available for dynamic allocation:
I (1371) heap_alloc_caps: At 3FFC141C len 0001EBE4 (122 KiB): DRAM
I (1402) heap_alloc_caps: At 3FFE8000 len 00018000 (96 KiB): D/IRAM
I (1466) heap_alloc_caps: At 4009B920 len 000046E0 (17 KiB): IRAM
I (1528) cpu_start: Pro cpu up.
I (1563) cpu_start: Single core mode
I (1603) cpu_start: Pro cpu start user code
I (2378) phy: phy_version: 258, Nov 29 2016, 15:51:07, 0, 0
I (3454) cpu_start: Starting scheduler on PRO CPU.
tcpip_task_hdlxxx : 3ffc4f38, prio:18,stack:2048
I (3467) wifi: frc2_timer_task_hdl:3ffc69cc, prio:22, stack:2048
I (3467) wifi: pp_task_hdl : 3ffc9218, prio:23, stack:8192
I (3467) mqtt: Setting WiFi configuration SSID cjzc-wifi...
I (3477) wifi: mode : sta (24:0a:c4:04:04:e4)
mg_connect(www.xxxx.com:1883) OK.
Guru Meditation Error of type IllegalInstruction occurred on core 0. Exception was unhandled.
Register dump:
PC : 0x40104746 PS : 0x00060430 A0 : 0x00000000 A1 : 0x3ffcaae0
A2 : 0x00000000 A3 : 0x00000000 A4 : 0x00000000 A5 : 0x00000000
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x80104746 A9 : 0x3ffcaa90
A10 : 0x00000025 A11 : 0x3f406e60 A12 : 0x3f406e30 A13 : 0x00000000
A14 : 0x00000000 A15 : 0x00000004 SAR : 0x00000012 EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffffa
Backtrace: 0x40104746:0x3ffcaae0 0x00000000:0x3ffcab20
Rebooting...
And openocd side, it is keep printing reset messages like below:
Code: Select all
Info : esp32.cpu0: Core was reset (pwrstat=0x1F, after clear 0x1F).
Info : esp32.cpu0: Core was reset (pwrstat=0x1F, after clear 0x1F).
Info : esp32.cpu0: Core was reset (pwrstat=0x1F, after clear 0x1F).
Info : esp32.cpu0: Core was reset (pwrstat=0x1F, after clear 0x1F).
Info : esp32.cpu0: Debug controller was reset (pwrstat=0x4F, after clear 0x0F).
Info : esp32.cpu0: Core was reset (pwrstat=0x1F, after clear 0x1F).
Info : esp32.cpu0: Core was reset (pwrstat=0x1F, after clear 0x1F).
Info : esp32.cpu0: Core was reset (pwrstat=0x1F, after clear 0x1F).
Info : esp32.cpu0: Core was reset (pwrstat=0x1F, after clear 0x1F).
Info : esp32.cpu0: Core was reset (pwrstat=0x1F, after clear 0x1F).
Info : esp32.cpu0: Debug controller was reset (pwrstat=0x4F, after clear 0x0F).
Info : esp32.cpu0: Debug controller was reset (pwrstat=0x4F, after clear 0x0F).
Info : esp32.cpu0: Core was reset (pwrstat=0x1F, after clear 0x1F).
Info : esp32.cpu0: Core was reset (pwrstat=0x1F, after clear 0x1F).
Info : esp32.cpu0: Core was reset (pwrstat=0x1F, after clear 0x1F).
Info : esp32.cpu0: Core was reset (pwrstat=0x1F, after clear 0x1F).
Info : esp32.cpu0: Core was reset (pwrstat=0x1F, after clear 0x1F).
Info : esp32.cpu0: Core was reset (pwrstat=0x1F, after clear 0x1F).
What is the right approach to debug core dump issues like this?