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  Send TopicPrint
Hot Topic (More than 8 Replies) ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one (Read 6369 times)
Chris2N
Junior Member
**
Offline


Posts: 25
Joined: Apr 23rd, 2022
ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Apr 23rd, 2022 at 5:58pm
Print Post  
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: 25
Joined: Apr 23rd, 2022
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #1 - Apr 23rd, 2022 at 6:01pm
Print Post  
PS: Here the Output Files, that seem to have not been uploaded with my first post.
  

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


Posts: 2144
Joined: Feb 13th, 2019
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #2 - Apr 25th, 2022 at 10:05am
Print Post  
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?
« Last Edit: Apr 25th, 2022 at 10:38am by Simon@Visual Micro »  
Back to top
 
IP Logged
 
Chris2N
Junior Member
**
Offline


Posts: 25
Joined: Apr 23rd, 2022
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #3 - Apr 25th, 2022 at 3:54pm
Print Post  
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 
  

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


Posts: 25
Joined: Apr 23rd, 2022
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #4 - Apr 25th, 2022 at 3:56pm
Print Post  
PS: additional pictures.
  

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


Posts: 25
Joined: Apr 23rd, 2022
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #5 - Apr 25th, 2022 at 4:02pm
Print Post  
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
*****
Online


Posts: 2144
Joined: Feb 13th, 2019
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #6 - Apr 26th, 2022 at 2:15pm
Print Post  
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: 25
Joined: Apr 23rd, 2022
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #7 - Apr 26th, 2022 at 4:31pm
Print Post  
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: 25
Joined: Apr 23rd, 2022
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #8 - Apr 26th, 2022 at 5:48pm
Print Post  
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
*****
Online


Posts: 2144
Joined: Feb 13th, 2019
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #9 - Apr 27th, 2022 at 11:43am
Print Post  
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.


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


Posts: 25
Joined: Apr 23rd, 2022
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #10 - Apr 27th, 2022 at 1:31pm
Print Post  
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
  

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


Posts: 25
Joined: Apr 23rd, 2022
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #11 - Apr 27th, 2022 at 1:40pm
Print Post  
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.
  

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


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

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


Posts: 2144
Joined: Feb 13th, 2019
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #13 - Apr 27th, 2022 at 2:02pm
Print Post  
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
Select All
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: 25
Joined: Apr 23rd, 2022
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #14 - Apr 27th, 2022 at 2:12pm
Print Post  
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
*****
Online


Posts: 2144
Joined: Feb 13th, 2019
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #15 - Apr 27th, 2022 at 2:49pm
Print Post  
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: 25
Joined: Apr 23rd, 2022
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #16 - Apr 27th, 2022 at 3:01pm
Print Post  
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.
  

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


Posts: 25
Joined: Apr 23rd, 2022
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #17 - Apr 27th, 2022 at 3:02pm
Print Post  
and the last file.
  

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


Posts: 25
Joined: Apr 23rd, 2022
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #18 - Apr 27th, 2022 at 3:17pm
Print Post  
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: 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: 25
Joined: Apr 23rd, 2022
Re: ESP Prog / LilyGO-TTGO-T-Display (16MB ESP32) : JTAG scan chain interrogation failed: all one
Reply #19 - Apr 27th, 2022 at 3:29pm
Print Post  
here complete output after successful uploading (via ESP Prog & Serial) and unsuccessfull start of debug session & attaching
« Last Edit: Apr 27th, 2022 at 3:37pm by Chris2N »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint