JTAG debugging hangs in Eclipse

newsettler_AI
Posts: 121
Joined: Wed Apr 05, 2017 12:49 pm

JTAG debugging hangs in Eclipse

Postby newsettler_AI » Wed Oct 23, 2019 4:19 pm

Hi, I'm trying to run debugging in Eclipse for my own project as described here:

https://docs.espressif.com/projects/esp ... er-eclipse

I'm using idf v3.3 (LTS) and OpenOCD v0.10.0-esp32-20191008

The problem: after start debug it hangs on start with status
Thread#1 (Running: Use Request)

Screenshot from 2019-10-23 08-39-06.png
Screenshot from 2019-10-23 08-39-06.png (191.3 KiB) Viewed 3274 times

I have tried to repeat similar steps with default idf examples (hello_world) and everything is ok in Eclipse, debugging works as expected.
But for my project it doesnt work...

Also for my project I've tried to run debugging from console and its seems work (but some warnings appear, maybe it can help to solve issue with Eclipse?)


OpenOCD log CONSOLE MODE:

Code: Select all

user@ubuntu:~/esp32/openocd-esp32$ bin/openocd -s share/openocd/scripts -f interface/jlink.cfg -f board/esp-wroom-32.cfg
Open On-Chip Debugger  v0.10.0-esp32-20191008 (2019-10-08-14:50)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
adapter speed: 5000 kHz
WARNING: boards/esp-wroom-32.cfg is deprecated, and may be removed in a future release.
Info : Configured 2 cores
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: type 'esp32' is missing virt2phys
Info : J-Link ARM V8 compiled Nov 28 2014 13:44:46
Info : Hardware version: 8.00
Info : VTarget = 3.306 V
Info : clock speed 5000 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : Target halted. CPU0: PC=0x400093C8 (active)
Info : Target halted. CPU1: PC=0x400076DD 
Info : Listening on port 3333 for gdb connections
Info : accepting 'gdb' connection on tcp/3333
Error: No symbols for FreeRTOS
Info : cpu0: Target halted, PC=0x400916EA, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 570 KB
Info : Flash mapping 1: 0xa0018 -> 0x400d0018, 607 KB
Info : cpu0: Target halted, PC=0x400916EA, debug_reason=00000001
Info : Auto-detected flash bank 'esp32.flash' size 4096 KB
Info : Using flash bank 'esp32.flash' size 4096 KB
Info : cpu0: Target halted, PC=0x400916EA, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 570 KB
Info : Flash mapping 1: 0xa0018 -> 0x400d0018, 607 KB
Info : Using flash bank 'esp32.irom' size 608 KB
Info : cpu0: Target halted, PC=0x400916EA, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 570 KB
Info : Flash mapping 1: 0xa0018 -> 0x400d0018, 607 KB
Info : Using flash bank 'esp32.drom' size 572 KB
Warn : negative reply, retrying
Warn : negative reply, retrying
Warn : acknowledgment received, but no packet pending
Warn : acknowledgment received, but no packet pending
undefined debug reason 7 - target needs reset
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : cpu0: Debug controller 0 was reset.
Info : cpu0: Core 0 was reset.
Info : cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32: Core 0 was reset.
Info : esp32: Debug controller 1 was reset.
Info : esp32: Core 1 was reset.
Info : Target halted. CPU0: PC=0x40000400 (active)
Info : Target halted. CPU1: PC=0x40000400
gdb log:

Code: Select all

user@ubuntu:~/esp32/projects/project$ xtensa-esp32-elf-gdb -x gdbinit build/project.elf
GNU gdb (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-build_pc-linux-gnu --target=xtensa-esp32-elf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from build/avocado.elf...done.
0x40009081 in ?? ()
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
cpu0: Debug controller 0 was reset.
cpu0: Core 0 was reset.
cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
esp32: Core 0 was reset.
esp32: Debug controller 1 was reset.
esp32: Core 1 was reset.
Target halted. CPU0: PC=0x40000400 (active)
Target halted. CPU1: PC=0x40000400 
Hardware assisted breakpoint 1 at 0x400dc0e4: file /home/user/esp32/projects/project/main/main.c, line 143.
rejected 'gdb' connection, no more connections allowed
^CTarget halted. CPU0: PC=0x400093C8 (active)
Target halted. CPU1: PC=0x400076DD 

Now with Eclpise.

OpenODC log ECLIPSE:

Code: Select all

ses@ubuntu:~/esp32/openocd-esp32$ bin/openocd -s share/openocd/scripts -f interface/jlink.cfg -f board/esp-wroom-32.cfg
Open On-Chip Debugger  v0.10.0-esp32-20191008 (2019-10-08-14:50)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
adapter speed: 5000 kHz
WARNING: boards/esp-wroom-32.cfg is deprecated, and may be removed in a future release.
Info : Configured 2 cores
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: type 'esp32' is missing virt2phys
Info : J-Link ARM V8 compiled Nov 28 2014 13:44:46
Info : Hardware version: 8.00
Info : VTarget = 3.306 V
Info : clock speed 5000 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : Target halted. CPU0: PC=0x400093E7 (active)
Info : Target halted. CPU1: PC=0x400076DD 
Info : Listening on port 3333 for gdb connections
Info : accepting 'gdb' connection on tcp/3333
Error: No symbols for FreeRTOS
Info : cpu0: Target halted, PC=0x400916EA, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 570 KB
Info : Flash mapping 1: 0xa0018 -> 0x400d0018, 607 KB
Info : cpu0: Target halted, PC=0x400916EA, debug_reason=00000001
Info : Auto-detected flash bank 'esp32.flash' size 4096 KB
Info : Using flash bank 'esp32.flash' size 4096 KB
Info : cpu0: Target halted, PC=0x400916EA, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 570 KB
Info : Flash mapping 1: 0xa0018 -> 0x400d0018, 607 KB
Info : Using flash bank 'esp32.irom' size 608 KB
Info : cpu0: Target halted, PC=0x400916EA, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 570 KB
Info : Flash mapping 1: 0xa0018 -> 0x400d0018, 607 KB
Info : Using flash bank 'esp32.drom' size 572 KB
Warn : negative reply, retrying
Warn : negative reply, retrying
Warn : acknowledgment received, but no packet pending
Warn : acknowledgment received, but no packet pending
undefined debug reason 7 - target needs reset
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : cpu0: Debug controller 0 was reset.
Info : cpu0: Core 0 was reset.
Info : cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32: Core 0 was reset.
Info : esp32: Debug controller 1 was reset.
Info : esp32: Core 1 was reset.
Info : Target halted. CPU0: PC=0x40000400 (active)
Info : Target halted. CPU1: PC=0x40000400
Please advice where to pay attention or what could be wrong

Who is online

Users browsing this forum: iParcelBox and 88 guests