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 3  Send TopicPrint
Very Hot Topic (More than 25 Replies) ESP32 programming and debugging with ESP-prog not work (Read 13111 times)
espprog
Junior Member
**
Offline


Posts: 34
Joined: Jan 25th, 2022
ESP32 programming and debugging with ESP-prog not work
Jan 26th, 2022 at 7:08am
Print Post  
Dear Forum !

I want to program and debug an ESP WROOM32D processor using ESP-Prog.
The USB channels of the ESP-Prog are set correctly,
Channel 0: libusb-win32 (v1.2.6.0)
Channel 1: USB Serial (CDC).

Programming on the virtual serial port of channel 1 and channel 0 for debugging.

Connecting ESP-Prog (program and JTAG) to the ESP32 board is as described in the documents.

Unfortunately, neither programming nor debugging works, I get an error message for both.

I have attached the contents of the output windows to my letter.
Thanks in advance for all the help:

safi
  

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


Posts: 2441
Joined: Feb 13th, 2019
Re: ESP32 programming and debugging with ESP-prog not work
Reply #1 - Jan 26th, 2022 at 10:20am
Print Post  
Thanks for the report.

Channel 0 needs to have the WinUSB Driver installed to allow the software to communicate with it:
https://www.visualmicro.com/page/Zadig-Driver-Installation-Guide.aspx

Once installed, please perform the upload to the ESP via USB (not through the programmer).

Then enable vMicro > Upload > Verbose. Then try and run Debug > Attach to Process.

If this fails a log file will be generated in the build folder, which you can find using the instructions here, which will show more information:
https://www.visualmicro.com/page/Troubleshooter-for-Debugging-an-Arduino-Sketch-...
  
Back to top
IP Logged
 
espprog
Junior Member
**
Offline


Posts: 34
Joined: Jan 25th, 2022
Re: ESP32 programming and debugging with ESP-prog not work
Reply #2 - Jan 26th, 2022 at 11:07am
Print Post  
Thanks Simon !

I apologize for writing the USB 0 channel driver incorrectly in my previous message.
Driver for ESP-Prog Channel 0: WinUSB (v6.1.7600.16385).
The x.log file attached to your previous letter has already been created with this.

I can't interpret the following sentence in your answer:

"Once installed, please perform the upload to the ESP via USB (not through the programmer)."

How do I program?
With the ESP-Prog JTAG cable?
How to do it?
I can only program the ESP32 processor via a USB virtual serial port, but not with ESP-Prog, but with a simple USB-TTL converter (USB-SERIAL CH-340).

Thank you for your help, in advance.

safi

  
Back to top
 
IP Logged
 
espprog
Junior Member
**
Offline


Posts: 34
Joined: Jan 25th, 2022
Re: ESP32 programming and debugging with ESP-prog not work
Reply #3 - Jan 26th, 2022 at 11:42am
Print Post  
I tried to set up USB (non-serial port) programming (on ESP-Prog JTAG cable) but failed.
The system always searches for a serial port for programming / uploading.

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


Posts: 2441
Joined: Feb 13th, 2019
Re: ESP32 programming and debugging with ESP-prog not work
Reply #4 - Jan 26th, 2022 at 12:02pm
Print Post  
Apologies, I mean perform the programming via your USB-TTL Converter.

The previous logs show it was being done via the ESP-PROG.

If you ensure the vMicro > Uploader > Hardware Programmer is set to No Programmer (Default), and then select your USB-TTL COM Port, and perform the Build and Upload, the code should make it onto the board.

Then set the verbose option, and try attaching the debugger, this should give us the log file about where the issue lies.
  
Back to top
IP Logged
 
espprog
Junior Member
**
Offline


Posts: 34
Joined: Jan 25th, 2022
Re: ESP32 programming and debugging with ESP-prog not work
Reply #5 - Jan 26th, 2022 at 1:25pm
Print Post  
I'm so sorry I can start debugging so hard!
I'm not setting something right, it could be a mistake.

I tried to program ESP with a USB-TTL converter.
It did not go with ESP-Prog channel 1 (COMxxx).
By connecting a CH340 USB-TTL converter to the serial connectors instead of ESP-Prog, programming was successful.

Programming does not work with ESP-Prog channel 1 (COMxxx).
I don't have a log file for this, I can attach the output.
  

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


Posts: 2441
Joined: Feb 13th, 2019
Re: ESP32 programming and debugging with ESP-prog not work
Reply #6 - Jan 26th, 2022 at 1:48pm
Print Post  
Thanks for the detail.

You said "By connecting a CH340 USB-TTL converter to the serial connectors instead of ESP-Prog, programming was successful.", however the attached log does not show the successful upload.

Also you have changed the Debugger to Serial (vMicro > Debugger > Debug:Serial).  Please change this option back to Debug:Hardware, and also select the vMicro > Debugger >  Hardware Programmer:ESP32 PROG

Once these options are changed, please re-upload the code using the CH340 USB-TTL converter.
  
Back to top
IP Logged
 
espprog
Junior Member
**
Offline


Posts: 34
Joined: Jan 25th, 2022
Re: ESP32 programming and debugging with ESP-prog not work
Reply #7 - Jan 27th, 2022 at 10:14am
Print Post  
Thank you so much for your help so far!
I'm pausing the hardware debug now. (Until I calm down.)
I'm trying to get a feel for success with software debugging.
If the software debug succeeds, I will return to the hardware debug.

Software debug:
I communicate with the board via the USB port on the ESP32 wroom32D panel.
Programming was done with the "Build and Upload" menu item.

COM: Silicon Labs CP210x USB to UART Bridge (COM6)
Additional settings and the result of the debug are in the attached image.
Everything seems to be successful, but program execution doesn’t stop at breakpoints.
Stepping doesn't go.
The Output screen shows that the program is running, but debugging does not work.

What did I watch? What didn't I set up?

safi
  

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


Posts: 34
Joined: Jan 25th, 2022
Re: ESP32 programming and debugging with ESP-prog not work
Reply #8 - Jan 27th, 2022 at 12:05pm
Print Post  
Solution for software debug:

ProjectProperties / Misc / (Micro Debug):
old value: none
new value: Full

This launches the software debug!
I can now start looking for a solution to my hardware debug (with ESP-Prog) error.

safihttps://www.visualmicro.com/public_html/yabbfiles/Templates/Forum/default/gr...
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2441
Joined: Feb 13th, 2019
Re: ESP32 programming and debugging with ESP-prog not work
Reply #9 - Jan 27th, 2022 at 12:12pm
Print Post  
Thanks for the update, and just to confirm the Serial debugger does not support stepping Over/In/Out, but does allow a large number of breakpoints.

For the ESP-PROG, we should be able to get the information we need as below:

If you run the below command in cmd.exe, after you have connected the ESP-PROG to your board, and the USB cables to the PC:
Code
Select All
C:\ProgramData\vmicro\tools\openocd-espressif-esp32-10.0.1\bin\openocd.exe -d2 -s s/" -f "interface/ftdi/minimodule-lowcost.cfg" -f "board/esp-wroom-32.cfg" -c "init" 



And send us the output from this, it should show further detail.
  
Back to top
IP Logged
 
espprog
Junior Member
**
Offline


Posts: 34
Joined: Jan 25th, 2022
Re: ESP32 programming and debugging with ESP-prog not work
Reply #10 - Jan 27th, 2022 at 12:56pm
Print Post  
Thanks.

I attached a picture of the command line window.

safi
  

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


Posts: 34
Joined: Jan 25th, 2022
Re: ESP32 programming and debugging with ESP-prog not work
Reply #11 - Jan 27th, 2022 at 1:03pm
Print Post  
I tried the hardware debug again.
Charging was performed on a serial port independent of ESP-Prog while the ESP-Prog JTAG connector (and also the Prog connector) was not connected.
Build and Upload was successful (or not?). but the debug did not start.
Clicking the Step Into button started a new upload, which resulted in an error message.

I attached the images and outputs.

What else do I need to set up?

(Unfortunately, I was only able to attach 2 files, the rest will be attached in my next mail.)

safi
  

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


Posts: 34
Joined: Jan 25th, 2022
Re: ESP32 programming and debugging with ESP-prog not work
Reply #12 - Jan 27th, 2022 at 1:04pm
Print Post  
The rest of the attachments are here.
  

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


Posts: 2441
Joined: Feb 13th, 2019
Re: ESP32 programming and debugging with ESP-prog not work
Reply #13 - Jan 27th, 2022 at 1:20pm
Print Post  
Thanks for the information.  Is this the same if you use Debug > Attach to Process?

Also check the Project Property for Micro Debug is set back to none.

Do you have a log file in the below location? (please attach if it is present):
Code
Select All
e_OK.ino_DebugOpenOCD.log 



Is there any information in the Output Window > Debug?
« Last Edit: Jan 27th, 2022 at 1:21pm by Simon@Visual Micro »  
Back to top
IP Logged
 
espprog
Junior Member
**
Offline


Posts: 34
Joined: Jan 25th, 2022
Re: ESP32 programming and debugging with ESP-prog not work
Reply #14 - Jan 27th, 2022 at 1:38pm
Print Post  
I used "Attach to Process".
The error message is the same as before.
I also attached the log file.

safi
  

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


Posts: 2441
Joined: Feb 13th, 2019
Re: ESP32 programming and debugging with ESP-prog not work
Reply #15 - Jan 27th, 2022 at 1:48pm
Print Post  
Thanks for the information, we will have to setup an environment to try to replicate this on.

We will update when we have further information around this.
  
Back to top
IP Logged
 
espprog
Junior Member
**
Offline


Posts: 34
Joined: Jan 25th, 2022
Re: ESP32 programming and debugging with ESP-prog not work
Reply #16 - Jan 27th, 2022 at 1:51pm
Print Post  
Thanks.

I can only receive the update tomorrow.
Thanks in advance :

safi
  
Back to top
 
IP Logged
 
espprog
Junior Member
**
Offline


Posts: 34
Joined: Jan 25th, 2022
Re: ESP32 programming and debugging with ESP-prog not work
Reply #17 - Jan 28th, 2022 at 11:13am
Print Post  
Thanks again for your effort!
Would providing TeamViewer access to my computer make it easier to identify the error?
If so, I can solve it next week, Monday, at a time when it's right for you.
If you go for a hardware debug, we will try out the features and maybe buy it.
Hi: safi
  
Back to top
 
IP Logged
 
espprog
Junior Member
**
Offline


Posts: 34
Joined: Jan 25th, 2022
Re: ESP32 programming and debugging with ESP-prog not work
Reply #18 - Jan 31st, 2022 at 9:26am
Print Post  
Hi Simon !

I'm wondering how the debug was successful?
The error (debugging with ESP-Prog) still exists.
Can I help or speed up troubleshooting if I provide remote access to my computer?
Thank you for your help, in advance :

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


Posts: 2441
Joined: Feb 13th, 2019
Re: ESP32 programming and debugging with ESP-prog not work
Reply #19 - Jan 31st, 2022 at 11:18am
Print Post  
We are currently investigating this on our system and we will update when we have an update with the fix in.
  
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 3 
Send TopicPrint