Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 

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 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  
 
Pages: 1 
Send Topic Print
ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one (Read 2146 times)
Chris2N
Junior Member
**
Offline



Posts: 17
ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Apr 23rd, 2022 at 6:58pm
 
Hi,

Freed GPIO 14 by unsoldering D6, which was done successfully by other users also to make this board compatible with JTAG debugging:
https://github.com/Xinyuan-LilyGO/TTGO-T-Display/issues/6#issuecomment-899104385

While uploading and debugging via serial works fine, trying to debug via hardware results in error message popping up: Unable to start debugging. GDB exited unexpectedly with exit code 1 (Ox1).

When trying to upload via hardware debugger (ESP Prog) I got initially the error message:
****[vMicro]**** Uploading App :Error: cpu0: xtensa_write_memory (line 802): DSR (FFFFFFFF) indicates target still busy!
After trying a few solutions it is now the following error code (see attached output files):
****[vMicro]**** Uploading App :Error: JTAG scan chain interrogation failed: all ones

Cabling and drivers should be okay as the same setup works fine with my Wemos Lolin (4MB) board.
I also checked the boards connection to GPIO 14 by connecting an LED and using it as an output.
(Of course the sketch I used to try hardware debugging/uploading does not use any of the GPIO’s 12 to 15 and only the ESP PROG is connected to these. In fact I use a simple blink sketch controlling GPIO 4 which is the LCD Backlight.)

I tried the following solutions without success:
  • trying different USB ports and cables
  • trying a different ESP Prog Board
  • updating Visual Micro and using different versions of board.txt file to enforce use of new open OCD version (see enclosed output files).

The DebugOpenOCD.log from the Build folder has only 1 line:
Unexpected command line argument: reset

Hope this info is describing my problem well enough,
Thanks in advance for your help
Chris
Back to top
 
 
IP Logged
 
Chris2N
Junior Member
**
Offline



Posts: 17
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #1 - Apr 23rd, 2022 at 7:01pm
 
PS: Here the Output Files, that seem to have not been uploaded with my first post.
Back to top
 

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



Posts: 1456
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #2 - Apr 25th, 2022 at 11:05am
 
Thanks for the report, and detail and output files.

The error on debug is unexpected, can you attach the .vmgdbinit file from the build folder after trying to run Debug > Attach to Process?

Can you confirm you are not using a battery in the Upload/Debug scenario as this seems to have some impact from the linked GitHub post?

If possible can you also attach an image of the modified board and connections to the ESP-PROG device, just in case there is anything visible there?
Back to top
« Last Edit: Apr 25th, 2022 at 11:38am by Simon@Visual Micro »  
 
IP Logged
 
Chris2N
Junior Member
**
Offline



Posts: 17
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #3 - Apr 25th, 2022 at 4:54pm
 
Hello Simon,
Thanks for your reply. Trying to attach to a running process is even not working on my Wemos Lolin. I get the following pop-up with an error message:
Unable to start debugging. Launch options string provided by the project system is invalid. The string is null or empty.

Do I need to change anything in my configuration?

In the folder I think which should be the build folder I do not find any new files after such operation.
I have checked the following 2 file locations:
Compiling 'TTGOTest' for 'ESP32 Dev Module'
Build Folder: "file:///C:/Users/admin/AppData/Local/Temp/VMBuilds/TTGOTest/esp32_esp32/Debug"
# Copy build result to 'Project>Property Pages>Intermediate Directory'
# Destination: file:///E:/Eigene%20Dateien/Quelltexte/Arduino/Arduino/ESP32/TTGO%20T5/Debug/

But I do not find a .vmgdbinit file anywhere else on my hard drive also.

As you can see from the enclosed pictures, I do not operate the board from battery (and I disconnect the red power supply from the 3 Volts input of the board, if I use the USB connection in parallel).

I soldered the anode pad from D6 directly to pin 3 of header 12 and isolated the pin with a short piece of Teflon tube to the (enlarged) hole of the ground connection that is normally on that place of the board. (Red wire on the attached photos.) The anode pad is directly connected with GPIO 14 on the ESP 32.

Best regards
Chris
Back to top
 

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



Posts: 17
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #4 - Apr 25th, 2022 at 4:56pm
 
PS: additional pictures.
Back to top
 

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



Posts: 17
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #5 - Apr 25th, 2022 at 5:02pm
 
PPS: I have also a board where all the outputs (including a similar red cable) are conected to a PCB and which has a proper DC 10P connecteor as a JTAG port. It is not working there also.
Back to top
 
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline



Posts: 1456
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #6 - Apr 26th, 2022 at 3:15pm
 
Thanks for all the detail.

Just sticking with the initial (pictured) board to start with:

You mentioned you had uploaded a sketch which used pin 14 as an output.  Have you since uploaded the sketch not using pin 14 as an output via USB-Serial?
(If not the sketch on-board will cause JTAG communication to fail as pin 14 is still in use on-chip)

Also try commenting out all of the local board.txt entries (put '#' at the start of each line), when trying the debugging again, as the latest configuration should not be needed for this Chip+Core configuration to my knowledge.

Back to top
 
 
IP Logged
 
Chris2N
Junior Member
**
Offline



Posts: 17
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #7 - Apr 26th, 2022 at 5:31pm
 
Dear Simon,

yess! I made sure that the sketch I try to upload (and of course also the one on the board) is not using any of the GPIO's 12-15.

BTW: In the cabeling setup shown on the photos, sometimes the board does not start (when plugging on the ESP-PROG or when pressing Reset or after a failed upload via Programmer). When I unplug GPIO 12 it starts.
Is it normal, that ESP-Prog pulls GPIO12 on high (which I measured and blocks the ESP32 from booting)? Both my ESP-Prog-Boards are doing this today.
I double checked my driver configuration again, but Zadig still shows that I have WINUSB installed on Device 0.

I tried with commenting all lines in board.txt and also completely without board.txt and get the target is still busy message when uploading, even if the board is not blocked by the ESP-Prog but actively executing a program (blinking on IO4).

Changing back to the Lolin board and everything is fine (appart from attaching gives an Unexpected GDB output from  "-exec -run". Try "help target".-message). Undecided

BR
Christian
Back to top
 
 
IP Logged
 
Chris2N
Junior Member
**
Offline



Posts: 17
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #8 - Apr 26th, 2022 at 6:48pm
 
PS:
I received today a new Batch of these TTGO-Boards and tried one.
Did the soldering this time exactly as the guy who claimed to be successful:
- leaving D6 in place
- not connecting to the (insulated) Pin of the Header 12 but directly to the ESP-Prog.
Result:
> No board blocking at the moment
>when uploading via Programmer: ****[vMicro]**** Uploading App :Error: JTAG scan chain interrogation failed: all ones
Back to top
 
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline



Posts: 1456
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #9 - Apr 27th, 2022 at 12:43pm
 
Thanks for confirming about the sketch, I've tripped over that with the sketch on chip was my reason for asking.

The ESP-PROG does seem to hold GPIO12 (TDI) High, until the RST button on the ESP-PROG is pressed, which puts it to LOW allowing the board to boot as expected.

If you also connect the EN pin from the ESP-PROG to the boards' EN pin, then pressing either reset on the board or the ESP-PROG will perform the reset correctly and allow the board to startup correctly. (we will amend our wiring diagrams to show this correctly).
https://docs.espressif.com/projects/espressif-esp-iot-solution/en/latest/hw-refe...

If your board does not have the EN pin exposed (I cannot see it on the pinout for this board), tapping the reset button on the board may resolve the "target is still busy" when trying the upload.

For now it may be best to just upload to the board through the USB-Serial (or route the Serial via ESP-PROG), to remove the programming element, and focus on the debugging side of things.


Back to top
« Last Edit: Apr 27th, 2022 at 1:32pm by Simon@Visual Micro »  
 
IP Logged
 
Chris2N
Junior Member
**
Offline



Posts: 17
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #10 - Apr 27th, 2022 at 2:31pm
 
Hello Simon,
Thanks for your comments.

The behaviour is strange:

when I started today the board kept on blocking. As you recognised correctly, there is no EN-connector on my board.
So I tried to use the reset button during upload without success (when exactly to push it?).
Furthermore I found out, that pushing the reset button (on the board or on the ESP Prog) sometimes results in a proper reset and sometimes the board keeps on hanging in the blocked state.

I went back to the old board.txt file enclosed with the following results:
The blocking problem completely vanished. Hardware upload works now (but takes extremely long)
I get one of the following pop-up-error messages:
  • Unable to start debugging. Launch options string provided by the project system is invalid. The string is null or empty.
  • Unable to start debugging. Unexpected GDB output from command "-exec-run". Don't know how to run. Try "help target".

I would have enclosed also the output, but this has vanished when the pop-up came.

Maybe this problem is similar to the failure to attach properly. (At least it gives the same Error message.)

BR
Chris
Back to top
 

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



Posts: 17
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #11 - Apr 27th, 2022 at 2:40pm
 
PS:
Disabling the first line in the board.txt (and correction of the typographic quotes that were there by mistake) gives the same result: 

Unable to start debugging. Launch options string provided by the project system is invalid. The string is null or empty.
Back to top
 

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



Posts: 17
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #12 - Apr 27th, 2022 at 2:55pm
 
PPS:
Of course the output didn't vanish and could be revealed selecting "Micro Build" in the dropdown.
Back to top
 

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



Posts: 1456
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #13 - Apr 27th, 2022 at 3:02pm
 
Thanks for the update.

To our knowledge the newer OpenOCD versions were only needed for the newer ESP WROVER-E (and others such as S2/C3) modules, however your experience seems to indicate there is something we are missing here.

Upload:
From your board.txt you are using the latest OpenOCD for the programming, and this works correctly from your report.

Does this only work on "openocd-esp32-0.10.1-2021.11.11" (latest), or does it also work on the "openocd-esp32-0.10.1-2021.07.21" or "openocd-espressif-esp32-10.0.1" (default if not overriden)?

Debug
This is using the default "openocd-espressif-esp32-10.0.1" version, does this improve if you uncomment the below line?
Code:
tools.openocd.debug.path={runtime.tools.openocd-esp32-0.10.1-2021.11.11.path} 



If you can ensure the vMicro > Uploader > Verbose is enabled, and try the Debug > Attach to Process again, and attach the log from Output > Micro Build, we should be able to see why the Launch Options String is invalid.

Back to top
 
 
IP Logged
 
Chris2N
Junior Member
**
Offline



Posts: 17
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #14 - Apr 27th, 2022 at 3:12pm
 
One more postscriptum:
I overlooked somehow your last advice. Using the serial upload is much faster but gives the same pop-up-error-message:

Unable to start debugging. Launch options string provided by the project system is invalid. The string is null or empty.
Back to top
 
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline



Posts: 1456
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #15 - Apr 27th, 2022 at 3:49pm
 
Thanks for the information about the serial upload.

So we can understand the Debugging issue further, can you ensure the vMicro > Uploader > Verbose is enabled, and try the Debug > Attach to Process again, and attach the log from Output > Micro Build, we should be able to see why the Launch Options String is invalid.

Also please confirm you are not using a custom debugger launch options.json file (it will be visible in solution explorer, and is added when using the vMicro > Add Code > Add Custom GDB Debugger (Advanced) menu option).
Back to top
 
 
IP Logged
 
Chris2N
Junior Member
**
Offline



Posts: 17
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #16 - Apr 27th, 2022 at 4:01pm
 
Thanks for your new comment. Enabled Uploader > Verbose.
2021.07.21 can do uploading as well as 2021.11.11 with commenting out the debug path.
But both result in:
Unable to start debugging. Launch options string provided by the project system is invalid. The string is null or empty.

openocd-espressif-esp32-10.0.1 version fails to upload via ESP PROG.

See enclosed files.
Back to top
 

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



Posts: 17
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #17 - Apr 27th, 2022 at 4:02pm
 
and the last file.
Back to top
 

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



Posts: 17
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #18 - Apr 27th, 2022 at 4:17pm
 
Thanks for your latest comment.

I can confirm I'm not using a custom debugger launch options.json file (have not used  Add Code > Add Custom GDB Debugger (Advanced), and can not see it in Solution explorer.)

Trying to attach to process adds only the last line (regarding the project build property overrides) to the Output:

     
..
The upload process has finished.
# Copy build result to 'Project>Property Pages>Intermediate Directory'
# Destination: "file:///E:/Eigene%20Dateien/Quelltexte/Arduino/Arduino/ESP32/OfenSteuerung/Debu
g/"


shutdown command invoked
Using project build property overrides from E:\Eigene Dateien\Quelltexte\Arduino\Arduino\ESP32\OfenSteuerung\board.txt


Back to top
 
 
IP Logged
 
Chris2N
Junior Member
**
Offline



Posts: 17
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #19 - Apr 27th, 2022 at 4:29pm
 
here complete output after successful uploading (via ESP Prog & Serial) and unsuccessfull start of debug session & attaching
Back to top
« Last Edit: Apr 27th, 2022 at 4:37pm by Chris2N »  

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



Posts: 1456
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #20 - Apr 28th, 2022 at 4:27pm
 
Thanks for the update and I believe I have found an issue in how the commands are manipulated in the new gdb tooling system.

If you change your board.txt, and replace the two debug entries with the below, does this allow the debugging to begin?
Code:
# Debugger Patterns
 debug.gdbscript.adapter_khz=2000
 tools.openocd.debug.path={runtime.tools.openocd-esp32-0.10.1-2021.11.11.path}
 tools.openocd.debug.args={params.verbose} -l "{{build.path}/{build.project_name}_DebugOpenOCD.log}" -s "{path}/share/openocd/scripts/" -f "{path}/share/openocd/scripts/interface/{build.openocddebugger}" -c "set ESP32_RTOS none" -f "{path}/share/openocd/scripts/board/{openocdscript}" {initCmd} 

Back to top
 
 
IP Logged
 
Chris2N
Junior Member
**
Offline



Posts: 17
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #21 - Apr 28th, 2022 at 5:01pm
 
unfortunately it is not working. The behaviour seems to be unchanged: Upload via Serial & ESP-Prog works, but Hardware Debugging fails (Launch options string-Error again)

Attaching adds only this line to the output (as before)
Using project build property overrides from E:\Eigene Dateien\Quelltexte\Arduino\Arduino\ESP32\OfenSteuerung\board.txt
Back to top
 

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



Posts: 17
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #22 - Apr 29th, 2022 at 6:41pm
 
Problem was solved  Smiley with help of Simon and the debugger patterns he gave. (Many thanks!)
I attach the boards.txt that finally worked for me in Visual Micro 2022.218.2205 and 2022.429.2200

One contribution to the problem was also, that I didn't had  the option
Visual Micro > Debugger set to Debug: Hardware in all relevant projects.

PS: Also worked with my other batch of TTGOs (DOWDQ5 CPU, the Batch I tried first was DOWDQ6) and leaving D6 in place.
(Simplified Cabeling mentioned by kiromaisus: https://github.com/Xinyuan-LilyGO/TTGO-T-Display/issues/6#issuecomment-899104385
)

See also attached photo. (If you do the same, don't forget to insulate the header pin used for GPIO 14 against the ground conector on that place on the board e.g. with a piece of shrink tube.)
Back to top
« Last Edit: May 4th, 2022 at 2:48pm by Chris2N »  

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



Posts: 1456
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #23 - May 6th, 2022 at 4:50pm
 
We have released an updated version (22.04.29-1) which should work correctly with a pattern containing -c "adapter_khz 2000" , which is available from the top of the board below:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES
Back to top
 
 
IP Logged
 
Pages: 1 
Send Topic Print