Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Problem debugging ESP32 using ESP PROG board (Read 174 times)
JoHa
Newbies
*
Offline



Posts: 3
Problem debugging ESP32 using ESP PROG board
Jun 6th, 2022 at 5:07am
 
Having a problem debugging my code on my ESP32 C3 01M using vMicro and ESP Prog with Visual Studio 2019.
I updated the usb driver "Dual RS232-HS (Interface 0) using Zadig 2.7.765.

I would like your help to understand and solve the issue.

Here the full Micro Build output window:
esptool.py v3.1
Merged 2 ELF sections
Program size: 170,716 bytes (used 13% of a 1,310,720 byte maximum) (5.90 secs)
Minimum Memory Usage: 9168 bytes (3% of a 327680 byte maximum)

Uploading 'DebuggerPrj' to 'ESP32C3 Dev Module' using 'ESP32 PROG'
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
debug_level: 0
adapter speed: 2000 kHz
esp32 interrupt mask on
****[vMicro]**** Uploading App :Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
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
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
Error during upload using programmer
The uploader process failed

The uploader process failed
The uploader returned an error
Back to top
 

Please Register or Login to the Forum to see File Attachments
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline



Posts: 1361
Re: Problem debugging ESP32 using ESP PROG board
Reply #1 - Jun 7th, 2022 at 10:26am
 
Thanks for the report.

Can you confirm the full model of the ESP32C3 board you are using?

They are often setup for the onboard USB debug probe, which means external probes do not work without altering the fuse bits on the board (which cannot be undone):
USB Debugging: https://www.visualmicro.com/page/ESP32C3-USB-Debugging.aspx
Back to top
 
 
IP Logged
 
JoHa
Newbies
*
Offline



Posts: 3
Re: Problem debugging ESP32 using ESP PROG board
Reply #2 - Jun 7th, 2022 at 10:53am
 
Hi,
The full model name is ESP-C3 01M.
Back to top
 
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline



Posts: 1361
Re: Problem debugging ESP32 using ESP PROG board
Reply #3 - Jun 7th, 2022 at 11:12am
 
Thanks for the information, so this is just the ESP32 C3 01M without a full dev board built around it.

Can you confirm the connections are the same as on the page below:
https://www.visualmicro.com/page/ESP32C3-JTAG-Debugging.aspx

You will also need to add the local board.txt entries shown on that page as well to allow the debugging/upload to work.
Back to top
 
 
IP Logged
 
JoHa
Newbies
*
Offline



Posts: 3
Re: Problem debugging ESP32 using ESP PROG board
Reply #4 - Jun 12th, 2022 at 6:13pm
 
Hey,

The JTAG wiring is correct.
I do burn the fuse DIS_USB_JTAG and now I get another error:

esptool.py v3.1
Merged 2 ELF sections

Program DebuggerPrj size: 193,278 bytes (used 15% of a 1,310,720 byte maximum) (46.88 secs)
Minimum Memory Usage: 9288 bytes (3% of a 327680 byte maximum)

Uploading 'DebuggerPrj' to 'ESP32C3 Dev Module' using 'ESP32 PROG'
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
debug_level: 0
adapter speed: 2000 kHz
esp32 interrupt mask on
****[vMicro]**** Uploading App :Error: JTAG tap: esp32.cpu0  expected 1 of 1: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Error: JTAG tap: esp32.cpu1  expected 1 of 1: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Error: Trying to use configured scan chain anyway...
Error: esp32.cpu1: IR capture error; saw 0x1f not 0x01
Error: JTAG tap: esp32.cpu0  expected 1 of 1: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Error: JTAG tap: esp32.cpu1  expected 1 of 1: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Error: Trying to use configured scan chain anyway...
Error: esp32.cpu1: IR capture error; saw 0x1f not 0x01
Error during upload using programmer
The uploader process failed

The uploader process failed
The uploader returned an error

Back to top
 
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline



Posts: 11355
United Kingdom
Re: Problem debugging ESP32 using ESP PROG board
Reply #5 - Jun 12th, 2022 at 8:46pm
 
Back to top
 

Tim Leek
home
WWW  
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline



Posts: 1361
Re: Problem debugging ESP32 using ESP PROG board
Reply #6 - Jun 13th, 2022 at 11:57am
 
Can you confirm you have added the local board.txt file (vMicro > Add Code > Add Local Board.txt), and the below entries:-

Code:
debug.toolingsystem=gdbscript
# Most stable OpenOCD Version for newer ESP32 Boards
tools.openocd.debug.path={runtime.tools.openocd-esp32-0.10.1-2021.07.21.path}
tools.openocd.program.path={runtime.tools.openocd-esp32-0.10.1-2021.07.21.path}
tools.openocd.upload.path={runtime.tools.openocd-esp32-0.10.1-2021.07.21.path}
 

Back to top
 
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline



Posts: 1361
Re: Problem debugging ESP32 using ESP PROG board
Reply #7 - Jun 22nd, 2022 at 9:50am
 
Just to update on this (now we have the same exact chip setup, with the DIS_USB_JTAG fuse burned):

Upload via ESP-PROG:
There appear to be issues with this in all environments leading the ESP to constantly reboot, we will update when there is progress on this.  The only alternative we know at present for this is to use a USB-TTL Serial adapter and set the Upload tool to "No Programmer (Default)" (ensure GPIO9 is held LOW to upload via Serial)

Debugging:
We have successfully had this working with the additional board.txt entries from the documentation page, and then after upload via Serial, using Debug > Attach to Process.

Can you show an image of your wiring if you still have issues so we can compare to our setup?
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print