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 Send TopicPrint
Hot Topic (More than 8 Replies) ESP32 with ESP-PROG won't start debugging (Read 4513 times)
DJ4000
Junior Member
**
Offline


Posts: 15
Location: Denmark
Joined: Jun 25th, 2017
ESP32 with ESP-PROG won't start debugging
May 17th, 2020 at 9:25am
Print Post  
Upon clicking on "Start Debugging" using VS2019 and VSMicro, I have a successful compilation and upload to the ESP32 board (Adafruit ESP32 Feather), however I don't receive any message related to the start of the debugger session.  I had to unzip openocd myself as it was missing and not log for openocd are produced.  I have followed all the instructions regarding the installation of the USB driver, the cabling looks correct, debug mode, no optimization and Serial->Hardware selected with the ESP-PROG.  Not sure how to take it from here?

I have attached the end of the output file with Compiler and Uploader in verbose.
« Last Edit: May 17th, 2020 at 9:26am by DJ4000 »  

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 with ESP-PROG won't start debugging
Reply #1 - May 17th, 2020 at 10:41am
Print Post  
Thanks for the output but it is missing the build properties

Quote:
vMicro > Compiler > Show Build Properties and Verbose
  
Back to top
WWW  
IP Logged
 
DJ4000
Junior Member
**
Offline


Posts: 15
Location: Denmark
Joined: Jun 25th, 2017
Re: ESP32 with ESP-PROG won't start debugging
Reply #2 - May 17th, 2020 at 11:20am
Print Post  
I have attached the entire output now.
  

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


Posts: 2145
Joined: Feb 13th, 2019
Re: ESP32 with ESP-PROG won't start debugging
Reply #3 - May 17th, 2020 at 1:08pm
Print Post  
Thanks for the output.

If there is no log at this location (which from the above there isnt)
Code
Select All
ebug/ESP32_Garden_Hub.ino_DebugOpenOCD.log 



Please try running the below command in the command line:- (with board and debugger all connected as normal)
Code
Select All
C:\ProgramData\vmicro\tools\openocd-espressif-esp32-10.0.1\bin/openocd.exe -d2 -s s/" -f s/interface/ftdi/minimodule-lowcost.cfg" -c "set ESP32_RTOS none" -f s/board/esp-wroom-32.cfg" -c "init" 



This should give more output as to what the problem is, please post this output or the log back when possible.
« Last Edit: May 17th, 2020 at 1:09pm by Simon@Visual Micro »  
Back to top
 
IP Logged
 
DJ4000
Junior Member
**
Offline


Posts: 15
Location: Denmark
Joined: Jun 25th, 2017
Re: ESP32 with ESP-PROG won't start debugging
Reply #4 - May 17th, 2020 at 5:59pm
Print Post  
Clean the solution, delete VMBuilds and start debug again. Now I get a log file created (attached).  I got the message from vsmicro (attached).  Only the Esp32 board and the ESP-PROG are connected (attached).
C:\Users\didie\Pictures\SavedPictures\COMports.png
  

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


Posts: 2145
Joined: Feb 13th, 2019
Re: ESP32 with ESP-PROG won't start debugging
Reply #5 - May 18th, 2020 at 10:23am
Print Post  
Thanks for the logs and information.

In the logs it shows the below message which is normally seen when the USB Driver has not been updated:
Code
Select All
Error: unable to open ftdi device with vid 0403, pid 6010, description 'Dual RS232-HS', serial '*' at bus location '*' 



Can you confirm you have used the Zadig tool to update the driver for this device on Interface 0?
  
Back to top
 
IP Logged
 
DJ4000
Junior Member
**
Offline


Posts: 15
Location: Denmark
Joined: Jun 25th, 2017
Re: ESP32 with ESP-PROG won't start debugging
Reply #6 - May 21st, 2020 at 8:25am
Print Post  
Hi, sorry for the delay.  Busy week at work  Cool.
First, yes I did use Zadic to replace the driver. I have then switch the hardware from the Adafruit ESP32 to the Espressif DEvkitC and now the debugger is working just fine.
I have ordered another ESP-PROG, so I can try again with the Adafruit board without unplugging the one that works now.
In desperation, I also download and install PlatformIO last week, could that had an influence on vsmicro?
Thank you so much for your help.  I will keep you posted on the second attempt with the Adafruit board.
« Last Edit: May 21st, 2020 at 8:26am by DJ4000 »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: ESP32 with ESP-PROG won't start debugging
Reply #7 - May 21st, 2020 at 1:56pm
Print Post  
Thanks for the update and glad it is all working.

I don't believe PlatformIO should have an effect on the drivers, and we require the updated driver due to the software we use to communicate with the debugger.

I would expect the Adafruit ESP32 Feather board to work as expected, and let us know if there are any issues (NOTE: the driver may need installing again for the Adafruit board)

We have also published a video for Troubleshooting Hardware Debugging which works through this issue along with others, and links to the Troubleshooter Guide as well.
  
Back to top
 
IP Logged
 
DJ4000
Junior Member
**
Offline


Posts: 15
Location: Denmark
Joined: Jun 25th, 2017
Re: ESP32 with ESP-PROG won't start debugging
Reply #8 - Jun 8th, 2020 at 8:04am
Print Post  
Hi again,
Seems that I am in trouble again.
1. Is it so that I should be able to upload the code to the esp32 as usual (using the usb) while connected to the ESP-PROG?
At the moment that do not seems to work.  I have the following message:
Uploading 'ESP32Interrupt' to 'ESP32 Dev Module' using 'COM5'
Uploader started for board ESP32 Dev Module
Upload method will be: bootloader
Uploading via Bootloader 
tool.exe --chip esp32 --port "COM5" --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 s/partitions/boot_app0.bin" 0x1000 s/sdk/bin/bootloader_dio_80m.bin" 0x10000 pt.ino.bin" 0x8000 pt.ino.partitions.bin"
esptool.py v2.6
Serial port COM5
Connecting....
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, Coding Scheme None
MAC: 24:0a:c4:09:b7:fc
Uploading stub...
esptool.py v2.6
Serial port COM5
Connecting....
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, Coding Scheme None
MAC: 24:0a:c4:09:b7:fc
Uploading stub...
Running stub...

The uploader returned an error
Running stub...
# Copy build result to 'Project>Property Pages>Intermediate Directory'
# Destination: file:///C:/Users/didie/Documents/Arduino/ESP32Interrupt/Debug/

Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Warning: Could not auto-detect Flash size (FlashID=0xffffff, SizeID=0xff), defaulting to 4MB
Compressed 8192 bytes to 47...
A fatal error occurred: Timed out waiting for packet content

2. If I use the attach process, the system timeout on listening to 3333.
adapter speed: 2000 kHz
Info : Configured 2 cores
esp32 interrupt mask on
Info : clock speed 2000 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 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : esp32: Core 0 was reset (pwrstat=0x5F, after clear 0x0F).
Info : Listening on port 3333 for gdb connections
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : accepting 'gdb' connection on tcp/3333
Info : Target halted. PRO_CPU: PC=0x40062299 (active)    APP_CPU: PC=0x00000000
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: ESP32 with ESP-PROG won't start debugging
Reply #9 - Jun 8th, 2020 at 8:37am
Print Post  
I believe you should be able to upload via USB or via the programmer.  Have you tried disconnecting the Programmer from the PC when uploading via USB?

Can you enable the vMicro > Uploader > Verbose,. along with the options for verbose shown in the yellow box at the top, and re-try the uploads, and attach the logs?

#2 looks correct from what I can see there, but having all of the output will make it clearer.
  
Back to top
 
IP Logged
 
DJ4000
Junior Member
**
Offline


Posts: 15
Location: Denmark
Joined: Jun 25th, 2017
Re: ESP32 with ESP-PROG won't start debugging
Reply #10 - Jun 8th, 2020 at 9:08am
Print Post  
When I disconnect the ESP-PROG from the USB I can upload the code but obviously the debug session is not starting then.
Log attached.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
DJ4000
Junior Member
**
Offline


Posts: 15
Location: Denmark
Joined: Jun 25th, 2017
Re: ESP32 with ESP-PROG won't start debugging
Reply #11 - Jun 8th, 2020 at 9:20am
Print Post  
Just an additional comment, I haven't connected VCC from the ESP-PROG to the ESP32 DevKit since the ESP32DevKit is already powered by the USB.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: ESP32 with ESP-PROG won't start debugging
Reply #12 - Jun 8th, 2020 at 9:39am
Print Post  
Thanks for the log and the additional note.  I would normally connect the VCC between the ESP-PROG and the ESP32, when using the Debugger / Programming uploader (and set the jumper to 3v3)

Could you try the upload via the programmer again, and attach the output?   

The USB Uploads can conflict with the programmer being attached, and there is an additional USB-Serial interface on the ESP-PROG, which can be connected to the Rx/Tx on the ESP to perform uploads, as well of course as using the JTAG upload via programmer.

  
Back to top
 
IP Logged
 
DJ4000
Junior Member
**
Offline


Posts: 15
Location: Denmark
Joined: Jun 25th, 2017
Re: ESP32 with ESP-PROG won't start debugging
Reply #13 - Jun 8th, 2020 at 11:45am
Print Post  
I don't know how to do that to be honest.  Do you have a link with instructions I can follow to connect and start the upload via the programmer instead of the USB on the board?
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: ESP32 with ESP-PROG won't start debugging
Reply #14 - Jun 8th, 2020 at 12:45pm
Print Post  
To upload using the programmer (via JTAG), are the same connections as when you are debugging, along with changing the vMicro > Uploader > Hardware Programmer to the correct option, and then performing the upload again.
https://www.visualmicro.com/page/User-Guide.aspx?doc=Upload-and-Run.html

Uploading using the USB>Serial on the ESP-PROG is wired into the PROG interface on the board, and all pinouts for this programmer can be found in the documentation (below), but this is more often used when you have a target with no USB interface of its own.
https://github.com/espressif/esp-iot-solution/blob/master/documents/evaluation_b...



  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint