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....
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
Re: Unable to start debugging. Olimex AMT-USB-TINY + Esp32 (Read 1747 times)
RogerW
Junior Member
**
Offline



Posts: 19
Egnach
Re: Unable to start debugging. Olimex AMT-USB-TINY + Esp32
Jul 15th, 2019 at 4:04pm
 
Similar problem here:

Probe Olimex AMT-USB-TINY
VM 1907.14.2

Debug output:
<<<
Starting: "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/script
s/" -c "adapter_khz 1000" -f "C:\ProgramData\vmicro\tools\openocd-espressif-esp32-10.0.1/share/openocd/script
s/interface/ftdi/olimex-jtag-tiny.cfg" -c "set ESP32_RTOS none" -f "C:\ProgramData\vmicro\tools\openocd-espressif-esp32-10.0.1/share/openocd/script
s/board/esp-wroom-32.cfg" -c "init; reset halt"
Starting: "C:\Users\roger\AppData\Local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gc
c\1.22.0-80-g6c4433a-5.2.0/bin\xtensa-esp32-elf-gdb.exe" --interpreter=mi
=thread-group-added,id="i1"
~"GNU gdb (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a5) 7.10\n"
~"Copyright (C) 2015 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>;\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\nand \"show warranty\" for details.\n"
~"This GDB was configured as \"--host=i686-host_pc-mingw32 --target=xtensa-esp32-elf\".\nType \"show configuration\" for configuration details."
~"\nFor bug reporting instructions, please see:\n"
~"<http://www.gnu.org/software/gdb/bugs/>.\n"
~"Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/>.\n"
~"For help, type \"help\".\n"
~"Type \"apropos word\" to search for commands related to \"word\".\n"
(gdb)
"C:\ProgramData\vmicro\tools\openocd-espressif-esp32-10.0.1\bin/openocd.exe" exited with code 1 (0x1).
>>>

Zadig Driver done --> see attachement

Is there an other info, log files, ... I can provide to fix the issue?

Any help is appreciated
Regards



Back to top
« Last Edit: Jul 15th, 2019 at 4:06pm by Visual Micro »  

gdb_error2.PNG (16 KB | )
gdb_error2.PNG
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10561
United Kingdom
Re: Unable to start debugging. Olimex AMT-USB-TINY + Esp32
Reply #1 - Jul 15th, 2019 at 4:06pm
 
Thanks, please follow the guide in the yellow box above.

It's always best to start ne threads for your reports.

Thanks
Back to top
 
WWW  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10561
United Kingdom
Re: Unable to start debugging. Olimex AMT-USB-TINY + Esp32
Reply #2 - Jul 16th, 2019 at 1:46am
 
The debuggers have been refreshed and tested in 1907.15. It should produce better results. Please try. If it fails please post the requested info so we can see your config + post the debugger output again but hopefully it works for you now.

Back to top
 
WWW  
IP Logged
 
RogerW
Junior Member
**
Offline



Posts: 19
Egnach
Re: Unable to start debugging. Olimex AMT-USB-TINY + Esp32
Reply #3 - Jul 17th, 2019 at 9:31pm
 
Test with 1907.16.0. Unfortunately same result. I've attached the output from Micro Build and Debug Windows.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10561
United Kingdom
Re: Unable to start debugging. Olimex AMT-USB-TINY + Esp32
Reply #4 - Jul 17th, 2019 at 10:02pm
 
Thanks for all the info

Please paste the following into a cmd prompt and press enter. What do you see if anything?

Code:
"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/" -c "adapter_khz 1000" -f "C:\ProgramData\vmicro\tools\openocd-espressif-esp32-10.0.1/share/openocd/scripts/interface/ftdi/olimex-jtag-tiny.cfg" -c "set ESP32_RTOS none" -f "C:\ProgramData\vmicro\tools\openocd-espressif-esp32-10.0.1/share/openocd/scripts/board/esp-wroom-32.cfg" -c "init; reset halt" 

Back to top
 
WWW  
IP Logged
 
RogerW
Junior Member
**
Offline



Posts: 19
Egnach
Re: Unable to start debugging. Olimex AMT-USB-TINY + Esp32
Reply #5 - Jul 18th, 2019 at 6:14pm
 
Performed some more tests:

1. Ran the mentioned commands in a cmd. The output is in file "jtag_cmd_line.txt" and it look like the usb pid is wrong.
2. saw that olimex-jtag-tiny.cfg is used and that in the .cfg the pid is indeed 0x0004. Saw that the olimex-arm-usb-tiny-h.cfg contains the correct pid of 0x002a. Why not use this .cfg I don't know.
3. Changed the pid in olimex-jtag-tiny.cfg. Still no go but other error message. --> jtag_cmd_changed_olimex_cfg.txt
4. Rebuilt the project but still same error.
Back to top
 
 
IP Logged
 
RogerW
Junior Member
**
Offline



Posts: 19
Egnach
Re: Unable to start debugging. Olimex AMT-USB-TINY + Esp32
Reply #6 - Jul 18th, 2019 at 6:16pm
 
Error window from above point 3 --> gdb_error4.PNG
Back to top
 

gdb_error4.PNG (4 KB | )
gdb_error4.PNG
 
IP Logged
 
RogerW
Junior Member
**
Offline



Posts: 19
Egnach
Re: Unable to start debugging. Olimex AMT-USB-TINY + Esp32
Reply #7 - Jul 18th, 2019 at 6:36pm
 
Just realised that i have a Olimex ARM-USB-TINY
-H
which has a pid of 0x002a instead of the non -H version which has a pid of 0x0004
Back to top
 

gdb_error9.PNG (14 KB | )
gdb_error9.PNG
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10561
United Kingdom
Re: Unable to start debugging. Olimex AMT-USB-TINY + Esp32
Reply #8 - Jul 18th, 2019 at 6:54pm
 
Thanks that's useful we will find the solution over the next day or so.

By the way the compile/upload doesn't affect things other than to have made one upload with correct optimization setting and a generic hardware debug flag. After that you can click "Debug>Attach To Process" which attempts to start the debugger (or attempt to start it) using which hardware debugger is currently selected.

more to follow
Back to top
 
WWW  
IP Logged
 
RogerW
Junior Member
**
Offline



Posts: 19
Egnach
Re: Unable to start debugging. Olimex AMT-USB-TINY + Esp32
Reply #9 - Jul 18th, 2019 at 7:08pm
 
Cool, thx.
I did know about the upload, I did it just in case.
If you need any other information, I'll be more than willing to provide it.
Back to top
 
 
IP Logged
 
Simon Hopkinson
Administrator
*****
Offline



Posts: 186
Re: Unable to start debugging. Olimex AMT-USB-TINY + Esp32
Reply #10 - Jul 18th, 2019 at 8:30pm
 
To change this in the interim you can add a Local Boards.txt to your Project (right click project in solution explorer, Add menu > Add Local Boards.txt)

Then add the below line of text to it and save:
Code:
tools.olimexarmusbtiny.server.build.openocddebugger=ftdi/olimex-arm-usb-tiny-h.cfg
 


Click save on the board.txt to be sure it has sabed.

Then ensure you still have the "Olimex ARM-USB-TINY" Debugger selected, and try to attach again, it should hopefully find the correct device now and connect.... (might need to build first)
Back to top
« Last Edit: Jul 18th, 2019 at 9:05pm by Visual Micro »  
 
IP Logged
 
RogerW
Junior Member
**
Offline



Posts: 19
Egnach
Re: Unable to start debugging. Olimex AMT-USB-TINY + Esp32
Reply #11 - Jul 19th, 2019 at 12:34pm
 
Unfortunately same effect.

Added boards.txt with above line. Rebuilt the project.

Same error "Unable to start debugging. GDB exited unexpectedly with exit code -1073741819 (0x0000005)." See screenshot from previous post.
Back to top
 
 
IP Logged
 
Simon Hopkinson
Administrator
*****
Offline



Posts: 186
Re: Unable to start debugging. Olimex AMT-USB-TINY + Esp32
Reply #12 - Jul 19th, 2019 at 1:08pm
 
Could you paste and run the following in a command prompt and send back all of the output (this has the amended cfg file present as you spotted previously, to match your debugger hardware), hopefully it will reveal more information:

Code:
"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/" -c "adapter_khz 1000" -f "C:\ProgramData\vmicro\tools\openocd-espressif-esp32-10.0.1/share/openocd/scripts/interface/ftdi/olimex-arm-usb-tiny-h.cfg" -c "set ESP32_RTOS none" -f "C:\ProgramData\vmicro\tools\openocd-espressif-esp32-10.0.1/share/openocd/scripts/board/esp-wroom-32.cfg" -c "init; reset halt"  

Back to top
 
 
IP Logged
 
RogerW
Junior Member
**
Offline



Posts: 19
Egnach
Re: Unable to start debugging. Olimex AMT-USB-TINY + Esp32
Reply #13 - Jul 19th, 2019 at 4:03pm
 
It is the same output as I've already posted in a previous post, after I modified olimex-jtag-tiny.cfg for the correct pid. You can find it in jtag_cmd_changed_olimex_cfg.txt

Just in case I have attached the new output.

Back to top
 
 
IP Logged
 
Simon Hopkinson
Administrator
*****
Offline



Posts: 186
Re: Unable to start debugging. Olimex AMT-USB-TINY + Esp32
Reply #14 - Jul 19th, 2019 at 5:31pm
 
Thanks Roger, and I hadn't spotted that this was all already done.

Would you be able to try the below command?
(this is manually configuring the Olimex as the manufacturer did in the previous release, both old and new configurations work on my Olimex-Arm-Usb-Tiny with ESP32 and its relevant details)

Code:
"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/" -c "adapter_khz 1000" -c "echo {***** Manual OCD-CFG ****}" -c "interface ftdi" -c "ftdi_device_desc {Olimex OpenOCD JTAG ARM-USB-TINY-H}" -c "ftdi_vid_pid 0x15ba 0x002a" -c "ftdi_layout_init 0x0808 0x0a1b" -c "ftdi_layout_signal nSRST -oe 0x0200" -c "ftdi_layout_signal nTRST -data 0x0100 -oe 0x0100" -c "ftdi_layout_signal LED -data 0x0800" -c "echo {***** BOARD CFG *****}" -c "set ESP32_RTOS none" -f "C:\ProgramData\vmicro\tools\openocd-espressif-esp32-10.0.1/share/openocd/scripts/board/esp-wroom-32.cfg" -c "init" -c "echo {***** RUNNING ****}" -c "sleep 1" -c "shutdown"
 



Hopefully this will show something additional, and thanks again for all the detail.
Back to top
 
 
IP Logged
 
RogerW
Junior Member
**
Offline



Posts: 19
Egnach
Re: Unable to start debugging. Olimex AMT-USB-TINY + Esp32
Reply #15 - Jul 19th, 2019 at 5:56pm
 
It's unbelivable, same again. Details attached.

Could it be possible that the error has its origin in the ESP32  not working correctly or something with the jtag connection from the Olimex to the Dev Board beeing affected?

Please keep trying, it's very appreciated.
Back to top
 
 
IP Logged
 
Simon Hopkinson
Administrator
*****
Offline



Posts: 186
Re: Unable to start debugging. Olimex AMT-USB-TINY + Esp32
Reply #16 - Jul 19th, 2019 at 6:58pm
 
Thanks Roger, and as you say it feels like it must be a connection at present...

If you disconnect the ESP32 and ribbon from the olimex, and run the same command, you should see some further messages similar to the below, beyond what we have seen so far... (just helps confirm the debugger is connecting as expected)

Info : clock speed 2000 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.

After that it feels like its either the wiring, or the target board itself. 

Can you confirm:-
1) which of the many ESP32 Dev modules it is (on the back normally)
2) how it is connected to the Olimex (just pin to pin wiring from Olimex to ESP, or using ribbon/adapter/breakouts)

Our Wiring - https://www.visualmicro.com/page/ESP32-Debugging.aspx

The connector shown is essentially the male Olimex connector, not the female end of a ribbon cable
Back to top
 
 
IP Logged
 
RogerW
Junior Member
**
Offline



Posts: 19
Egnach
Re: Unable to start debugging. Olimex AMT-USB-TINY + Esp32
Reply #17 - Jul 20th, 2019 at 8:10am
 
I've disconnected the ribbon cable from the Olimex and ran the command again. The output was the same, cable connected or not... so it looks like the problem is between Olimex and PC.

The Board is marked with "ESP32 DEVKITV1" and is a clone of some sort.
Back to top
« Last Edit: Jul 20th, 2019 at 8:15am by RogerW »  

IMG_7258_2.JPG (42 KB | )
IMG_7258_2.JPG
 
IP Logged
 
RogerW
Junior Member
**
Offline



Posts: 19
Egnach
Re: Unable to start debugging. Olimex AMT-USB-TINY + Esp32
Reply #18 - Jul 23rd, 2019 at 9:53am
 
Today I've got the FT2232H Dual RS232 in the mail. Tried it and it works like a charm! Still don't know why the Olimex doesn't work...
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10561
United Kingdom
Re: Unable to start debugging. Olimex AMT-USB-TINY + Esp32
Reply #19 - Jul 23rd, 2019 at 10:09am
 
Great, thanks for the update. We have been considering your olimex issue and have tested it with various boards. It's possible it is a cable issue but that is a wild guess. The fact it doesn't work outside of VS suggests hardware or driver but we are testing a lot of Olimex configs at the moment so will report if we find an issue. We did certainly have able issues when we first tested it.

Sory can't be more help at the moment.
Back to top
 
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print