Debugging ESP32 with XDS110

AdityaS09
Posts: 2
Joined: Mon Nov 02, 2020 6:16 am

Debugging ESP32 with XDS110

Postby AdityaS09 » Fri Nov 06, 2020 11:42 am

Hello

I am trying to make use XDS110 as debugger with ESP32. I am able to connect XDS110 with esp32 but when I start the debugging session I get "Error: No symbols for FreeRTOS" and "Error: cpu0: Failed to write breakpoint instruction (-4)!". The debugger start the but fails to put the breakpoint at the app_main.

My XDS110 config file looks as follows:

interface xds110
adapter_khz 2500
transport select jtag

gdbinit file is as follows:

target remote :3333
set remote hardware-watchpoint-limit 2
mon reset halt
flushregs
thb app_main
c

Running the openOCD command with following the parameters

>>openocd -f interface/xds110.cfg -f target/esp32.cfg -d2

Open On-Chip Debugger v0.10.0-esp32-20191114 (2019-11-14-14:19)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
adapter speed: 2500 kHz
jtag
Warn : Transport "jtag" was already selected
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 : XDS110: connected
Info : XDS110: firmware version = 3.0.0.12
Info : XDS110: hardware version = 0x0027
Info : XDS110: connected to target via JTAG
Info : XDS110: TCK set to 2500 kHz
Info : clock speed 2500 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=0xC0000400 (active)
Info : Target halted. CPU1: PC=0x00000400
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=0xC00916EA, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 22 KB
Info : Flash mapping 1: 0x20020 -> 0xc00d0020, 75 KB
Info : cpu0: Target halted, PC=0xC00916EA, 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=0xC00916EA, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 22 KB
Info : Flash mapping 1: 0x20020 -> 0xc00d0020, 75 KB
Info : Using flash bank 'esp32.irom' size 0 KB
Info : cpu0: Target halted, PC=0xC00916EA, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 22 KB
Info : Flash mapping 1: 0x20020 -> 0xc00d0020, 75 KB
Info : Using flash bank 'esp32.drom' size 24 KB
Warn : negative reply, retrying
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=0xD00000CF, 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=0xC0000400 (active)
Info : Target halted. CPU1: PC=0x00000400
Error: cpu0: Failed to write breakpoint instruction (-4)!
Error: cpu0: Failed to add SW breakpoint!
Error: can't add breakpoint: unknown reason

Can anyone tell what am I doing wrong here?

Thanks

Who is online

Users browsing this forum: axellin, jhlee1 and 97 guests