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
Normal Topic New user trying to get hardware debug to work (Read 1977 times)
chico
Newbies
*
Offline


Posts: 3
Joined: Aug 14th, 2017
New user trying to get hardware debug to work
Mar 5th, 2020 at 6:42pm
Print Post  
Hi - Just getting started with VisualMicro on ESP32. I can get it to work fine with serial debug, but am struggling with hardware debugĀ on Windows 10.

I'm using a TIAO USB Multifunction Board. I believe I've got the JTAG connector wired to the correct ESP32 pins. I think I should be using the TUMBA config script, but I couldn't find how to select that script. So I copied the TUMBA config script ("/ftdi/tumpa.cfg") to "/ftdi/minimodule-lowcost.cfg" and selected that in VisualMicro.

Here's the output from Visual Micro after "Debug>Attach to process"):

Code
Select All
Starting: "C:\ProgramData\vmicro\tools\openocd-espressif-esp32-10.0.1\bin/openocd.exe" -d2 -l 32_node32s\Debug/JayzVisualStudioTestSketch.ino_DebugOpenOCD.log}" -s s/" -f s/interface/ftdi/minimodule-lowcost.cfg" -c "set ESP32_RTOS none" -f s/board/esp-wroom-32.cfg" -c "init"
Starting: lf-gcc\1.22.0-80-g6c4433a-5.2.0/bin\xtensa-esp32-elf-gdb.exe" --interpreter=mi -ex "set remote hardware-watchpoint-limit 2" -ex "mon reset halt" -ex "flushregs" -ex "thb app_main" -ex "c"
"C:\ProgramData\vmicro\tools\openocd-espressif-esp32-10.0.1\bin/openocd.exe" exited with code 1 (0x1). 



Can anyone tell me if this looks like a driver issue, or if I've selected the wrong script, or anything else about how I should go about getting things to work? The "exited with code 1" error message doesn't give me much direction...

Thanks...
« Last Edit: Mar 5th, 2020 at 6:43pm by chico »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: New user trying to get hardware debug to work
Reply #1 - Mar 5th, 2020 at 7:48pm
Print Post  
Thanks for the information, could you post the file below back?
(this is created by the -l "{logfile}" part of the first command for OpenOCD in your post).
Code
Select All
_node32s\Debug/JayzVisualStudioTestSketch.ino_DebugOpenOCD.log 

  
Back to top
 
IP Logged
 
chico
Newbies
*
Offline


Posts: 3
Joined: Aug 14th, 2017
Re: New user trying to get hardware debug to work
Reply #2 - Mar 7th, 2020 at 8:54pm
Print Post  
Simon@Visual Micro wrote on Mar 5th, 2020 at 7:48pm:
Thanks for the information, could you post the file below back?
(this is created by the -l "{logfile}" part of the first command for OpenOCD in your post).
Code
Select All
_node32s\Debug/JayzVisualStudioTestSketch.ino_DebugOpenOCD.log 



Yes, here it is:

Code
Select All
none separate
none
adapter speed: 2000 kHz
Info : Configured 2 cores
esp32 interrupt mask on
Error: libusb_open() failed with LIBUSB_ERROR_NOT_SUPPORTED
Error: libusb_open() failed with LIBUSB_ERROR_NOT_FOUND
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 8a98, description '*', serial '*' at bus location '*'
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description '*', serial '*' at bus location '*'

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() 



More info: I used the driver that was pointed to on the DIYGadget site where I purchased the TUMPA (TIAO Universal Multi Protocol Adapter): TIAO_TUMPA_CDM_v2.12.24_WHQL_Certified

Also, I should mention I'm using X86 Windows 10, if that is an issue (Version 10.0.18362 Build 18362).
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: New user trying to get hardware debug to work
Reply #3 - Mar 9th, 2020 at 12:08pm
Print Post  
Thanks, the "unable to open ftdi device with vid / pid" means it cannot identify the debugger, which in our setup often means the debugger does not have the correct driver installed for our software.

If you download the Zadig tool, and then select Options > List All Devices, Find "Interface 0" of your debugger (if it has > 1 listed), and install the WinUSB Driver, this should resolve this issue.

This video also walks through installing the Zadig Driver for a debugger similar to this one (FTDI based).
  
Back to top
 
IP Logged
 
chico
Newbies
*
Offline


Posts: 3
Joined: Aug 14th, 2017
Re: New user trying to get hardware debug to work
Reply #4 - Mar 9th, 2020 at 9:29pm
Print Post  
Simon@Visual Micro wrote on Mar 9th, 2020 at 12:08pm:

If you download the Zadig tool, and then select Options > List All Devices, Find "Interface 0" of your debugger (if it has > 1 listed), and install the WinUSB Driver, this should resolve this issue.

This video also walks through installing the Zadig Driver for a debugger similar to this one (FTDI based).


Thanks so much! Installing the suggested driver got things working.

To get the TUMBA board to work, I copied the TUMBA config file contents to the F2232 Mini Module config file so that I could select it from the Visual Studio menu. How could I make the original TUMBA.cfg file appear in that menu, so I don't have to perform this minor hack?
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2145
Joined: Feb 13th, 2019
Re: New user trying to get hardware debug to work
Reply #5 - Mar 10th, 2020 at 10:48am
Print Post  
Glad to help, and there are two options for the amendments:

1) Add a board.txt to the project and add the below entry for the debugger config, leave the "F2232 MiniModule" Selected still
Code
Select All
tools.espf2232mm.server.build.openocddebugger=ftdi/tumpa.cfg 



2) For more granular customisation you can Add and Amend a Debugger Launch.json as shown here.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint