VS Arduino
>> >> Problem debugging ESP32 using ESP PROG board
https://www.visualmicro.com/forums/YaBB.pl?num=1654488422

Message started by JoHa on Jun 6th, 2022 at 4:07am

Title: Problem debugging ESP32 using ESP PROG board
Post by JoHa on Jun 6th, 2022 at 4: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

Zadig.png ( 23 KB | 0 Downloads )
vMicro_Config.png ( 9 KB | 0 Downloads )

Title: Re: Problem debugging ESP32 using ESP PROG board
Post by Simon@Visual Micro on Jun 7th, 2022 at 9: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

Title: Re: Problem debugging ESP32 using ESP PROG board
Post by JoHa on Jun 7th, 2022 at 9:53am
Hi,
The full model name is ESP-C3 01M.

Title: Re: Problem debugging ESP32 using ESP PROG board
Post by Simon@Visual Micro on Jun 7th, 2022 at 10: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.

Title: Re: Problem debugging ESP32 using ESP PROG board
Post by JoHa on Jun 12th, 2022 at 5: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


Title: Re: Problem debugging ESP32 using ESP PROG board
Post by Tim@Visual Micro on Jun 12th, 2022 at 7:46pm
Does this link help?

https://www.esp32.com/viewtopic.php?t=14069

Title: Re: Problem debugging ESP32 using ESP PROG board
Post by Simon@Visual Micro on Jun 13th, 2022 at 10: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}
[/code]

Title: Re: Problem debugging ESP32 using ESP PROG board
Post by Simon@Visual Micro on Jun 22nd, 2022 at 8: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?

VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.