Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • 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
 
Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 8 Replies) ESP32-C3-DevKitC-02 debug/upload issue with ESP-PROG (Read 6580 times)
Marco (Italy)
Full Member
***
Offline


Posts: 165
Joined: Jul 12th, 2019
ESP32-C3-DevKitC-02 debug/upload issue with ESP-PROG
Jul 3rd, 2022 at 7:31am
Print Post  
Hi Simon
this is the first time try to develop sw using ESP32. I followed your tutorial but there is mode to upload and debug my sketch.
hardware connection
ESP32-C3DEVKIT      ESP-prog
TMS  ----------------  TMS
TDI   ----------------  TDI
TDO  ----------------  TDO
TCK  ----------------   TCK
GND ----------------   GND
3V3 -----------------   3V3 (the ESP32 is not powered on his USB)

The verbose output is in attach.
best
Marco
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Marco (Italy)
Full Member
***
Offline


Posts: 165
Joined: Jul 12th, 2019
Re: ESP32-C3-DevKitC-02 debug/upload issue with ESP-PROG
Reply #1 - Jul 3rd, 2022 at 12:00pm
Print Post  
Hi!
update on issue

Now I have installed ESP32C3 board 2.0 on Arduino IDE. Using the Arduino IDE via serial I can compile and upload on ESP32C3. On Visual Studio, now I can see and selected the right board ESP32C3, but there is a problem on compiling. The verbose output is in attach

can you help me?
  

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP32-C3-DevKitC-02 debug/upload issue with ESP-PROG
Reply #2 - Jul 3rd, 2022 at 1:29pm
Print Post  
Thanks for the output. Please also switch on the "show build properties" mentioned above. Then the output will show your config. Thanks
  
Back to top
WWW  
IP Logged
 
Marco (Italy)
Full Member
***
Offline


Posts: 165
Joined: Jul 12th, 2019
Re: ESP32-C3-DevKitC-02 debug/upload issue with ESP-PROG
Reply #3 - Jul 3rd, 2022 at 6:03pm
Print Post  
Hi he the file verbose output with show build properties

there are two strange things:
1. the error has changed there is no longer a compilation error
2. the ESP32 card disappears from the list and yet it is perfectly installed. In fact, it is always available in the standard Arduino IDE. Then, after a while, it magically reappears in the list.

Shocked
  

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP32-C3-DevKitC-02 debug/upload issue with ESP-PROG
Reply #4 - Jul 3rd, 2022 at 7:07pm
Print Post  
Please uncheck "Upload using programmer".
« Last Edit: Jul 3rd, 2022 at 7:08pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Marco (Italy)
Full Member
***
Offline


Posts: 165
Joined: Jul 12th, 2019
Re: ESP32-C3-DevKitC-02 debug/upload issue with ESP-PROG
Reply #5 - Jul 4th, 2022 at 4:34am
Print Post  
Hi!
My HW debugger is connected and is ESP-PROG (JTAG)

the VM is set with:
uploader:  F2232dualRS232
debugger: hardware, F2232dualRS232, no optimization

the verbose output file is in attach
Grin
  

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


Posts: 2142
Joined: Feb 13th, 2019
Re: ESP32-C3-DevKitC-02 debug/upload issue with ESP-PROG
Reply #6 - Jul 4th, 2022 at 9:46am
Print Post  
Thanks for the detail.

To use the ESP32-C3 with the JTAG pins for debugging, a few things need to be configured:
Documentation: https://www.visualmicro.com/page/ESP32C3-JTAG-Debugging.aspx

1) Update the board package to v2.0.3 to avoid issues with the GDB.exe packaged into it.
2) Change the fuse bits to allow the JTAG pins to be used either by bootstrapping a pin, or permanently disable the USB-JTAG adapter.
3) Add the local board.txt entries to use the later version of OpenOCD which contains the configuration for the ESP32-C3.

The Upload using programmer option does not function correctly at present and always results in a reboot loop, so this should be set back to "No Programmer (default)", and the standard serial upload should be used, as in the Arduino IDE.

If your board is one of the Dev boards it may be worth reviewing the USB-JTAG adapter built into it, which doesn't require the ESP-PROG (but still has the same limitation on uploads via Serial):
Documentation: https://www.visualmicro.com/page/ESP32C3-USB-Debugging.aspx
Video Guide: https://www.youtube.com/watch?v=A59frxEvs7M
  
Back to top
 
IP Logged
 
Marco (Italy)
Full Member
***
Offline


Posts: 165
Joined: Jul 12th, 2019
Re: ESP32-C3-DevKitC-02 debug/upload issue with ESP-PROG
Reply #7 - Jul 4th, 2022 at 3:22pm
Print Post  
Hi Simon!
a little update.
1) Now my board is ESP32 2.0.3 
2) Using  VM now I can compile and upload the software via Serial UPLOADER without any error

Now, the problem for me is to get to debugging, possibly with JTAG. Using the fuse analysis tool on ESP32, I saw that the JTAG fuse is not blown. Now, the problem for me is that if I burn the fuse, I run the risk of losing the only way I have now to load the software, which is via Serial. In summary, in order to get a complete tool chain I need to enable uploading and debugging via JTAG.  Next step ?

... nice your web debugger, cool idea!
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2142
Joined: Feb 13th, 2019
Re: ESP32-C3-DevKitC-02 debug/upload issue with ESP-PROG
Reply #8 - Jul 4th, 2022 at 4:24pm
Print Post  
Thanks for the update.

Burning the JTAG_SEL_ENABLE fuse will allow you to select the JTAG pins by pulling GPIO10 LOW during boot (if you have GPIO10 on your board of course).
Burning the DIS_USB_JTAG fuse will permanently disable USB-JTAG.

Neither of these will affect the Serial upload to our knowledge, they just affect whether the USB-JTAG is available (we have burned the DIS_USB_JTAG fuse on our ESP-C3-01M module and that still allows Serial upload to function correctly).

The USB-JTAG approach avoids having to alter any fuse bits, depending on the board you have, and only requires a USB lead and a few connections.
  
Back to top
 
IP Logged
 
Marco (Italy)
Full Member
***
Offline


Posts: 165
Joined: Jul 12th, 2019
Re: ESP32-C3-DevKitC-02 debug/upload issue with ESP-PROG
Reply #9 - Jul 4th, 2022 at 4:56pm
Print Post  
Hi Simon
thanks for your pertinent comments. what do you mean about JTAG-USB? Because I'm using a ESP-PROG , is there another JTAG different connection, if yes is this supported by VM
Smiley
best
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2142
Joined: Feb 13th, 2019
Re: ESP32-C3-DevKitC-02 debug/upload issue with ESP-PROG
Reply #10 - Jul 4th, 2022 at 5:01pm
Print Post  
The USB-JTAG is in-built on the ESP-32 Dev boards, and to my knowledge on all ESP32-C3 modules which have GPIO 18 and 19 available.  Using this initially avoids having to burn the fuses, and of course leaves all options open for the future.

This means you do not need the ESP-PROG at all, and just need a USB lead where you can access the VCC/GND/Data+/Data- Lines (whether by rewiring or if you have a breakout which fits on the end).

It is supported in Visual Micro, with the documentation and a walkthrough video of this working below:
Documentation: https://www.visualmicro.com/page/ESP32C3-USB-Debugging.aspx
Video Guide: https://www.youtube.com/watch?v=A59frxEvs7M
  
Back to top
 
IP Logged
 
Marco (Italy)
Full Member
***
Offline


Posts: 165
Joined: Jul 12th, 2019
Re: ESP32-C3-DevKitC-02 debug/upload issue with ESP-PROG
Reply #11 - Jul 5th, 2022 at 6:50am
Print Post  
Hi Simon,
thanks for your steps!
Now my configuration is:
PIO18 connected to green wire usb
PIO19 connected to white wire  usb
5V to red wire usb (red LED is ON)
GND to black usb

Now, the ZADIG utility doesn't show me the USB- JTAGserial option driver in menu and VM doesn't recognize the ESP32C3.

my ZADIP setting are:
options>list alla devices >

can you help me?
best




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


Posts: 2142
Joined: Feb 13th, 2019
Re: ESP32-C3-DevKitC-02 debug/upload issue with ESP-PROG
Reply #12 - Jul 5th, 2022 at 8:39am
Print Post  
Can you confirm if swapping the wires on pins 18 and 19 changes whether it shows up in Zadig?

Have you changed any fuses at this point?  (DIS_USB_JTAG should still be False)
  
Back to top
 
IP Logged
 
Marco (Italy)
Full Member
***
Offline


Posts: 165
Joined: Jul 12th, 2019
Re: ESP32-C3-DevKitC-02 debug/upload issue with ESP-PROG
Reply #13 - Jul 5th, 2022 at 9:35am
Print Post  
Hi Simon
we are near to solved my ESP32 issue!
USB driver is installed, was swapping pins problem.
Now I can upload, but the debug do not start.
In attach the output file.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Marco (Italy)
Full Member
***
Offline


Posts: 165
Joined: Jul 12th, 2019
Re: ESP32-C3-DevKitC-02 debug/upload issue with ESP-PROG
Reply #14 - Jul 5th, 2022 at 10:06am
Print Post  
to complete your questions:

Usb Config fuses:
DIS_USB_JTAG (BLOCK0)                              Disables USB JTAG. JTAG access via pads is control = False R/W (0b0)
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2142
Joined: Feb 13th, 2019
Re: ESP32-C3-DevKitC-02 debug/upload issue with ESP-PROG
Reply #15 - Jul 5th, 2022 at 10:42am
Print Post  
Thanks for the detail.

If you ensure there are no instances of OpenOCD.exe running in Task Manager, then try running the command below and attach the output it should reveal more about the issue:
Code
Select All
"C:/ProgramData/vmicro/tools/openocd-esp32-0.10.1-2021.07.21/bin/openocd.exe" -d2 -c "adapter_khz 5000" -s ts/" -f ts/interface/../board/esp32c3-builtin.cfg" -c "set ESP32_RTOS none" -c "init; reset halt" 

« Last Edit: Jul 5th, 2022 at 10:42am by Simon@Visual Micro »  
Back to top
 
IP Logged
 
Marco (Italy)
Full Member
***
Offline


Posts: 165
Joined: Jul 12th, 2019
Re: ESP32-C3-DevKitC-02 debug/upload issue with ESP-PROG
Reply #16 - Jul 5th, 2022 at 12:00pm
Print Post  
Hi Simon

openocd.exe" -d2 -c "adapter_khz 5000" -s ts/" -f ts/interface/../board/esp32c3-builtin.cfg" -c "set ESP32_RTOS none" -c "init; reset halt"
Open On-Chip Debugger  v0.10.0-esp32-20210721 (2021-07-21-13:35)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
debug_level: 2

adapter speed: 5000 kHz

Info : only one transport option; autoselect 'jtag'
Warn : Transport "jtag" was already selected
none
Error: libusb_open() failed with LIBUSB_ERROR_NOT_FOUND
Error: esp_usb_jtag: could not find or open device!
  
Back to top
 
IP Logged
 
Marco (Italy)
Full Member
***
Offline


Posts: 165
Joined: Jul 12th, 2019
Re: ESP32-C3-DevKitC-02 debug/upload issue with ESP-PROG
Reply #17 - Jul 5th, 2022 at 12:02pm
Print Post  
Open On-Chip Debugger  v0.10.0-esp32-20210721 (2021-07-21-13:35)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
debug_level: 2

adapter speed: 5000 kHz

Info : only one transport option; autoselect 'jtag'
Warn : Transport "jtag" was already selected
none
Error: libusb_open() failed with LIBUSB_ERROR_NOT_FOUND
Error: esp_usb_jtag: could not find or open device!
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2142
Joined: Feb 13th, 2019
Re: ESP32-C3-DevKitC-02 debug/upload issue with ESP-PROG
Reply #18 - Jul 5th, 2022 at 12:35pm
Print Post  
The "Error: esp_usb_jtag: could not find or open device!" seems to suggest it cannot see the board.

Just to check:-
Do you have the WinUSB driver installed for Interface 2 of the USB JTAG/serial debug unit?
Is the modified USB lead (connected to GPIO18+19 and VCC+GND) connected to your PC?
  
Back to top
 
IP Logged
 
Marco (Italy)
Full Member
***
Offline


Posts: 165
Joined: Jul 12th, 2019
Re: ESP32-C3-DevKitC-02 debug/upload issue with ESP-PROG
Reply #19 - Jul 5th, 2022 at 1:42pm
Print Post  
Hi Simon
using the zadi tool the situation is in attach pic.
Marco
Smiley
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint