BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Problem in uploading program to espresso lite v2.0

esp8266

#1

I am trying to upload the program using arduino IDE and i get this error

error: can’t read ELF file header

error: wrong header for ELF file!

Using library ESP8266WiFi at version 1.0 in folder: C:\Users\Teo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0\libraries\ESP8266WiFi
Using library Blynk at version 0.6.1 in folder: C:\Users\Teo\Documents\Arduino\libraries\Blynk
exit status 2
Error compiling for board ESPresso Lite 2.0.

Below is my code

#define BLYNK_PRINT Serial

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "08c153c664b449c3b094f4c54d55a469";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Mi8";
char pass[] = "0123456789";

void setup()
{
  Serial.begin(115200);
  Blynk.begin(auth, ssid, pass);
}

void loop()
{
  Blynk.run();
}

#2

I’m guessing from what you’ve said that the problems isn’t actually at the upload stage, but at the compile stage of the process.
If you choose Sketch, Verify/Compile in the IDE then I think you should see the same error message.

If I compile your code for the same board then it compiles fine. I cant upload it, as I don’t have one of these boards, but as I said, I think the issue is that it’s not compiling.

I think the ELF files are temporary files created by the IDE during the compile process.
I’d try closing ALL of your Arduino IDE windows and re-starting it. If this doesn’t fix the problem then try a reboot.
If you’re still having problems the try clearing-out the contents of your Arduino Temp files, which probably live at C:\Users\Teo\AppData\Local\Temp\ and have file names begining arduino_

If all that fails then try a re-install of the Arduino IDE and Arduino core.

Pete.


#3

If you go to File->Preferences,

image

It may give you a little more information.


#4


#5

It’s executing the second to the last step. Can you make sure this file is there …

C:\Users\Teo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.0/bootloaders/eboot/eboot.elf


#6

I’ve solved it by running the Arduino as administrator and my program can be uploaded now because I saw the line during compiling

“cmd.exe /c rem cannot sign on windows”

Still not sure why is this happening
But thanks for ur help guys.


#7

That message pops up when I compile code. I think it happened as a result of the latest Arduino core.
It doesn’t cause me any problems though, so I just ignore it. I keep meaning to google the message, but haven’t gotten around to that yet.

Needing to run the IDE as administrator probably means that the permissions on some of the folders are messed-up.

Pete.


#8

Yes, image isn’t the issue.

I can’t see from your screenshot exactly where the ELF file is being written, but it’s something like this,

C:\Users\Teo\AppData\Local\Temp\arduino_build_NNNNNN/


#9

Here’s a solution to the problem in the event someone else runs into it,

https://www.arduino.cc/en/Guide/PortableIDE

As you can imagine, schools run into this problem all the time.

I suspect we’re all running the Arduino IDE as administrators.