"Cannot execute this command without a live selected thread" using OpenOCD via JTAG on the ESP32 WROVER KIT
Posted: Sat Aug 19, 2017 1:26 am
Did someone succeed using OpenOCD via JTAG on the ESP32 WROVER KIT ? Debugging doesn't work for me and i get
"Cannot execute this command without a live selected thread". What does it mean? what should i do ?
Here below a description launching debug session in console on windows 10
Launching OpenOCD :
then when i lauch xtensa-esp32-elf-gdb -x gdbinit firmware.elf
gdbinit file content:
"Cannot execute this command without a live selected thread". What does it mean? what should i do ?
Here below a description launching debug session in console on windows 10
Launching OpenOCD :
Code: Select all
Open On-Chip Debugger 0.10.0-dev-ga859564 (2017-07-24-16:18)
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
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
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 : esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
Info : accepting 'gdb' connection on tcp/3333
Info : Target halted. PRO_CPU: PC=0x400D9B04 (active) APP_CPU: PC=0x00000000
esp32: target state: halted
Info : Use core0 of target 'esp32'
Info : Target halted. PRO_CPU: PC=0x40091D07 (active) APP_CPU: PC=0x00000000
Info : Auto-detected flash size 4096 KB
Info : Using flash size 4096 KB
Info : Set current thread to 0x00000000, old= 0x00000000
Error: FreeRTOS: uxTopUsedPriority is not defined, consult the OpenOCD manual for a work-around
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 : Target halted. PRO_CPU: PC=0x400DCA23 (active) APP_CPU: PC=0x400D9B04
Error: FreeRTOS: uxTopUsedPriority is not defined, consult the OpenOCD manual for a work-around
then when i lauch xtensa-esp32-elf-gdb -x gdbinit firmware.elf
Code: Select all
GNU gdb (crosstool-NG crosstool-ng-1.22.0-61-gab8375a) 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=i686-host_pc-mingw32 --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 firmware.elf...done.
0x00000000 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)
esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
Target halted. PRO_CPU: PC=0x5000004B (active) APP_CPU: PC=0x00000000
esp32: target state: halted
esp32: Core was reset (pwrstat=0x1F, after clear 0x0F).
Target halted. PRO_CPU: PC=0x40000400 (active) APP_CPU: PC=0x40000400
esp32: target state: halted
Hardware assisted breakpoint 1 at 0x400dca23: file C:\users\orce\.platformio\packages\framework-arduinoespressif32\cores\esp32\main.cpp, line 24.
0x0: 0x00000000
Target halted. PRO_CPU: PC=0x400DCA23 (active) APP_CPU: PC=0x400D9B04
[Switching to Thread 1073520888]
(gdb) c
Continuing.
Cannot execute this command without a live selected thread.
(gdb)
Code: Select all
target remote :3333
mon reset halt
thb app_main
x $a1=0
c