Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By ril3y
#31350 Hey guys I found this thread and hope its still being viewed. I have a Segger JLINK that I am trying to get working on the esp8266 with your openocd branch. I think I have most of it there! However I am stuck as openocd's JTAG interrogation is failing and only finding 0's. Upfront I am using adafruits HUZZAH esp8266 (12) and on OSX. Not sure that should matter much. Below is my failing openocd output. Also while openocd is connected... If I hit reset on the esp8266 the window with openocd does react.

Code: Select allError: jlink_tap_execute failed, result 5 (unknown)
Error: failed to scan tap instruction
Error: Failed to read DOSR. Not Xtensa OCD?
Polling target esp8266.cpu failed, trying to reexamine
Error: jlink_tap_execute failed, result 5 (unknown)
Error: failed to scan tap instruction
Error: Failed to read DOSR. Not Xtensa OCD?
Error: Failed to examine target.
Examination failed, GDB will be halted. Polling again in 100ms
Polling target esp8266.cpu failed, trying to reexamine
Warn : Warning: Target not halted, breakpoint/watchpoint state may be unpredictable.


This is the general failure on startup.

Code: Select allril3ys-MBP:openocd ril3y$ openocd -f tcl/interface/jlink.cfg -f ./tcl/target/esp8266.cfg
Open On-Chip Debugger 0.9.0-rc1-dev-00457-g6a7dd37-dirty (2015-10-14-16:07)
Licensed under GNU GPL v2
For bug reports, read
   http://openocd.org/doc/doxygen/bugs.html
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
adapter speed: 1000 kHz
stop_wdt
Info : J-Link ARM V8 compiled Feb  8 2012 14:30:39
Info : J-Link caps 0xb9ff7bbf
Info : J-Link hw version 80000
Info : J-Link hw type J-Link
Info : J-Link max mem block 9336
Info : J-Link configuration
Info : USB-Address: 0x0
Info : Kickstart power on JTAG-pin 19: 0xffffffff
Info : Vref = 0.977 TCK = 1 TDI = 0 TDO = 0 TMS = 0 SRST = 1 TRST = 1
Error: Vref too low. Check Target Power
Info : J-Link JTAG Interface ready
Info : clock speed 1000 kHz
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: esp8266.cpu: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
Warn : Warning: Target not halted, breakpoint/watchpoint state may be unpredictable.
^C


If anyone has some suggestions I am very much interested. Oh and btw I submitted a patch to get openocd build on OSX under an Issue on the main github.

Thanks!

ril3y
User avatar
By projectgus
#31370
Error: JTAG scan chain interrogation failed: all zeroes


Usually when I see this it's a wiring problem, but I haven't got a J-Link so it might be something different.

Can you list the exact wiring connections you've made (from JLINK JTAG connector to HUZZAH pin?)?
User avatar
By Ivan Shcherbakov
#33205 Hi All,
Just wanted to share that we've forked the ESP8266 OpenOCD port and greatly improved its reliability. It now supports software breakpoints, can automatically feed the ESP8266 watchdog while the target is stopped and fixes several issues related to stepping. You can download it http://github.com/sysprogs/esp8266-openocd.

Detailed instructions on using it with Visual Studio are available on http://visualgdb.com/tutorials/esp8266/openocd/.