Page 1 of 2
please help to get JTAG working on esp wrover kit
Posted: Tue Mar 14, 2017 8:40 pm
by imtiaz
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
Re: please help to get JTAG working on esp wrover kit
Posted: Tue Mar 14, 2017 10:15 pm
by imtiaz
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).
Re: please help to get JTAG working on esp wrover kit
Posted: Thu Mar 16, 2017 4:25 am
by ESP_Sprite
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?
Re: please help to get JTAG working on esp wrover kit
Posted: Fri Mar 17, 2017 10:04 pm
by imtiaz
Yes - I had the jumpers on.
Re: please help to get JTAG working on esp wrover kit
Posted: Mon Mar 20, 2017 4:49 am
by ESP_Sprite
Hmm. Do you have anything connected to the pins of the devboard?
Re: please help to get JTAG working on esp wrover kit
Posted: Thu Jun 08, 2017 1:07 am
by sameer
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.
Re: please help to get JTAG working on esp wrover kit
Posted: Thu Jun 08, 2017 8:24 am
by ESP_Sprite
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.
Re: please help to get JTAG working on esp wrover kit
Posted: Thu Jun 08, 2017 4:15 pm
by sameer
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 (32.1 KiB) Viewed 20278 times
Am I missing something?
Re: please help to get JTAG working on esp wrover kit
Posted: Fri Jun 09, 2017 7:47 am
by ESP_Sprite
Can you do a 'lsusb' and post the output here?
Re: please help to get JTAG working on esp wrover kit
Posted: Fri Jun 09, 2017 9:33 pm
by sameer
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.