JTAG Debugger

User avatar
arunbm123
Posts: 97
Joined: Fri Feb 23, 2018 5:36 am

JTAG Debugger

Postby arunbm123 » Thu Apr 11, 2019 7:32 am

dear All

Please suggest a debugger for esp32.. Also send me a link from where I can buy

I purchased 3 debuggers from AliExpress FT2232 HL and Amazon and none of them are working with esp32

User avatar
arunbm123
Posts: 97
Joined: Fri Feb 23, 2018 5:36 am

Re: JTAG Debugger

Postby arunbm123 » Fri Apr 12, 2019 5:30 am

Very Strange..

No one is using any debugger in this forum LOL.............

CalinB
Posts: 15
Joined: Tue May 08, 2018 4:20 pm

Re: JTAG Debugger

Postby CalinB » Fri Apr 12, 2019 8:14 pm

arunbm123 wrote:
Fri Apr 12, 2019 5:30 am
Very Strange..

No one is using any debugger in this forum LOL.............
i use ft2232 debuggers with esp32:
- wrover kit with integrated ft2232hl
- custom made debugger using ft2232d
and never had any problem connecting to esp32 as long the setup was correct.

I posted the setup instructions on other forum: https://community.platformio.org/t/esp3 ... er/4541/20
If you follow those instructions, it should work just fine.

mikemoy
Posts: 627
Joined: Fri Jan 12, 2018 9:10 pm

Re: JTAG Debugger

Postby mikemoy » Fri Apr 12, 2019 8:40 pm


User avatar
arunbm123
Posts: 97
Joined: Fri Feb 23, 2018 5:36 am

Re: JTAG Debugger

Postby arunbm123 » Sat Apr 13, 2019 5:16 am

Thanks CalinB

I could not succed in debugging with FT2232HL...

Can you please tell me wiring for FT232 module ?

CalinB
Posts: 15
Joined: Tue May 08, 2018 4:20 pm

Re: JTAG Debugger

Postby CalinB » Sat Apr 13, 2019 7:14 pm

arunbm123 wrote:
Sat Apr 13, 2019 5:16 am
Thanks CalinB

I could not succed in debugging with FT2232HL...

Can you please tell me wiring for FT232 module ?
I will recommend FT2232HL since it have a bigger buffer so will be faster and more reliable.
Anyway, here it is the ft232 jtag connection diagram
prog-mcusb-sch.png
prog-mcusb-sch.png (35.82 KiB) Viewed 15703 times
Please note that you will have to change the debug cfg file to match the adapter you use.
By default, ESP32 is set to work with ft2232 chip (esp-wroom-32.cfg and esp32_devkitj_v1.cfg)

alok_esp32
Posts: 4
Joined: Sat Apr 13, 2019 11:29 pm

Re: JTAG Debugger

Postby alok_esp32 » Sun Apr 14, 2019 12:48 am

Hi Experts,
I am very new to ESP32 development desperately help on JTag setup. I spend my whole day in futile attempt and running on circles.
I will very much appreciate if someone who has use JTAG in Wrover kit under Windows OS can suggest some pointers

I am able to build various ESP32 samples and mostly use serial out for debug. Now I like to use JTAG and bought Wrover Kit for the sole purpose of ease of setup install so I can focus on code. I am able to load and get serialprint to work via all paths - Arduino IDE, Eclipse as well as Windows (I am using Windows 10) command line using msys32\mingw32 build environment.. if only I can get JTAG to work

I will very much appreciate your suggestions and Thank you very much
Alok

Details below-


I followed step-by-step setup guide as well as other posts (ex: https://www.ftdichip.com/Support/Docume ... s%2010.pdf) with no luck.

Steps:
1. When I connected the board via USB board both port shows up.
2. I added the 5 jumpers as suggested for JTag (see attached)
3. Run Zadig tool to reinstall the driver for interface 0 (see picture attached).
4. I installed OpenOCD tool
5. Run openccd tool as below but it keeps reporting device not found

There are no device/sensor attached to board and its running fine (I can see the serial print message from interface 1 of UART)

I am obviously missing somethings as this has been widely used with no issue. But I am not sure what is missing. I try to build openocd source under windows but run into many build issues there so stuck


My next attempt may be to switch to Linux and see I can get any better luck. I prefer Windows environment if I can make this work

Error Log:

$ bin/openocd -s share/openocd/scripts -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp-wroom-32.cfg
Open On-Chip Debugger v0.10.0-esp32-20190313 (2019-03-13-09:57)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
none separate
adapter speed: 20000 kHz
Info : Configured 2 cores
esp32 interrupt mask on
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description '*', serial '*' at bus location '*'

Warn : Flash driver of esp32.flash does not support free_driver_priv()
Warn : Flash driver of irom does not support free_driver_priv()
Warn : Flash driver of drom does not support free_driver_priv()
Attachments
log.txt
(22.81 KiB) Downloaded 1188 times
EspWroverOpenOcdFail.PNG
EspWroverOpenOcdFail.PNG (528.75 KiB) Viewed 15658 times
file-1.jpeg
file-1.jpeg (3.52 MiB) Viewed 15658 times

CalinB
Posts: 15
Joined: Tue May 08, 2018 4:20 pm

Re: JTAG Debugger

Postby CalinB » Sun Apr 14, 2019 11:49 pm

I made a template repository for esp32 debug on Windows 10 using VsCode:

https://github.com/botofancalin/Esp32_debug_template

You will find detailed setup instructions there.

The template contain the blink project.
You can extend your project from this template.
Esp32_win_gdb_debug.jpg
Esp32_win_gdb_debug.jpg (235.8 KiB) Viewed 15616 times

alok_esp32
Posts: 4
Joined: Sat Apr 13, 2019 11:29 pm

Re: JTAG Debugger

Postby alok_esp32 » Fri Apr 19, 2019 3:25 pm

Thankyou CalinB,
Very much appreciate your help and information. I will try your suggestions again this weekend and update back

For now I have setup an Ubuntu system and jtag works seamlessly under bash shell with gdb debugger. I haven't try it under Eclipse but hope that will be no issue. I am considering moving to Linux now due to more friendly tool and environment even though I am not as verse with Linux yet

Very much appreciate your prompt help. You guys are awesome supporting and enabling the community of beginners and thank you for that

-Alok

Who is online

Users browsing this forum: Google [Bot] and 122 guests