ESP-WROVER-KIT JTAG access

User avatar
PaulVdBergh
Posts: 58
Joined: Fri Feb 23, 2018 4:45 pm
Location: Brasschaat, Belgium

ESP-WROVER-KIT JTAG access

Postby PaulVdBergh » Fri Feb 23, 2018 8:36 pm

Hi All,

This morning I received my first ESP32 development platform (ESP_WROVER_KIT). I followed the instructions per the espressif site and now I'm in trouble. I develop on Debian amd64 running in a VirtualBox under Windows10.

I was able to follow the guide up to

Code: Select all

$ make flash
$ make monitor
The next step is to setup JTAG debugging. I'm able to debug with 'sudo', but get errors without 'sudo' :

Code: Select all

paulvdbergh@TBTIoT-AMD:~/esp/openocd-esp32$ sudo bin/openocd -s share/openocd/scripts -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp32-wrover.cfg
[sudo] password for paulvdbergh: 
Open On-Chip Debugger 0.10.0-dev-ga859564 (2017-07-24-16:16)
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 : esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Debug controller was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core was reset (pwrstat=0x5F, after clear 0x0F).
^C
paulvdbergh@TBTIoT-AMD:~/esp/openocd-esp32$ bin/openocd -s share/openocd/scripts -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp32-wrover.cfg
Open On-Chip Debugger 0.10.0-dev-ga859564 (2017-07-24-16:16)
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
Error: libusb_open() failed with LIBUSB_ERROR_ACCESS
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description '*', serial '*' at bus location '*'

paulvdbergh@TBTIoT-AMD:~/esp/openocd-esp32$ lsusb
Bus 001 Device 006: ID 0403:6010 Future Technology Devices International, Ltd FT2232C Dual USB-UART/FIFO IC
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 80ee:0021 VirtualBox USB Tablet
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
paulvdbergh@TBTIoT-AMD:~/esp/openocd-esp32$ ls /dev/ttyU* -all
crw-rw-rw- 1 root dialout 188, 0 Feb 23 20:55 /dev/ttyUSB0
crw-rw-rw- 1 root dialout 188, 1 Feb 23 20:55 /dev/ttyUSB1
paulvdbergh@TBTIoT-AMD:~/esp/openocd-esp32$ groups
paulvdbergh tty dialout cdrom floppy audio dip video plugdev netdev bluetooth lpadmin scanner
paulvdbergh@TBTIoT-AMD:~/esp/openocd-esp32$ 
I'm looking for solutions for hours now, I've created an .rules file giving 0666 to the JTag device, all to no avail...

Help is very welcome.

Thanks in advance,

Paul.

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

Re: ESP-WROVER-KIT JTAG access

Postby ESP_Sprite » Sat Feb 24, 2018 3:30 am

Just to see if your udev reloaded that rules file correctly, can you reboot the VM and see what happens? If any, I can acknowledge this is probably an issue with your udev rules file.

User avatar
PaulVdBergh
Posts: 58
Joined: Fri Feb 23, 2018 4:45 pm
Location: Brasschaat, Belgium

Re: ESP-WROVER-KIT JTAG access

Postby PaulVdBergh » Sat Feb 24, 2018 10:13 am

Hi and thanks for your answer,

After rebooting the VM (and effectively even the win10, I went to bed yesterday ;) ) the problem persists.

Code: Select all

paulvdbergh@TBTIoT-AMD:~$ cd esp/openocd-esp32/
paulvdbergh@TBTIoT-AMD:~/esp/openocd-esp32$ bin/openocd -s share/openocd/scripts -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp32-wrover.cfg
Open On-Chip Debugger 0.10.0-dev-ga859564 (2017-07-24-16:16)
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
Error: libusb_open() failed with LIBUSB_ERROR_ACCESS
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description '*', serial '*' at bus location '*'

paulvdbergh@TBTIoT-AMD:~/esp/openocd-esp32$ cat /etc/udev/rules.d/50-myusb.rules 
KERNEL=="ttyUSB[0-9]*",MODE="0666"

ATTR{idProduct}=="6010", ATTR{idVendor}=="0403", MODE="666"

paulvdbergh@TBTIoT-AMD:~/esp/openocd-esp32$ 
Apologies for my ignorance on linux administration, I'm more confident with C/C++, but I've only added the 50-myusb.rules file into the /etc/udev/rules.d directory. Do I have to do something extra to take the rules in effect? Am I missing something else?

Regards,
Paul.

gnorkus
Posts: 35
Joined: Thu Mar 22, 2018 12:41 pm

Re: ESP-WROVER-KIT JTAG access

Postby gnorkus » Mon Apr 02, 2018 5:17 pm

Hi,

Similar but different problem. I'm running Ubuntu WSL (on Windows 10). I can program my rover kit, but, I cannot use the openocd debugger. My Device Manager shows two USB Serial devices, COM12 and COM13. COM13 is the tty port that displays output. COM12 is likely the jtag port. Below is a list of my output after the command is entered. Any suggestions?

Code: Select all

gnork@DESKTOP-KH4TECI:~/esp32/openocd-esp32$ sudo bin/openocd -s share/openocd/scripts -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp32-wrover.cfg
Open On-Chip Debugger 0.10.0-dev-ga859564 (2017-07-24-16:16)
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
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description '*', serial '*' at bus location '*'

gnork@DESKTOP-KH4TECI:~/esp32/openocd-esp32$

Who is online

Users browsing this forum: markkuk and 88 guests