Progress is up on github: https://github.com/projectgus/openocd
Still very early days, not quite usable as a JTAG debugger yet but I think we will get there.
- Can connect, halt, resume and single step instructions.
- Can read and write memory and registers.
- gdb kind of works - using the gdb built from the esp8266 crosstool-ng fork can attach, halt, step, view register state and assembly dump, etc. [s]>There's currently a bug that causes it to lose sync randomly after a short time and requires a reset. .[/s] EDIT: This bug is fixed, gdb seems stable now
- Migrated to Issues List in github
Problems with no (yet) known solution:
- Also migrated to Issues List in github
Help wanted! Anyone who can help debug problems or finish things off is very welcome!!
(Note: at this stage un-detailed bug reports like "it doesn't work" aren't helpful, sorry, it doesn't work particularly well for anyone right now... )
I've only used an ESP-12 module as it has an exposed RESET line. I think it may be possible to use modules without exposed RESET, provided you don't configure those pins as GPIOs in your program(?)
- JTAG Signal -> ESP8266 GPIO Pin -> JTAG Pin (standard 20 pin connector)
- TMS -> 14 -> 7
- TDI -> 12 -> 5
- TCK -> 13 -> 9
- TDO -> 15 -> 13
- RST -> RST -> 15
openocd command line
openocd -f interface/ftdi/olimex-arm-usb-tiny-h.cfg -f target/esp8266.cfg
Replace the first -f argument with the config file for your JTAG interface.
If you don't want to 'make install', you can run in-place like this:
./src/openocd -f ./tcl/interface/ftdi/olimex-arm-usb-tiny-h.cfg -f ./tcl/target/esp8266.cfg
Hope this is eventually useful for some people. . In particular I'm hoping this will be a tool to further understand the inner secret workings of the esp8266 hardware.