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
Can't Debug: 'ESP32 Wrover Module' using 'F2232H Dual RS232' (Read 403 times)
Kabron
Member
***
Offline



Posts: 132
Can't Debug: 'ESP32 Wrover Module' using 'F2232H Dual RS232'
Jun 27th, 2020 at 11:28am
 
Allmost exactly the same issue.
Board: Wrover v4.1
Vmicro: 2020.618.1
Zadig WINUSB driver installed.

I deleded c:\ProgramData\VMicro\tools\ folder in hope it'll be reinstalled. And it was so.
Below output I got:
Code:
Program MAX86150_M5 size: 1 123 203 bytes (used 86% of a 1 310 720 byte maximum) (167.21 secs)
Minimum Memory Usage: 40128 bytes (12% of a 327680 byte maximum)

# Copy build result to 'Project>Property Pages>Intermediate Directory'
# Destination: file:///D:/Arduino/Proj/ESP32/Wrover/M5Wrover/MAX86150_M5/Debug/

Uploading 'MAX86150_M5' to 'ESP32 Wrover Module' using 'F2232H Dual RS232'
Uploader started for board ESP32 Wrover Module
Uploader will use programmer name: espf2232h


Downloading tool to C:\ProgramData\vmicro\tools\openocd-espressif-esp32-10.0.1\openocd-espressif-esp32-10.0.1.zip
Installing tool. License: OpenOCD - (GNU GENERAL PUBLIC LICENSE)
C:\ProgramData\vmicro\tools\openocd-espressif-esp32-10.0.1\bin\openocd.exe -d2 -s "C:\ProgramData\vmicro\tools\openocd-espressif-esp32-10.0.1/share/openocd/scripts/" -f "interface/ftdi/minimodule-lowcost.cfg" -f "board/esp32-wrover.cfg" -c "echo -n {****[vMicro]**** Uploading App :}" -c "telnet_port disabled; program {C:\Users\vlady\AppData\Local\arduino15\packages\esp32\hardware\esp32\1.0.4/tools/partitions/boot_app0.bin} 0xe000" -c "echo -n {****[vMicro]**** Uploading Bootloader :}" -c "program {C:\Users\vlady\AppData\Local\arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/bin/bootloader_dio_80m.bin} 0x1000" -c "echo -n {****[vMicro]**** Uploading Sketch :}" -c "program {C:\Users\vlady\AppData\Local\Temp\VMBuilds\MAX86150_M5\esp32_esp32wrover\Debug/MAX86150_M5.ino.bin} 0x10000" -c "echo -n {****[vMicro]**** Uploading Partitions :}" -c "program {C:\Users\vlady\AppData\Local\Temp\VMBuilds\MAX86150_M5\esp32_esp32wrover\Debug/MAX86150_M5.ino.partitions.bin} 0x8000 reset; shutdown"
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: 2
adapter speed: 20000 kHz
Info : Configured 2 cores
esp32 interrupt mask on
****[vMicro]**** Uploading App :Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Error: no device found
Error during upload using programmer
The uploader process failed

Error: unable to open ftdi device with vid 0403, pid 6010, description 'Dual RS232-HS', serial '*' at bus location '*'
The uploader process failed
The uploader returned an error
# Copy build result to 'Project>Property Pages>Intermediate Directory'
# Destination: file:///D:/Arduino/Proj/ESP32/Wrover/M5Wrover/MAX86150_M5/Debug/

** OpenOCD init failed **
shutdown command invoked
Warn : Flash driver of esp32.flash does not support free_driver_priv()
Warn : Flash driver of irom does not support free_driver_priv()
Warn : Flash driver of drom does not support free_driver_priv()
 



What i did wrong?

Thanks in advance,
Vladimir
Back to top
« Last Edit: Jun 27th, 2020 at 1:54pm by Visual Micro »  
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10855
United Kingdom
Re: Can't Debug: 'ESP32 Wrover Module' using 'F2232H Dual RS232'
Reply #1 - Jun 27th, 2020 at 1:55pm
 
Please povide the information requested in the yellow box above.
Back to top
 
WWW  
IP Logged
 
Kabron
Member
***
Offline



Posts: 132
Re: Can't Debug: 'ESP32 Wrover Module' using 'F2232H Dual RS232'
Reply #2 - Jun 27th, 2020 at 3:11pm
 
Sorry, forget about it.
UPD:
I launch the ptoject with VisualGDB and firstly got the same error. But when I launch Debug Test on target with reset button pushed, it passed the test. Unfortunatelly it is the only success, because I got excepions:
Received a SIGTRAP: Trace/breakpoint trap
Received a 0: Signal 0

during debug.
Back to top
« Last Edit: Jun 27th, 2020 at 3:13pm by Kabron »  

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



Posts: 464
Re: Can't Debug: 'ESP32 Wrover Module' using 'F2232H Dual RS232'
Reply #3 - Jun 27th, 2020 at 5:46pm
 
From the first error it appears the driver isn't installed.
Code:
Error: unable to open ftdi device with vid 0403, pid 6010, description 'Dual RS232-HS', serial '*' at bus location '*' 



When moving the debugger between USB ports, the driver may need re-installing.

Can you confirm the driver is installed for Device 0 of the debugger, and if it is the Wrover Devkit board, the ESP32 DEVKIT selection may be better suited.
(Note: The VID/PID is the same for ESP32 PROG / DEVKIT / FT2232H Dual RS232 / F2232 MiniModule)

The below shows the VID/PID for the device (ESP-WROVER-KIT), and Interface 0 is the lower of the two COM ports presented:-

...

The debugger should attach without holding the reset button, however resetting the board (and releasing) can help when starting debugging in some scenarios.
Back to top
 
 
IP Logged
 
Kabron
Member
***
Offline



Posts: 132
Re: Can't Debug: 'ESP32 Wrover Module' using 'F2232H Dual RS232'
Reply #4 - Jun 28th, 2020 at 11:43am
 
Thanks for answer, Simon.
As I mentioned above, proper driver installed and VisualGDB recognized debugger.
IMHO, something wrong with VM openocd.
Back to top
 

Please Register or Login to the Forum to see File Attachments
 
IP Logged
 
Kabron
Member
***
Offline



Posts: 132
Re: Can't Debug: 'ESP32 Wrover Module' using 'F2232H Dual RS232'
Reply #5 - Jun 28th, 2020 at 4:49pm
 
Some progress, but debug does not start.
Back to top
 

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



Posts: 464
Re: Can't Debug: 'ESP32 Wrover Module' using 'F2232H Dual RS232'
Reply #6 - Jun 29th, 2020 at 10:49am
 
Thanks for the information.

We cannot compare directly to Visual GDB as we are likely using different builds of OpenOCD, which may differ in the driver required (The OpenOCD in Visual Micro is the one supplied from Espressif)

Was the driver shown here installed via the Zadig tool?  I only ask as it doesn't state the version in the Zadig window, which it should to confirm it is the same 6.x version of the WinUSB Driver. This can also be confirmed in Device Manager as an alternative (if Zadig doesn't show it for any reason).

The Log shows a successful upload via vMicro + OpenOCD so the debugging should all work now.

Could you try uploading, press reset on board, attaching the debugger, and send the log file from the build folder as detailed here?

Back to top
 
 
IP Logged
 
Kabron
Member
***
Offline



Posts: 132
Re: Can't Debug: 'ESP32 Wrover Module' using 'F2232H Dual RS232'
Reply #7 - Jun 30th, 2020 at 3:29pm
 
Well, I made some investigations.
I took a very simple project to reduce compilation time.
I tried to launch debug session on Wrover Kit(v4.1) with different debug adapter settings:
1. Native for Wrover Kit FT2232H Dual RSD232
2. ESP32 DEVKIT
3. ESP32 PROG
4. FT2232 MiniModule
assuming that all these hardwares are the same.

Result logs in attachment.
Only ESP32 DEVKIT found and program the board. All others produced Error: unable to open ftdi device with vid 0403, pid 6010

But even with good ESP32 DEVKIT the debug session won't started.
I guess it is definitelly something wron with VM openocd, because some VM versions ago I could debug the board.
Back to top
 

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



Posts: 464
Re: Can't Debug: 'ESP32 Wrover Module' using 'F2232H Dual RS232'
Reply #8 - Jun 30th, 2020 at 3:52pm
 
Thanks for the logs and information.

The ESP32-DEVKIT shows a succesful upload via JTAG, so all Drivers are in place correctly, and OpenOCD is working.

Could you try:-
1) Set Build Configuration in VS to Debug
2) Set all ESP32 + Devkit Debugging options as needed
3) Connect to Debugger and Upload Code
4) Press reset on board
5) Debug > Attach To Process
6) Attach the log file from the build folder as detailed here?

This will show more information about the debugging starting from OpenOCD.
Back to top
 
 
IP Logged
 
Kabron
Member
***
Offline



Posts: 132
Re: Can't Debug: 'ESP32 Wrover Module' using 'F2232H Dual RS232'
Reply #9 - Jun 30th, 2020 at 4:10pm
 
Bingo! Attach works fine!
Back to top
 

Please Register or Login to the Forum to see File Attachments
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print