OpenOCD problem

RA5040
Posts: 26
Joined: Mon Jul 30, 2018 1:20 pm

Re: OpenOCD problem

Postby RA5040 » Sun Aug 26, 2018 10:07 am

No, unfortunately that didn't work. After flashing this is what comes up on the openocd terminal:

Info : esp32: Debug controller was reset (pwrstat=0xFF, after clear 0xFF).
Info : esp32: Core was reset (pwrstat=0xFF, after clear 0xFF).
Error: cpu0: esp32_fetch_all_regs (line 225): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: esp32_fetch_all_regs (line 225): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: esp32_fetch_all_regs (line 225): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Error: cpu0: esp32_fetch_all_regs (line 255): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: esp32_fetch_all_regs (line 255): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: esp32_fetch_all_regs (line 255): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Error: Exception reading pc!

Info : Target halted. PRO_CPU: PC=0x00000000 (active) APP_CPU: PC=0x00000000
Error: cpu0: xtensa_write_memory (line 759): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: xtensa_write_memory (line 759): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: xtensa_write_memory (line 759): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Warn : esp32: Failed writing 4 bytes at address 0x3FF5F064, data - a1, 3a, d8, 50, a1, 3a, d8, 50
embedded:startup.tcl:21: Error:
in procedure 'esp_core_halt'
in procedure 'esp32' called at file "share/openocd/scripts/target/esp32.cfg", line 44
in procedure 'ocd_bouncer'
at file "embedded:startup.tcl", line 21

Error: cpu0: xtensa_read_memory (line 652): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: xtensa_read_memory (line 652): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: xtensa_read_memory (line 652): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Warn : cpu0: Failed reading 4 bytes at address 0x3FF00030
Error: Failed to read target memory (-4)!
Info : esp32: Debug controller was reset (pwrstat=0xFF, after clear 0xFF).
Info : esp32: Core was reset (pwrstat=0xFF, after clear 0xFF).
Error: cpu0: esp32_fetch_all_regs (line 225): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: esp32_fetch_all_regs (line 225): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: esp32_fetch_all_regs (line 225): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Error: cpu0: esp32_fetch_all_regs (line 255): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: esp32_fetch_all_regs (line 255): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: esp32_fetch_all_regs (line 255): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Error: Exception reading pc!

Info : Target halted. PRO_CPU: PC=0x00000000 (active) APP_CPU: PC=0x00000000
Error: cpu0: xtensa_write_memory (line 759): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: xtensa_write_memory (line 759): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: xtensa_write_memory (line 759): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Warn : esp32: Failed writing 4 bytes at address 0x3FF5F064, data - a1, 3a, d8, 50, a1, 3a, d8, 50
embedded:startup.tcl:21: Error:
in procedure 'esp_core_halt'
in procedure 'esp32' called at file "share/openocd/scripts/target/esp32.cfg", line 44
in procedure 'ocd_bouncer'
at file "embedded:startup.tcl", line 21

Error: cpu0: xtensa_read_memory (line 652): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: xtensa_read_memory (line 652): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: xtensa_read_memory (line 652): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Warn : cpu0: Failed reading 4 bytes at address 0x3FF00030
Error: Failed to read target memory (-4)!
Info : esp32: Debug controller was reset (pwrstat=0xE5, after clear 0x5F).


... and gdb then fails as before (it does stop at main but 2 Ns and into hyperspace, as before)

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: OpenOCD problem

Postby ESP_igrr » Sun Aug 26, 2018 10:20 am

Thanks, understood. It would be great if you could capture OpenOCD logs at debug level (-d 3 flag at command line) including the part where gdb is trying to connect, and submit an issue in openocd-esp32 repository, attaching the logs.

RA5040
Posts: 26
Joined: Mon Jul 30, 2018 1:20 pm

Re: OpenOCD problem

Postby RA5040 » Sun Aug 26, 2018 10:59 am

Will do.

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: OpenOCD problem

Postby Ritesh » Mon Aug 27, 2018 6:13 pm

Hi,

Did you check with Linux System as well? If yes then would you please provide steps or link for that as well?

If you gets success to debug core using openOCD on ESP32 board then it will be great to share steps in details for same using Windows System
Regards,
Ritesh Prajapati

RA5040
Posts: 26
Joined: Mon Jul 30, 2018 1:20 pm

Re: OpenOCD problem

Postby RA5040 » Mon Aug 27, 2018 8:57 pm

Hi, no, I haven't tried it on Linux, but there shouldn't be any major differences.

The steps that I took I have documented here: http://www.irelandupclose.com/customer/esp32/jtag/

I would really recommend getting it to work on the command line first (the link gives the steps).

I'm trying to get it to work on Sloeber (Eclipse-Arduino) at the moment, but no great success yet. If I do get it to work I will post the steps.

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: OpenOCD problem

Postby Ritesh » Tue Aug 28, 2018 3:59 am

RA5040 wrote:Hi, no, I haven't tried it on Linux, but there shouldn't be any major differences.

The steps that I took I have documented here: http://www.irelandupclose.com/customer/esp32/jtag/

I would really recommend getting it to work on the command line first (the link gives the steps).

I'm trying to get it to work on Sloeber (Eclipse-Arduino) at the moment, but no great success yet. If I do get it to work I will post the steps.
Ok. Thanks for Quick Response.

I will check with above link and will get back to you with results. Meanwhile, I am checking same for Linux System and will let you know if any update regarding that.
Regards,
Ritesh Prajapati

alfonsoqs
Posts: 1
Joined: Mon Nov 05, 2018 5:56 pm

Re: OpenOCD problem

Postby alfonsoqs » Mon Nov 05, 2018 6:01 pm

Same problem with Debugging ESP-wrover:
Open On-Chip Debugger 0.10.0-dev (2018-09-20-12:54)
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
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 20000 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: esp32.cpu0: IR capture error; saw 0x1f not 0x01
Warn : Bypassing JTAG setup events due to errors
Info : esp32: Debug controller was reset (pwrstat=0xFF, after clear 0xFF).
Info : esp32: Core was reset (pwrstat=0xFF, after clear 0xFF).
Error: cpu0: esp32_fetch_all_regs (line 225): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: esp32_fetch_all_regs (line 225): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: esp32_fetch_all_regs (line 225): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Error: cpu0: esp32_fetch_all_regs (line 255): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: esp32_fetch_all_regs (line 255): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: esp32_fetch_all_regs (line 255): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Error: Exception reading pc!

Info : Target halted. PRO_CPU: PC=0x00000000 (active) APP_CPU: PC=0x00000000
Error: cpu0: xtensa_write_memory (line 759): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: xtensa_write_memory (line 759): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: xtensa_write_memory (line 759): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Warn : esp32: Failed writing 4 bytes at address 0x3FF5F064, data - a1, 3a, d8, 50, a1, 3a, d8, 50
embedded:startup.tcl:21: Error:
in procedure 'init'
in procedure 'ocd_bouncer'
in procedure 'esp_smp_break_config'
in procedure 'esp32' called at file "share/openocd/scripts/target/esp32.cfg", line 54
in procedure 'ocd_bouncer'
in procedure 'esp_core_halt'
in procedure 'esp32' called at file "share/openocd/scripts/target/esp32.cfg", line 44
in procedure 'ocd_bouncer'
at file "embedded:startup.tcl", line 21

Error: cpu0: xtensa_read_memory (line 652): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: xtensa_read_memory (line 652): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: xtensa_read_memory (line 652): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Warn : cpu0: Failed reading 4 bytes at address 0x3FF00030
Error: Failed to read target memory (-4)!
cpu0: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
cpu1: Current bits set: BreakIn BreakOut RunStallIn DebugModeOut
Error: ftdi device did not accept all data: 0, tried 78
Error: unable to purge ftdi rx buffers: LIBUSB_ERROR_IO
Error: error while flushing MPSSE queue: -4
Polling target esp32 failed, trying to reexamine

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: OpenOCD problem

Postby ESP_igrr » Tue Nov 06, 2018 1:43 am

Error: esp32.cpu0: IR capture error; saw 0x1f not 0x01
Means that JTAG lines of the ESP32 are either not connected to the FTDI (via a jumper block on the lower right corner of the board, see https://docs.espressif.com/projects/esp ... up-options), or there is something else connected to the same lines that is interfering with JTAG (for example, an SD card).

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: OpenOCD problem

Postby ESP_Sprite » Wed Nov 07, 2018 1:20 am

Additionally, you also get errors like that if your program reconfigures the JTAG gpios (12-15) to some other function.

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: OpenOCD problem

Postby Ritesh » Wed Nov 07, 2018 3:11 pm

Hi,

We have tried using command line tool into Linux and Windows System and it works fine without any issue. We are able to debug and put some break points as well as per our requirement.

So, Let me know if anyone need any help regarding same.
Regards,
Ritesh Prajapati

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 94 guests