please help to get JTAG working on esp wrover kit

imtiaz
Posts: 106
Joined: Wed Oct 26, 2016 1:34 am

please help to get JTAG working on esp wrover kit

Postby imtiaz » Tue Mar 14, 2017 8:40 pm

Hi All,

I have followed the instructions to get JTAG working on the esp wrover kit on a virtual linux machine. when I invoke the following command :
./src/openocd -s ./tcl -f ./esp32.cfg

I get the following response:

Error : no device found
Error : unable to open ftdi device with vid 0403, pid8a98 , description '*' , serial '*' at bus location '*'
Error : libusb_open() failed eith LIBUDB_ERROR_ACCESS

Please help
Thanks
Imtiaz

imtiaz
Posts: 106
Joined: Wed Oct 26, 2016 1:34 am

Re: please help to get JTAG working on esp wrover kit

Postby imtiaz » Tue Mar 14, 2017 10:15 pm

got a bit further :
Open On-Chip Debugger 0.10.0-dev-g90071eb (2017-03-15-07:48)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 200 kHz
force hard breakpoints
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 8a98, description '*', serial '*' at bus location '*'
Info : clock speed 200 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.cpu0: Debug controller was reset (pwrstat=0xFF, after clear 0xFF).
Info : esp32.cpu0: Core was reset (pwrstat=0xFF, after clear 0xFF).
Info : esp32.cpu1: Debug controller was reset (pwrstat=0xFF, after clear 0xFF).
Info : esp32.cpu1: Core was reset (pwrstat=0xFF, after clear 0xFF).

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

Re: please help to get JTAG working on esp wrover kit

Postby ESP_Sprite » Thu Mar 16, 2017 4:25 am

The esp-wrover kit needs jumpers on all but the outer two positions of the header closest to the reset button for jtag to work. (The positions are labeled TMS, TDO, TDI, TCK and S_TDI.) Do you have these jumpers populated?

imtiaz
Posts: 106
Joined: Wed Oct 26, 2016 1:34 am

Re: please help to get JTAG working on esp wrover kit

Postby imtiaz » Fri Mar 17, 2017 10:04 pm

Yes - I had the jumpers on.

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

Re: please help to get JTAG working on esp wrover kit

Postby ESP_Sprite » Mon Mar 20, 2017 4:49 am

Hmm. Do you have anything connected to the pins of the devboard?

sameer
Posts: 6
Joined: Thu Jun 08, 2017 12:57 am

Re: please help to get JTAG working on esp wrover kit

Postby sameer » Thu Jun 08, 2017 1:07 am

I'm having the same issue. Nothing is connected to the board besides the shorting blocks (jumpers) at
USB 5V
JP8: TMS, TDO, TDI, TCK
JP11: RX & TX
JP14: CTS & RTS

Console output:

sameer@testWROVER: /opt/gnuarmeclipse/openocd-esp32$ ./src/openocd -s ./tcl -f ./esp32.cfg

Code: Select all

Open On-Chip Debugger 0.10.0-dev-g1bc90a1 (2017-06-08-00:39)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 200 kHz
force hard breakpoints
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 8a98, description '*', serial '*' at bus location '*'
Error: libusb_open() failed with LIBUSB_ERROR_NO_DEVICE
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description '*', serial '*' at bus location '*'
Please advise ...
Thanks for your time.

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

Re: please help to get JTAG working on esp wrover kit

Postby ESP_Sprite » Thu Jun 08, 2017 8:24 am

Sounds like your user doesn't have rights to the USB device. Can you retry running that as root? If it succeeds, you should take steps using udev to make sure your user can access the FTDI chip we use.

sameer
Posts: 6
Joined: Thu Jun 08, 2017 12:57 am

Re: please help to get JTAG working on esp wrover kit

Postby sameer » Thu Jun 08, 2017 4:15 pm

Thanks for the quick reply.

I tried the same command with sudo, but the same issue persists

sameer@testWROVER:/opt/gnuarmeclipse/openocd-esp32$ sudo ./src/openocd -s ./tcl -f ./esp32.cfg

Code: Select all

Open On-Chip Debugger 0.10.0-dev-g1bc90a1 (2017-06-08-00:39)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 200 kHz
force hard breakpoints
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 8a98, description '*', serial '*' at bus location '*'
Error: libusb_open() failed with LIBUSB_ERROR_NO_DEVICE
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description '*', serial '*' at bus location '*'
And to make sure it's not a device connectivity issue, I used GtkTerm to make sure I can see the device output (I added a printf to the blink example project), and it worked just fine.

sameer@testWROVER:/opt/gnuarmeclipse/openocd-esp32$ gtkterm -p /dev/ttyUSB1 -s 115200
gtkterm.png
gtkterm.png (32.1 KiB) Viewed 7343 times
Am I missing something?

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

Re: please help to get JTAG working on esp wrover kit

Postby ESP_Sprite » Fri Jun 09, 2017 7:47 am

Can you do a 'lsusb' and post the output here?

sameer
Posts: 6
Joined: Thu Jun 08, 2017 12:57 am

Re: please help to get JTAG working on esp wrover kit

Postby sameer » Fri Jun 09, 2017 9:33 pm

Ok ... it took some time, but I figured it out.

I was having problems due to three distinct issues
A) I didn't realize that OpenOCD needed the D2XX FTDI API
B) D2XX as a user-space API conflicts with the kernel-space driver that my Linux OS automatically loads upon connecting the WROVER-KIT, so I had to follow the instructions given in this readme by FTDI regarding unloading the driver. Specifically:

Code: Select all

If "ftdi_sio" is listed:
        Unload it (and its helper module, usbserial), as follows.

        sudo rmmod ftdi_sio
        sudo rmmod usbserial
I had to unload those two drivers every time I connected the WROVER-KIT.
C) I am using an LXC container, which did not have access to the device (it only had access to the serial files ttyUSB0 and ttyUSB1, which is why I was able to use GtkTerm with no issues). I used this guide to fix this problem.

Who is online

Users browsing this forum: Sweaps and 36 guests