Page 1 of 1

WROVER KIT + OpenOCD + Eclipse Debug Issue

Posted: Mon May 14, 2018 2:12 pm
by devil_an
I use WROVER KIT v3.
When I start OpenOCD bin/openocd -s share/openocd/scripts -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp32-wrover.cfg it print in terminal this:

Open On-Chip Debugger 0.10.0-dev (2018-04-18-12:03)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 20000 kHz
esp32 interrupt mask on
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=0x400D1AB6 (active) APP_CPU: PC=0x400D1AB6
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn

Then I run Eclipse a "blink" example project with one modification: in blink_task superloop I add printf("TEST\r\n\") that was every 2 second print in UART "TEST" message. When I choose a debug, Eclipse add breakpoint to app_main, show me threads, variables, breakpoint, stop program to app_main and OpenOCD print in terminal this:

Info : accepting 'gdb' connection on tcp/3333
Info : Use core0 of target 'esp32'
Info : Target halted. PRO_CPU: PC=0x40091D07 (active) APP_CPU: PC=0x400D1AB6
Info : Auto-detected flash size 4096 KB
Info : Using flash size 4096 KB
Error: Error reading FreeRTOS thread name
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)
cpu0: Current bits set: BreakIn BreakOut RunStallIn
cpu1: Current bits set: BreakIn BreakOut RunStallIn
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 : Target halted. PRO_CPU: PC=0x400D1F9C (active) APP_CPU: PC=0x400D1AB6

Line with "Error: Error reading FreeRTOS thread name" is worries. Than if press Run button in Eclipse, program will run and I can see "TEST" message in terminal /dev/ttyUSB1 every 2 seconds.
BUT... when I try add breakpoint to any line (for example to printf("TEST\r\n\")), Eclipse will stall and OpenOCD print in terminal this:

Info : Target halted. PRO_CPU: PC=0x400D1AB6 (active) APP_CPU: PC=0x400D1AB6
Error: Error reading FreeRTOS thread name

Else one "Error: Error reading FreeRTOS thread name" line. What is this error? After this Eclipse stop debugging... I can`t debug simple program with superloop...