JTAG Debugging custom board
Posted: Wed Aug 02, 2017 10:00 pm
I'm trying to debug a custom board through JTAG (using Tiao Tumpa debugger). I'm able to do 4-line JTAG flash and debugging on the dev kit board which uses the ESP-WROOM-32 module. The custom board uses the same module and appears also to flash successfully. Both boards have the same openocd logs when flashing. Debugging on the dev kit goes fine. I'm using initial gdb commands as recommended of:
target remote :3333
mon reset halt
thb app_main
x $a1=0
c
Everything is the same until the continue command. For the dev kit, I get:
Continuing.
Target halted. PRO_CPU: PC=0x40080E10 (active) APP_CPU: PC=0xF8001080
[New Thread 1073413748]
[New Thread 1073441260]
[New Thread 1073413364]
Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 1073408876]
ipc_task (arg=0x0) at /home/rob/esp32-idf/esp-idf-v2.0-rc1/components/esp32/./ipc.c:45
45 {
If I look at the threads, I get:
(gdb) info threads
Id Target Id Frame
4 Thread 1073413364 (main) main_task (args=0x0)
at /home/rob/esp32-idf/esp-idf-v2.0-rc1/components/esp32/./cpu_start.c:300
3 Thread 1073441260 (Tmr Svc) prvTimerTask (pvParameters=0x0)
at /home/rob/esp32-idf/esp-idf-v2.0-rc1/components/freertos/./timers.c:427
2 Thread 1073413748 (IDLE) prvIdleTask (pvParameters=0x0)
at /home/rob/esp32-idf/esp-idf-v2.0-rc1/components/freertos/./tasks.c:3263
* 1 Thread 1073408876 (ipc0 : Running) ipc_task (arg=0x0)
at /home/rob/esp32-idf/esp-idf-v2.0-rc1/components/esp32/./ipc.c:45
I switch to thread 4, continue, and hit my breakpoint at app_main. Everything works great.
For the custom board, I get the Continuing, but the target never halts. I have to Ctrl-C to get a prompt.
Any clues why the custom board won't ever hit the breakpoint?
target remote :3333
mon reset halt
thb app_main
x $a1=0
c
Everything is the same until the continue command. For the dev kit, I get:
Continuing.
Target halted. PRO_CPU: PC=0x40080E10 (active) APP_CPU: PC=0xF8001080
[New Thread 1073413748]
[New Thread 1073441260]
[New Thread 1073413364]
Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 1073408876]
ipc_task (arg=0x0) at /home/rob/esp32-idf/esp-idf-v2.0-rc1/components/esp32/./ipc.c:45
45 {
If I look at the threads, I get:
(gdb) info threads
Id Target Id Frame
4 Thread 1073413364 (main) main_task (args=0x0)
at /home/rob/esp32-idf/esp-idf-v2.0-rc1/components/esp32/./cpu_start.c:300
3 Thread 1073441260 (Tmr Svc) prvTimerTask (pvParameters=0x0)
at /home/rob/esp32-idf/esp-idf-v2.0-rc1/components/freertos/./timers.c:427
2 Thread 1073413748 (IDLE) prvIdleTask (pvParameters=0x0)
at /home/rob/esp32-idf/esp-idf-v2.0-rc1/components/freertos/./tasks.c:3263
* 1 Thread 1073408876 (ipc0 : Running) ipc_task (arg=0x0)
at /home/rob/esp32-idf/esp-idf-v2.0-rc1/components/esp32/./ipc.c:45
I switch to thread 4, continue, and hit my breakpoint at app_main. Everything works great.
For the custom board, I get the Continuing, but the target never halts. I have to Ctrl-C to get a prompt.
Any clues why the custom board won't ever hit the breakpoint?