Page 1 of 1

JTAG debugging with ESP-WROVER-KIT in eclipse

Posted: Tue Mar 27, 2018 10:01 am
by timredfern
I'm trying to set up JTAG debugging according to http://esp-idf.readthedocs.io/en/latest ... -debugging

I'm using OSX. I think I've got my head around the FTDI driver unloading/ loading. openocd seems to be running properly:

Code: Select all

Open On-Chip Debugger 0.10.0-dev-ga859564 (2017-07-25-00:19)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 20000 kHz
force hard breakpoints
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 20000 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. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400 
Im following the instructions at http://esp-idf.readthedocs.io/en/latest ... ugger.html to set up debugging in eclipse. All seems to be in order, until I hit debug.. eclipse shows this:

Code: Select all

Error in final launch sequence
    Failed to execute MI command:
         x $a1=0
         Error message from debugger back end:
Cannot access memory at address 0x0
openocd shows this:

Code: Select all

Info : accepting 'gdb' connection on tcp/3333
Info : Use core0 of target 'esp32'
Info : Target halted. PRO_CPU: PC=0x400803C0 (active)    APP_CPU: PC=0x4008EC68 
Info : Auto-detected flash size 0 KB
Info : Using flash size 0 KB
Info : Set current thread to 0x00000000, old= 0x00000000
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 : esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x5000004B (active)    APP_CPU: PC=0x00000000 
esp32: target state: halted
Info : esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
Info : Target halted. PRO_CPU: PC=0x40000400 (active)    APP_CPU: PC=0x40000400 
esp32: target state: halted
Info : dropped 'gdb' connection
Has anyone used this successfully?

Re: JTAG debugging with ESP-WROVER-KIT in eclipse

Posted: Tue Mar 27, 2018 2:48 pm
by vonnieda
I found that the

Code: Select all

x $a1=0
command that the docs say to include causes this error. I removed it and there doesn't seem to be any problem. After removing it, all works fine.

Re: JTAG debugging with ESP-WROVER-KIT in eclipse

Posted: Tue Mar 27, 2018 3:41 pm
by timredfern
BOOM!

thanks so much.

I wonder if someone could update the docs?