espressif / arduino-esp32

Arduino core for the ESP32
GNU Lesser General Public License v2.1
13.43k stars 7.38k forks source link

xtensa-esp32-elf-g++": file does not exist Error compiling for board Adafruit ESP32 Feather. #961

Closed perigalacticon closed 6 years ago

perigalacticon commented 6 years ago

Please fill the info fields, it helps to get you faster support ;)

If you have a Guru Meditation Error, please decode it: https://github.com/me-no-dev/EspExceptionDecoder

----------------------------- Remove above -----------------------------

Hardware:

Board: ?Adafruit ESP32 Feather? Core Installation/update date: ?12/31/17? IDE name: ?Arduino IDE? Flash Frequency: ?40Mhz? Upload Speed: ?115200?

Description:

I get this error when compiling any sketch for the ESP32 Feather: exec: "C:\\Users\\Perigalacticon\\Documents\\Arduino\\sketches\\hardware\\espressif\\esp32/tools/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++": file does not exist Error compiling for board Adafruit ESP32 Feather.

I tried reinstalling the core 4 times, the directions say that the sketchbook directory is:

Sketchbook Directory: Usually C:/Users/[YOUR_USER_NAME]/Documents/Arduino

But this is not true, this is not the usual sketchbook directory, usually it is: C:/Users/[YOUR_USER_NAME]/Documents/Arduino/sketches.

Anyway I can't compile any sketch if installed to either directory, it gives the error immediately that it can't find the files and I have restarted and reinstalled everything several times. Can you please help me. I have a standard up-to-date IDE installation on Windows10 64 bit.

Sketch:


//Change the code below by your sketch
#include <Arduino.h>

void setup() {
}

void loop() {
}

Debug Messages:

Enable Core debug level: Debug on tools menu of Arduino IDE, then put the serial output here 
WereCatf commented 6 years ago

Did you run get.exe?

perigalacticon commented 6 years ago

Yes. Also now I cannot upload to any esp8266 either by FTDI, only OTA. There are missing files here also, this is the error: java.io.IOException: Cannot run program "C:\Users\Perigalacticon\Documents\Arduino\sketches\hardware\esp8266com\esp8266/tools/esptool/esptool.exe": CreateProcess error=2, The system cannot find the file specified

How do I reinstall the esp8266? I used the boards manager. And Esp32 will still not compile.

This is my directory structure for esp8266:

capture2

Can you help me fix this?

perigalacticon commented 6 years ago

FYI I fixed the ESP8266 section by deleting the ESP8266com directory and restarting now it compiles again and uploads for the ESP8266, but I have the same error for the ESP#2, it doesn't find the files.

perigalacticon commented 6 years ago

So I tried installing this to both the \Documents\Arduino\sketches\hardware\espressif\esp32 directory and the \Documents\Arduino\hardware\espressif\esp32 directory. When installed in the non-sketches directory I don't get a list of ESP32 boards in the menu. I have installed in both locations twice and the same thing happens. I deleted the espressif directory in each before proceeding. For the sketches directory install I get the boards list but nothing will compile. I have a 64bit machine so I also have an Arduino directory at C:\Program Files (x86)\Arduino. Is it supposed to be installed here instead? I really appreciate your help I am looking forward to using the board.

RbotJ commented 6 years ago

Was running into the same issue with xtensa-esp32-elf not appearing in my tools directory. It appeared (almost magically) after I uninstalled the ide (1.8.2) and installed the most recent version (1.8.5). I have now successfully uploaded and tested the "touch" sample sketch.

mpo881 commented 6 years ago

I have been going around and around with this for days now. I started with Arduino 1.6.5 and could not get a sketch to compile to Wemos D1 Mini. So, I upgraded to Arduino 1.8.5. Now I am getting the same error as the OP reports. I have tried all the same remidies without success. I have no clue what the fix is!

mpo881 commented 6 years ago

I found this and ran all the python script. That fixed the wemos, no luck with the ESP32 Dev board though https://github.com/espressif/arduino-esp32/issues/581

ron15 commented 6 years ago

I have encountered the same problem and solve it by running the get.exe again but as administrator.

Here's what i've done: Right Click "get.exe" and select "run as administrator".

Hope this solves your issue.

mpo881 commented 6 years ago

@ron15 Ill give it a try. Thank you for your reply

mimansamaheshwari commented 6 years ago

I read the discussion regarding and also followed to get rid of this problem but still can't find reason why this is happening. I am also getting this compiling error, "C:\Program Files (x86)\Arduino\hardware\espressif\esp32/tools/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++": file does not exist". I ran get.exe as administrator as well but that too didn't work. Can anyone help? please!

ron15 commented 6 years ago

hmmm... its really odd.. are you connected to the internet while doing this? I think get.exe downloads the files needed. In my case, i just assumed that windows doesnt allow the program to write on the directory that's why I tried to run it as administrator.

The get.exe must be in the "C:\Program Files (x86)\Arduino\hardware\espressif\esp32" i suppose.

Also check the directory "C:\Program Files (x86)\Arduino\hardware\espressif\esp32/tools/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++" if it exist.

alexvaughn23 commented 6 years ago

Running get.exe as an Administrator worked for me to solve the xtensa problem in compiling. Also I extracted the core directly into the C:\Program Files(86x)....expressif, then renamed the folder to esp32. Just ran my first blink upload. Officially good to go. Wish it was this easy on Mac... Let me know if you find a solution for the ESP32 for High Sierra on a Macbook.

gautam-chebrolu commented 6 years ago

I was having the same issue as OP for a while and the solution that worked for me was to make sure all the slashes are in the same direction when cloning the repository from Git. I originally had the source directory as: "C:\Users\[name]\Documents\Arduino\sketches\hardware/espressif/esp32" and it would look like it would work because most of the files would load and the libraries would be available in Arduino, but "get.exe" would take forever and just not finish executing and there were issues compiling in the Arduino IDE. Then I changed it the source directory to: "C:/Users/[name]/Documents/Arduino/sketches/hardware/espressif/esp32" and then everything started working.

thkinker commented 6 years ago

To make the get.exe to create the xtensa-esp32-elf folder on my Windows machine I had to change the 'Enable CyberCapture' to 'allow me to decide' in my AVG settings. Run the get.exe as administrator and now it's working as expected.

everslick commented 6 years ago

This issue is closed, because it looks as if it is not a bug or problem with the ESP32 Arduino core or its support libraries. For general API usage questions or help on specific coding challenges, please visit the arduino-esp32 Gitter channel. If you feel this issue was closed in error, reopen it and comment, why you think this is a bug in the Arduino-Core.

KevinLod commented 6 years ago

I have the same problem "xtensa-lx106-elf-g++ does not exist", and im not sure how to run get.exe , Im new at all this , please help me to address this issue easily , I've this problem since 2 weeks ago

KevinLod commented 6 years ago

@ron15 , would you please tell me how to run get.exe

cyhuvraak commented 6 years ago

@KevinLod check espressif\esp32\tools folder

Vadim981 commented 5 years ago

Когда запускаєш get.exe нужно не закрывать окно програми get.exe, а подождать полной загрузки. Все файли автоматически установляться у папки

Anders-McLean commented 5 years ago

@KevinLod check espressif\esp32\tools folder

Thx this solved the problem for me.

UtkarshChandel commented 5 years ago

Hope this helps.

babursenturk commented 4 years ago

This is totally SSL problem. Using another internet connection without any firewall restriction will resolve the problem. Probably you have strong firewall rules. (Maybe your company uses Fortinet.) I'm sure you can't send https request through GIT not only for this but also many others. In order to test it; open a GIT GUI and clone a repostry from Hub with have https prefix. If fetching is not start and give an error then probably you have firewall.

anuparp-b commented 4 years ago

In my case, I found errors fork/exec C:\Users\xxxx\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0/bin/xtensa-esp32-elf-g++.exe: The file or directory is corrupted and unreadable. Error compiling for board Heltec WiFi LoRa 32(V2).

At C:\Users\xxxx\AppData\Local\Arduino15\packages, there are two folders.

Which their sub-folders have "xtensa-esp32-elf-g++.exe" . I guessed that Arduino IDE is confused between two paths when compile programs.

Therefore, I tried to move the folder of esp32 to my desktop folder. The problem is solved that i can run Heltec-esp32 agian.

thaynapatricio commented 2 years ago

Hey Guys! This video soved my problem in VSCode Error: exec:" / bin / xtensa-esp32-elf-g ++

www.youtube.com/watch?v=d1D83G-PpqM

Murkas94 commented 1 year ago

I had this issue after updating the esp32-library through VS-Code with the Arduino-Plugin (from Microsoft, not PlatformIO). I fixed it by using the Arduino-IDE to uninstall and then install the esp32-library again.