Error encountered when trying to upload sketch via ethernet

Just want to hang out with other Makers and chat about stuff? This is the place to do it.
Post Reply
fauxin
Posts: 1
Joined: Fri May 23, 2014 9:09 pm

Error encountered when trying to upload sketch via ethernet

Post by fauxin » Fri May 23, 2014 9:21 pm

Hello all,

I am following along in this guide:
http://www.freetronics.com/pages/how-to ... .U3-5qfldV__

And have completed steps 1-4 successfully. I am using an Arduino Duo as an ISP programmer to program an Arduino Ethernet.

I have run into an error on point 3 under heading, "Convert sketch for bootloader":

"Now, type the following using the file path to the compiled sketch you found in the last part of the "Compile a sketch" section above:"

the file, "avr-objcopy.exe" for me is located in "C:Program Files (x86)\Arduino\hardware\tools\avr\bin" and my compiled arduino sketch is located in, "C:\Users\User\AppData\Local\Temp\build5255491776347625105.tmp\PID_Development.cpp.elf".

However, when I run the following command I get an error.
"C:Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-objcopy.exe" -j .text -j .data -O binary C:\Users\User\AppData\Local\Temp\build5255491776347625105.tmp\PID_Development.cpp.elf PID_Development.bin

The error I get is, "File Format Not recognized".

Does anyone know why this happens? Are there any work arounds or things that I need to install/fix?

Thanks in advance.

mcmenon
Posts: 9
Joined: Thu Jul 07, 2016 10:21 pm

Re: Error encountered when trying to upload sketch via ethernet

Post by mcmenon » Wed Jul 13, 2016 12:52 am

I'm experiencing exactly the same problem - did you ever figure this out? I've tried a few things

- downloading an up to date version of gcc tools from atmel (instead of what came with my old arduino version)

- adding / removing commands such at -j, -I

- indicating the .elf file was elf32, elf-little, elf-big

FWIW I'm running this from the command prompt, windows 10

mcmenon
Posts: 9
Joined: Thu Jul 07, 2016 10:21 pm

Re: Error encountered when trying to upload sketch via ethernet

Post by mcmenon » Wed Jul 13, 2016 7:05 pm

Solved this problem

Apparently my .elf file was corrupted. I restarted everything and re-ran the verification from the IDE and created a new ELF file - this worked.

Post Reply