PlatformIO Community

Verify esp-prog

I’m having esp-prog issues.

In an effort to determine what the issues are can I verify that FTDI, OpenOCD and GDB are properly installed/functioning?

Any suggestions?

Is it the issue you described in Debugging Issues, included Platfomrio.ini, Debug Console output, Verbose log?

I still don’t have esp-prog working.

It is related but I’ve come to a point where I’ve researched so much and came to dead ends that I thought I would try to verify if ftdi, openocd and gdb are correct. Thinking something might turn up.

Bottom line is I’m out of options and am grabbing at straws.

I’m starting to realize the amount of effort I’m putting into this might not be worth the reward.

Well as the first sanity check you should make sure OpenOCD can connect via the ESP-PROG’s JTAG connection to the ESP32.

Open a terminal (Windows + R → cmd.exe or whatever terminal app you like) and execute

C:\Users\%USERNAME%\.platformio\packages\tool-openocd-esp32\bin\openocd.exe -s "C:\Users\%USERNAME%\.platformio\packages\tool-openocd-esp32\share\openocd\scripts" -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp-wroom-32.cfg

what does it say?

(the %USERNAME% is intentional and should not be removed.)

This is the output that I have from running the suggested openocd command.

Once the error starts scrolling, to the terminal, the only way to stop is to unplug esp-prog usb.

As of right now I’m confident that the winring and dev mgr setup are correct.

Any suggestions/ideas?

======================================================================

---- Test OPEN OCD ----

Open On-Chip Debugger v0.10.0-esp32-20190708 (2019-07-08-11:04)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 5000 kHz
Info : Configured 2 cores
esp32 interrupt mask on
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 5000 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 0 was reset (pwrstat=0xFC, after clear 0xFC).
Info : esp32: Core 0 was reset (pwrstat=0xFC, after clear 0xFC).
Info : esp32: Debug controller 1 was reset (pwrstat=0xFE, after clear 0xFE).
Info : esp32: Core 1 was reset (pwrstat=0xFE, after clear 0xFE).
Error: cpu0: esp32_fetch_all_regs (line 273): DSR (FFFFFFFC) indicates target still busy!
Error: cpu0: esp32_fetch_all_regs (line 273): DSR (FFFFFFFC) indicates DIR instruction generated an overrun!
Error: cpu0: esp32_fetch_all_regs (line 303): DSR (FFFFFFFC) indicates target still busy!
Error: cpu0: esp32_fetch_all_regs (line 303): DSR (FFFFFFFC) indicates DIR instruction generated an overrun!
Error: cpu1: esp32_fetch_all_regs (line 273): DSR (FFFFFFFE) indicates target still busy!
Error: cpu1: esp32_fetch_all_regs (line 273): DSR (FFFFFFFE) indicates DIR instruction generated an exception!
Error: cpu1: esp32_fetch_all_regs (line 273): DSR (FFFFFFFE) indicates DIR instruction generated an overrun!
Error: cpu1: esp32_fetch_all_regs (line 303): DSR (FFFFFFFE) indicates target still busy!
Error: cpu1: esp32_fetch_all_regs (line 303): DSR (FFFFFFFE) indicates DIR instruction generated an exception!
Error: cpu1: esp32_fetch_all_regs (line 303): DSR (FFFFFFFE) indicates DIR instruction generated an overrun!
Error: Exception reading pc!

Warn : Received debug request on stalled active core 0.
Info : Target halted. PRO_CPU: PC=0xFFFFFFFC (active) APP_CPU: PC=0x00000000
Error: cpu0: xtensa_write_memory (line 807): DSR (FFFFFFFC) indicates target still busy!
Error: cpu0: xtensa_write_memory (line 807): DSR (FFFFFFFC) indicates DIR instruction generated an overrun!
Warn : esp32: Failed writing 4 bytes at address 0x3ff5f064, data - a1, 3a, d8, 50, 18, 7f, a3, 00
Error: Failed to write ESP32_TIMG0WDT_PROTECT (-4)!
Error: Failed to read break instruction!
Error: cpu0: esp32_write_dirty_registers (line 428): DSR (FFFFFFFC) indicates target still busy!
Error: cpu0: esp32_write_dirty_registers (line 428): DSR (FFFFFFFC) indicates DIR instruction generated an overrun!
Error: cpu1: esp32_write_dirty_registers (line 428): DSR (FFFFFFFE) indicates target still busy!
Error: cpu1: esp32_write_dirty_registers (line 428): DSR (FFFFFFFE) indicates DIR instruction generated an exception!
Error: cpu1: esp32_write_dirty_registers (line 428): DSR (FFFFFFFE) indicates DIR instruction generated an overrun!
Error: cpu0: xtensa_resume_active_cpu (line 632): DSR (FFFFFFFC) indicates target still busy!
Error: cpu0: xtensa_resume_active_cpu (line 632): DSR (FFFFFFFC) indicates DIR instruction generated an overrun!
Error: cpu1: xtensa_resume_active_cpu (line 632): DSR (FFFFFFFE) indicates target still busy!
Error: cpu1: xtensa_resume_active_cpu (line 632): DSR (FFFFFFFE) indicates DIR instruction generated an exception!
Error: cpu1: xtensa_resume_active_cpu (line 632): DSR (FFFFFFFE) indicates DIR instruction generated an overrun!
Error: cpu0: esp32_fetch_all_regs (line 273): DSR (FFFFFFFC) indicates target still busy!
Error: cpu0: esp32_fetch_all_regs (line 273): DSR (FFFFFFFC) indicates DIR instruction generated an overrun!
Error: cpu0: esp32_fetch_all_regs (line 303): DSR (FFFFFFFC) indicates target still busy!
Error: cpu0: esp32_fetch_all_regs (line 303): DSR (FFFFFFFC) indicates DIR instruction generated an overrun!
Error: cpu0: esp32_write_dirty_registers (line 428): DSR (FFFFFFFC) indicates target still busy!
Error: cpu0: esp32_write_dirty_registers (line 428): DSR (FFFFFFFC) indicates DIR instruction generated an overrun!
Error: cpu0: esp32_fetch_all_regs (line 273): DSR (FFFFFFFC) indicates target still busy!
Error: cpu0: esp32_fetch_all_regs (line 273): DSR (FFFFFFFC) indicates DIR instruction generated an overrun!
Error: cpu0: esp32_fetch_all_regs (line 303): DSR (FFFFFFFC) indicates target still busy!
Error: cpu0: esp32_fetch_all_regs (line 303): DSR (FFFFFFFC) indicates DIR instruction generated an overrun!
Error: cpu0: esp32_write_dirty_registers (line 428): DSR (FFFFFFFC) indicates target still busy!
Error: cpu0: esp32_write_dirty_registers (line 428): DSR (FFFFFFFC) indicates DIR instruction generated an overrun!
Error: cpu1: esp32_write_dirty_registers (line 428): DSR (FFFFFFFE) indicates target still busy!
Error: cpu1: esp32_write_dirty_registers (line 428): DSR (FFFFFFFE) indicates DIR instruction generated an exception!

a

  • Do you have anything connected to the ESP32?
  • How is the ESP32 powered? Have you tried shorter USB cables or a different USB port?
  • did you connect any wire to the RST / EN line of the ESP32?

I’ve not yet seen the failure mode where it initially detects the chip and then fails further down the line.

Very interesting. The usual error message is that DSR is all 0xFF (like here), but there seems to be some variation on your output.

This may indicate noise on the wires, or a GND connection issue. Have you replaced the wires between the debugger and the target board already?

There literally only two other google results for DSR (FFFFFFFC).

All my connections are bare-bones…only connections to esp-prog, 5 total wires (4signal, 1 grd). Wire lengths ~6in.

I have tried 2 diff shorter cables and diff ports with the same resluts.

No wires connected to RST/EN.

I have not replaced the wires between debugger and target but I have done continuity test at least 2 times.

What you say is interesting…I’ve been thinking that this may be a defective board but before I jump on that wagon I’d like to have some solid proof.

1 Like

I don’t have any further ideas if you double checked the wiring. https://github.com/espressif/openocd-esp32/issues/ would be the next line of support. Or, cross-check it by trying it on a new board.