Error message when compiling


i have the Arduino board for a while but evrytime I try to compile a sketch this error message is shown: Couldn't determine program size: C:\Dokumente und Einstellungen\Festblatte\Desktop\arduino-0013\hardware/tools/avr/bin/avr-size: 'C:\DOKUME~1\FESTBL~1\LOKALE~1\Temp\build52050.tmp\Blink.hex': No such file

It also occur when I try to compile the example sketches

Can someone help me?

Thanks and Goodbye

Ill be the first to ask:

Have you had this working in the past? Which Arduino board. Which version of the ide. What operating system on your pc.

Have you selected the correct board. Have you selected the right usb port ot serial port.

Have you gone through the getting started instructions.



Yes i have had this working in the past since I have the arduino. I have the Arduino Diecimila. I´d tried it with ide version 10 - 13. My operation system is Windows XP Home edition SP3.

I have selected the correct board and the correct Usb port

I hope someone can help me.


[split] [splithere][splithere_end]

Festblatte: do you get any other messages when you try to compile a sketch?

mellis: No I only get the message form above

is nobody there who have an idea how to fix this problem?

Try moving the files closer to C:\ drive and make sure app is running as admin, board is installed correctly and is right com port..

I moved the files as close as possible to the C: and the app is running as admin, but it doesn't help anything. I think its not a porblem with avr-size.exe I think the problem is a bug in Arduino software.


Yes i have had this working in the past since I have the arduino. I´d tried it with ide version 10 - 13.

I think the problem is a bug in Arduino software.

Why do you think that?

If it no longer works with earlier Arduino versions that used to work, something has probably changed in your environment that has stopped it working.

I have Problems with my JRE. I only haver JRE 1.6 because i can not install newer versions Can it have somethig to do with this?


I run java build 1.6.0_11 on XP Pro SP3 without problem.

Perhaps look at the windows event view to see if you are getting any warnings or errors that could give a clue as to what is happening.

Try doing these steps: 1. delete C:\DOKUME~1\FESTBL~1\LOKALE~1\Temp\build52050.tmp\Blink.hex (in windows explorer); 2. if you are not allowed, the file may be missing (but a reference to it still around) or just locked somehow; in this case, restart your computer and perform 1. again (it should work this time); 3. restart Arduino IDE, load the sketch from the example directory; compilation (and save) should work now.

The only problem is that Arduino always delete the build52050.tmp directory when its closed because this directory is in the directory for the temporary files.


If you set build.verbose=true in the Arduino IDE preferences.txt file then it should show you more what's going on and give a clue how to fix it.


I've followed the advise from Andrew. Now this is shown when i try to compile:

C:\arduino-0013\hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -IC:\arduino-0013\hardware\cores\arduino C:\arduino-0013\hardware\cores\arduino\pins_arduino.c -oC:\DOKUME~1\FESTBL~1\LOKALE~1\Temp\build51871.tmp\pins_arduino.c.o

Couldn't determine program size: C:\arduino-0013\hardware/tools/avr/bin/avr-size: 'C:\DOKUME~1\FESTBL~1\LOKALE~1\Temp\build51871.tmp\Blink.hex': No such file

I dont really know what to do with this. Perhaps anybody other know now what to do


From what I understand, your Arduino IDE generates the hex file in a temp folder? Why don't you try to save the loaded sketch first (yes, right after you loaded it). On my machine (I use Arduino 011), it defaults to "Desktop/MyDocuments/Arduino". That is where the hex file gets created.

Thanks florinc for your tip but it doesnt help. The same error message from above occures


When I compile "Blink" I get this lot before it tries to determine the program size. Are you sure there aren't any other messages?


D:\arduino-0013\hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -ID:\arduino-0013\hardware\cores\arduino D:\arduino-0013\hardware\cores\arduino\pins_arduino.c -oD:\arduino-0013\examples\Digital\Blink\applet\pins_arduino.c.o 

D:\arduino-0013\hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -ID:\arduino-0013\hardware\cores\arduino D:\arduino-0013\hardware\cores\arduino\WInterrupts.c -oD:\arduino-0013\examples\Digital\Blink\applet\WInterrupts.c.o 

D:\arduino-0013\hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -ID:\arduino-0013\hardware\cores\arduino D:\arduino-0013\hardware\cores\arduino\wiring.c -oD:\arduino-0013\examples\Digital\Blink\applet\wiring.c.o 

D:\arduino-0013\hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -ID:\arduino-0013\hardware\cores\arduino D:\arduino-0013\hardware\cores\arduino\wiring_analog.c -oD:\arduino-0013\examples\Digital\Blink\applet\wiring_analog.c.o 

D:\arduino-0013\hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -ID:\arduino-0013\hardware\cores\arduino D:\arduino-0013\hardware\cores\arduino\wiring_digital.c -oD:\arduino-0013\examples\Digital\Blink\applet\wiring_digital.c.o 

D:\arduino-0013\hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -ID:\arduino-0013\hardware\cores\arduino D:\arduino-0013\hardware\cores\arduino\wiring_pulse.c -oD:\arduino-0013\examples\Digital\Blink\applet\wiring_pulse.c.o 

D:\arduino-0013\hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -ID:\arduino-0013\hardware\cores\arduino D:\arduino-0013\hardware\cores\arduino\wiring_serial.c -oD:\arduino-0013\examples\Digital\Blink\applet\wiring_serial.c.o 

D:\arduino-0013\hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -ID:\arduino-0013\hardware\cores\arduino D:\arduino-0013\hardware\cores\arduino\wiring_shift.c -oD:\arduino-0013\examples\Digital\Blink\applet\wiring_shift.c.o 

D:\arduino-0013\hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -ID:\arduino-0013\hardware\cores\arduino D:\arduino-0013\examples\Digital\Blink\applet\Blink.cpp -oD:\arduino-0013\examples\Digital\Blink\applet\Blink.cpp.o 

D:\arduino-0013\hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -ID:\arduino-0013\hardware\cores\arduino D:\arduino-0013\hardware\cores\arduino\HardwareSerial.cpp -oD:\arduino-0013\examples\Digital\Blink\applet\HardwareSerial.cpp.o 

D:\arduino-0013\hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -ID:\arduino-0013\hardware\cores\arduino D:\arduino-0013\hardware\cores\arduino\Print.cpp -oD:\arduino-0013\examples\Digital\Blink\applet\Print.cpp.o 

D:\arduino-0013\hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega168 -DF_CPU=16000000L -ID:\arduino-0013\hardware\cores\arduino D:\arduino-0013\hardware\cores\arduino\WMath.cpp -oD:\arduino-0013\examples\Digital\Blink\applet\WMath.cpp.o 

D:\arduino-0013\hardware/tools/avr/bin/avr-gcc -Os -Wl,--gc-sections -mmcu=atmega168 -o D:\arduino-0013\examples\Digital\Blink\applet\Blink.elf D:\arduino-0013\examples\Digital\Blink\applet\Blink.cpp.o D:\arduino-0013\examples\Digital\Blink\applet\HardwareSerial.cpp.o D:\arduino-0013\examples\Digital\Blink\applet\pins_arduino.c.o D:\arduino-0013\examples\Digital\Blink\applet\Print.cpp.o D:\arduino-0013\examples\Digital\Blink\applet\WInterrupts.c.o D:\arduino-0013\examples\Digital\Blink\applet\wiring.c.o D:\arduino-0013\examples\Digital\Blink\applet\wiring_analog.c.o D:\arduino-0013\examples\Digital\Blink\applet\wiring_digital.c.o D:\arduino-0013\examples\Digital\Blink\applet\wiring_pulse.c.o D:\arduino-0013\examples\Digital\Blink\applet\wiring_serial.c.o D:\arduino-0013\examples\Digital\Blink\applet\wiring_shift.c.o D:\arduino-0013\examples\Digital\Blink\applet\WMath.cpp.o -lm 

D:\arduino-0013\hardware/tools/avr/bin/avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 D:\arduino-0013\examples\Digital\Blink\applet\Blink.elf D:\arduino-0013\examples\Digital\Blink\applet\Blink.eep 

D:\arduino-0013\hardware/tools/avr/bin/avr-objcopy -O ihex -R .eeprom D:\arduino-0013\examples\Digital\Blink\applet\Blink.elf D:\arduino-0013\examples\Digital\Blink\applet\Blink.hex

Andrew: No I only get the message from above