OpenOCD installation issues, can't find 'esp108'
-
- Posts: 26
- Joined: Tue Jul 18, 2017 10:39 pm
OpenOCD installation issues, can't find 'esp108'
I am getting started on my ESP32 development and have just installed OpenOCD. I can't seem to access to esp108, see attached. What is the issue here, how to resolve? I am guessing it is not built in the OpenOCD directory (~/esp/openocd-esp32/), or it is not on PATH.
- Attachments
-
- JTAG Installation Process - Jmr.txt
- (1.06 KiB) Downloaded 1096 times
-
- esp108_error_message.png (44.5 KiB) Viewed 14210 times
- ESP_krzychb
- Posts: 400
- Joined: Sat Oct 01, 2016 9:05 am
- Contact:
Re: OpenOCD installation issues, can't find 'esp108'
Hi justinmreina,
I do not see the command you have used to call OpenOCD. It should look as follows:
You may need to adjust configuration files after "-f" to match your specifc h/w.
If done correctly you should see:
I do not see the command you have used to call OpenOCD. It should look as follows:
Code: Select all
$ src/openocd -s tcl -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp-wroom-32.cfg
If done correctly you should see:
Code: Select all
krzysztof@TK-HP:~/esp/openocd-esp32$ src/openocd -s tcl -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp-wroom-32.cfg
Open On-Chip Debugger 0.10.0-dev-gb5ec731 (2017-07-23-21: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
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 : Target halted. PRO_CPU: PC=0x40080F80 (active) APP_CPU: PC=0x400D0F58
-
- Posts: 26
- Joined: Tue Jul 18, 2017 10:39 pm
Re: OpenOCD installation issues, can't find 'esp108'
this works, thank you !!
Original
See attached 'JTAG Installation Process - Jmr.txt':26 for the originally applied command -
Command Used
Here was my applied command (DevKitC Board, Segger J-Link EDU Programmer). Note that the unit connection was not successful, but the JTAG connection to my programmer was, mission accomplished!
Response
Original
See attached 'JTAG Installation Process - Jmr.txt':26 for the originally applied command -
Code: Select all
./src/openocd -s ./tcl -f ./esp32.cfg
Here was my applied command (DevKitC Board, Segger J-Link EDU Programmer). Note that the unit connection was not successful, but the JTAG connection to my programmer was, mission accomplished!
Code: Select all
./src/openocd -s tcl -f interface/jlink.cfg -f board/esp-wroom-32.cfg
Code: Select all
jmreina@jmreina-ubuntu:~/openocd-esp32$ ./src/openocd -s tcl -f interface/jlink.cfg -f board/esp-wroom-32.cfg
Open On-Chip Debugger 0.10.0-dev-gb5ec731 (2017-07-21-19:20)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 20000 kHz
force hard breakpoints
Info : No device selected, using first device.
Info : J-Link V9 compiled Dec 16 2016 15:34:10
Info : Hardware version: 9.40
Info : VTarget = 0.000 V
Info : Reduced speed from 20000 kHz to 15000 kHz (maximum).
Info : Reduced speed from 20000 kHz to 15000 kHz (maximum).
Info : clock speed 20000 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: esp32.cpu0: IR capture error; saw 0x00 not 0x01
Warn : Bypassing JTAG setup events due to errors
Error: cpu0: esp32_fetch_all_regs (line 163): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: esp32_fetch_all_regs (line 163): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: esp32_fetch_all_regs (line 163): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Error: cpu0: esp32_fetch_all_regs (line 190): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: esp32_fetch_all_regs (line 190): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: esp32_fetch_all_regs (line 190): DSR (FFFFFFFF) indicates DIR instruction generated an overrun!
Error: Exception reading pc!
Info : Target halted. PRO_CPU: PC=0x00000000 APP_CPU: PC=0x00000000 (active)
Error: cpu0: xtensa_write_memory (line 696): DSR (FFFFFFFF) indicates target still busy!
Error: cpu0: xtensa_write_memory (line 696): DSR (FFFFFFFF) indicates DIR instruction generated an exception!
Error: cpu0: xtensa_write_memory (line 696): 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 'flash'
in procedure 'ocd_bouncer'
in procedure 'esp_core_halt'
in procedure 'esp32' called at file "tcl/target/esp32.cfg", line 37
in procedure 'ocd_bouncer'
at file "embedded:startup.tcl", line 21
Info : esp32: Debug controller was reset (pwrstat=0xFF, after clear 0xFF).
Info : esp32: Core was reset (pwrstat=0xFF, after clear 0xFF).
- ESP_krzychb
- Posts: 400
- Joined: Sat Oct 01, 2016 9:05 am
- Contact:
Re: OpenOCD installation issues, can't find 'esp108'
I am happy to see you are progressing!
Configuration files have changed with latest release of OpenOCD and "jtag_debugging_for_esp32_en.pdf v1.0" is not updated to reflect these changes.
Regarding the error log, it looks like communication speed or wiring problem:
Basing on command to start OpenOCD I assume you are using an external JTAG adapter. In such case it is unlikely to achieve communication at 20 MHz.
If not done already I would reduce the speed several times (in range 10x - 100x depending on the cable length) by changing the following line in configuration:
If the issue persists then check the wiring.
If the wiring looks correct:
- post a photo of your set up,
- specify types of ESP32 board & JTAG interface used,
- provide a list how the pins of JTAG interface and ESP32 module are connected.
Configuration files have changed with latest release of OpenOCD and "jtag_debugging_for_esp32_en.pdf v1.0" is not updated to reflect these changes.
Regarding the error log, it looks like communication speed or wiring problem:
Code: Select all
Info : Reduced speed from 20000 kHz to 15000 kHz (maximum).
Info : clock speed 20000 kHz
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
If not done already I would reduce the speed several times (in range 10x - 100x depending on the cable length) by changing the following line in configuration:
Code: Select all
adapter_khz 20000
If the wiring looks correct:
- post a photo of your set up,
- specify types of ESP32 board & JTAG interface used,
- provide a list how the pins of JTAG interface and ESP32 module are connected.
-
- Posts: 26
- Joined: Tue Jul 18, 2017 10:39 pm
Re: OpenOCD installation issues, can't find 'esp108'
Hi krzychb,
Thank you 20kHz works! The J-Link successfully connects now but JTAG is not established to my ESP32. Here is my hardware setup -
Setup
Board: Espressif DevKit-C
JTAG: Segger J-Link EDU
OS: Ubuntu 16.04 (Virtualbox, Win10 PC)
Here is what I see in response (see 'JTAG Response.pdf' for full response) -
Thoughts? What is missing? Why does it say "Info : No device selected, using first device", how to specify the device?
Thanks for your help here!
Thank you 20kHz works! The J-Link successfully connects now but JTAG is not established to my ESP32. Here is my hardware setup -
Setup
Board: Espressif DevKit-C
JTAG: Segger J-Link EDU
OS: Ubuntu 16.04 (Virtualbox, Win10 PC)
Here is what I see in response (see 'JTAG Response.pdf' for full response) -
Code: Select all
jmreina@jmreina-ubuntu:~/esp/openocd-esp32$ ./src/openocd -s tcl -f interface/jlink.cfg -f
board/esp-wroom-32.cfg
Open On-Chip Debugger 0.10.0-dev-gb5ec731 (2017-07-23-10:57)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 20 kHz
force hard breakpoints
Info : No device selected, using first device.
Info : J-Link V9 compiled Dec 16 2016 15:34:10
Info : Hardware version: 9.40
Info : VTarget = 3.316 V
Info : clock speed 20 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).
Thanks for your help here!
- Attachments
-
- JTAG Wiring Pics.zip
- (2.07 MiB) Downloaded 608 times
-
- JTAG Wiring Table.pdf
- (438.02 KiB) Downloaded 632 times
-
- JTAG Response.pdf
- (47.48 KiB) Downloaded 701 times
- ESP_krzychb
- Posts: 400
- Joined: Sat Oct 01, 2016 9:05 am
- Contact:
Re: OpenOCD installation issues, can't find 'esp108'
HI justinmreina,
You are clearly almost there.
I am not sure about wiring:
1. I would not connect 3.3V between ESP32 and Segger J-Link. ESP32 should be powered through own USB
2. From the pictures you posted it looks like one of lines is connected to GPIO27 while GPIO12 is not connected
Please see below set-up that I have just tested and works correctly.
All wires are about 10 cm long. In fact in this setup it is working with "adapter_khz" at 26 MHz that is maximum discussed in documentation. I have tested it for about 2h transmitting application traces as described in http://esp-idf.readthedocs.io/en/latest ... trace.html
You are clearly almost there.
I am not sure about wiring:
1. I would not connect 3.3V between ESP32 and Segger J-Link. ESP32 should be powered through own USB
2. From the pictures you posted it looks like one of lines is connected to GPIO27 while GPIO12 is not connected
Please see below set-up that I have just tested and works correctly.
All wires are about 10 cm long. In fact in this setup it is working with "adapter_khz" at 26 MHz that is maximum discussed in documentation. I have tested it for about 2h transmitting application traces as described in http://esp-idf.readthedocs.io/en/latest ... trace.html
-
- Posts: 26
- Joined: Tue Jul 18, 2017 10:39 pm
Re: OpenOCD installation issues, can't find 'esp108'
It works now, thank you!! It did require connection of VCC to the JTAG for successful connection, and then ready to go!
That graphic you shared, wow this is good content. I've encapsulated it into my wiring write-up, quite useful here see attached!
That graphic you shared, wow this is good content. I've encapsulated it into my wiring write-up, quite useful here see attached!
- Attachments
-
- JTAG Wiring Table - r2.pdf
- (548.37 KiB) Downloaded 775 times
-
- Posts: 26
- Joined: Tue Jul 18, 2017 10:39 pm
Re: OpenOCD installation issues, can't find 'esp108'
My setup is almost complete in Eclipse, very eager to get started in dev. I've got one last step here, debugging. Is there a good 'hello world' ref to GDB/Eclipse debugging for the ESP32?
Known ESP-IDF Debugging Ref
- ESP-IDF: Docs » API Guides » Debugging
Debugging Goals
- HW/SW Code Breakpoints
- Code Stepping
- Register R/W
Each time I dive into the posted instructions, I get a bit intimidated and back down. What is the easy way to get started here?
Known ESP-IDF Debugging Ref
- ESP-IDF: Docs » API Guides » Debugging
Debugging Goals
- HW/SW Code Breakpoints
- Code Stepping
- Register R/W
Each time I dive into the posted instructions, I get a bit intimidated and back down. What is the easy way to get started here?
-
- Posts: 26
- Joined: Tue Jul 18, 2017 10:39 pm
Re: OpenOCD installation issues, can't find 'esp108'
any thoughts or ideas here? If anyone has anything toss it up and I'll dive in, with full report back in response!
Re: OpenOCD installation issues, can't find 'esp108'
Please check the updated guide for setting up JTAG debugging for ESP32 in Eclipse: http://esp-idf.readthedocs.io/en/latest ... er-eclipse and the debugging examples section: http://esp-idf.readthedocs.io/en/latest ... es-eclipse
Who is online
Users browsing this forum: No registered users and 113 guests