• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

GDB: .pioinit:11: Error

Q&A Forum › Category: ESP32 › GDB: .pioinit:11: Error
0 Vote Up Vote Down
Joel Farnham asked 4 weeks ago

I
just downloaded VSCode and I keep getting this error when I try to
upload code to the ESP32.:Failed to launch GDB: .pioinit:11: Error in
sourced command file: Remote communication error. Target disconnected.

Latest versions of VSCode & PlatformIO.
DOIT ESP32 DEVKIT
 
Any fixes for this?

25 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 4 weeks ago

Hi.
Do you have another ESP32 to experiment with? Just to make sure it is not an hardware problem.
Regards,
Sara

0 Vote Up Vote Down
Joel Farnham answered 4 weeks ago

I have tried 4 units and the result is the same.  The debug console displays:

http://openocd.org/doc/doxygen/bugs.html

WARNING: boards/esp-wroom-32.cfg is deprecated, and may be removed in a future release.

adapter speed: 5000 kHz

Info : tcl server disabled

Info : telnet server disabled

Error: unable to find a matching CMSIS-DAP device

.pioinit:11: Error in sourced command file:

Remote communication error. Target disconnected.: Success.

I’m new to this, so I’m not sure where to look for a fix or assistance.  I’ve uninstalled everything and then reinstalled,
but the result is the same.

 

0 Vote Up Vote Down
Sara Santos Staff answered 4 weeks ago

Hi.
Which instructions did you follow to install VS Code?
Which code are you trying to upload?
How are you connecting your board to your computer? 
 
Can you show me some printscreen about your issue?
To share a printscreen upload a picture to google drive, dropbox, or imgur, and then share a link to the image.
 
Regards,
Sara

0 Vote Up Vote Down
Sara Santos Staff answered 4 weeks ago

That’s an error related to an ESP debugger. Are you using a debugger board?

0 Vote Up Vote Down
Joel Farnham answered 4 weeks ago

Hi Sara,
ERROR: https://drive.google.com/drive/u/2/my-drive
INSTRUCTIONS:  https://randomnerdtutorials.com/vs-code-platformio-ide-esp32-esp8266-arduino/
CODE:  BLINK example from the instructions followed above.
CONNECTION:  Computer USB Port and no Debugger Board.
PLATFORMIO.INI FILE: 

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200

 
Thank you for trying to help me with this problem.
Joel

0 Vote Up Vote Down
Joel Farnham answered 4 weeks ago

launch.json file:  https://drive.google.com/drive/u/2/my-drive

0 Vote Up Vote Down
Sara Santos Staff answered 4 weeks ago

Hi.
Please update your links to the drive. Those are not the correct links:

  1. Right click on the selected image in Google Drive
    2. Select “Get link”
    3. Copy link.

How are you connecting your board to the computer?
Which board do you have? Try selecting a different board when you create the project.
Regards,
Sara
 

0 Vote Up Vote Down
Joel Farnham answered 4 weeks ago

ERROR:  https://drive.google.com/file/d/1ZLBGMseRUZlcEF805kHsmpXwkoiywBZB/view?usp=share_link
JSON FILE: https://drive.google.com/file/d/1fcHHXv60vpmx1Zi2HqGhpEjtCknJMMss/view?usp=share_link
CONNECTION: Computer USB Port and no Debugger Board.

esp32doit-devkit-v1

I will try selecting a different board with a new project.
Thank you,
Joel

0 Vote Up Vote Down
Joel Farnham answered 4 weeks ago

Hi Sara,
I uninstalled PlatformIO, VSCode, and deleted all project folders.  I re-installed everything and verified the GDB version that is installed:  https://drive.google.com/file/d/16B7rwMJjeqhqgMw1dtJ27L7xBbKm3VOj/view?usp=share_link
I tried the BLINK code again using a new WRoom board, and got the same result, except if I understand the new debug console error correctly, it can’t find the GDB debugger.
Debug Console:  https://drive.google.com/file/d/1fcHHXv60vpmx1Zi2HqGhpEjtCknJMMss/view?usp=share_link
I installed the GDB following the instructions at this site:  https://code.visualstudio.com/docs/cpp/config-mingw
With those instructions, the GDB was installed in this folder:  C:\msys64\mingw64\bin
Has anyone else posted this problem?  I’ve tried searching the web for this error, but the results are minimal and in most cases, don’t apply.

0 Vote Up Vote Down
Sara Santos Staff answered 4 weeks ago

Hi.
I also couldn’t find any information about that issue.
At what stage exactly do you get that error?
Regards,
Sara
 

0 Vote Up Vote Down
Joel Farnham answered 4 weeks ago

The debugger error occurs after the GDB debugger is executed.  I located the GDB file and ran it without VSCode. 
This error:  “warning: Couldn’t determine a path for the index cache directory.”
comes from the GDB when it executes.
 

0 Vote Up Vote Down
Joel Farnham answered 4 weeks ago

This problem is occurring on my desktop computer in Windows 11.  I selected Ubuntu on the boot manager and attempted to download the program again, but this time the bootloader would not download the code.
I went to my laptop using Win 11 and tried VSCode on it, and surprise, I got the same errors with a different dev board on it as well.  The laptop has Ubuntu on it also, so I tried the same experiment, and it responded the same as the desktop Ubuntu. 
Is there any chance that you have a new computer you could install VSCode for the first time and see if perhaps you can duplicate the error?  Maybe there is a VSCode or PlatformIO bug?

0 Vote Up Vote Down
Sara Santos Staff answered 4 weeks ago

But why are you installing the debugger? Does VS Code ask you to install it?

0 Vote Up Vote Down
Joel Farnham answered 4 weeks ago

Installing the debugger was suggested in a thread when I was looking for a solution.  I downloaded the Arduino IDE and was able to upload the blink code to the ESP32 Dev board.  It successfully ran, but for some reason, VSCode just can’t make the connection.  I also installed the CP210x driver just in case mine was corrupt, but it made no difference.
 

0 Vote Up Vote Down
Joel Farnham answered 3 weeks ago

Hi Sara,
What WIN 11 USB driver are you using when you upload code to the esp32 from VSCode?

0 Vote Up Vote Down
Sara Santos Staff answered 3 weeks ago

Hi.
 
It depends on the board.
It can be the CP2101 or CH340 driver. These are the same if you’re using Arduino IDE. You don’t need to install them specifically for VS Code if you have already installed them for Arduino IDE.
 
As for the other error, I couldn’t find any information about that issue…
Do you have any more details?
 
Regards,
Sara

0 Vote Up Vote Down
Sara Santos Staff answered 3 weeks ago

Hi.
 
It depends on the board.
It can be the CP2101 or CH340 driver. These are the same if you’re using Arduino IDE. You don’t need to install them specifically for VS Code if you have already installed them for Arduino IDE.
 
As for the other error, I couldn’t find any information about that issue…
Do you have any more details?
 
Regards,
Sara

0 Vote Up Vote Down
Joel Farnham answered 3 weeks ago

I’m running the CP210x driver, and no success.  I’m going to try going back to Win 10 and see if that will work

0 Vote Up Vote Down
Sara Santos Staff answered 3 weeks ago

Does Arduino IDE work for you?

0 Vote Up Vote Down
Joel Farnham answered 3 weeks ago

Yes, it does.  I’ll have use the Arduino IDE until I can find a solution for using VSCode. 
I prefer the VSCode IDE, but it will have to wait.

0 Vote Up Vote Down
Sara Santos Staff answered 3 weeks ago

If Arduino IDE is working, at least we know that it is not an issue with the USB drivers.
 
Unfortunatley, I don’t know what else I can do to help troubleshoot this issue. Meanwhile, if you find more information, please share.
 
Regards,
Sara

0 Vote Up Vote Down
Joel Farnham answered 3 weeks ago

This is really bizarre. 
I’ve tried using VSCode & PlatformIO on 2 different Win 11 computers, and on 3 different Ubuntu machines.  The error is the same in all cases.
I will share any new discoveries, and I hope that you will as well.
thanks for trying!
Joel

0 Vote Up Vote Down
Sara Santos Staff answered 3 weeks ago

Ok. Thanks.
I’ll do.
Regards,
Sara

0 Vote Up Vote Down
Joel Farnham answered 2 weeks ago

Hi Sara,
After VERY carefully reading the instructions, I got VSCode to upload code to the board.  I was trying to upload by using the RUN> START DEBUGGING command in the VSCode menu bar instead of the UPLOAD command in the PlatformIO menu.  Proof that men don’t read instructions!!!
On to the next problem!
Joel

0 Vote Up Vote Down
Sara Santos Staff answered 2 weeks ago

Ok.
I’m glad you found the issue.
I’ll mark this issue as resolved. If you need further help, you just need to open a new question in our forum.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] SMART HOME with RPi, ESP32, and ESP8266 (version 1.2) March 8, 2023
  • [eBook Updated] ESP32-CAM Projects (version 1.3) January 7, 2023

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2023 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.