Error while trying to load sketch

Got today arduino and tried to write my first sketch to board but got error. Don’t know what to do. COM port is right (Windows 7 OS)
Arduino: 1.6.10 Hourly Build 2016/07/25 02:33 (Windows 7), Board: “Arduino/Genuino Uno”

Sketch uses 940 bytes (2%) of program storage space. Maximum is 32,256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2,039 bytes for local variables. Maximum is 2,048 bytes.
{runtime.tools.avrdude.path}/bin/avrdude -C{runtime.tools.avrdude.path}/etc/avrdude.conf -v -patmega328p -carduino -PCOM3 -b115200 -D -Uflash:w:C:\Users\BeeLan\AppData\Local\Temp\build5969a8acd55003149673155f19ff1be2.tmp/sketch_jul25a.ino.hex:i
java.io.IOException: Cannot run program “{runtime.tools.avrdude.path}/bin/avrdude”: CreateProcess error=2, Не удается найти указанный файл
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at processing.app.helpers.ProcessUtils.exec(ProcessUtils.java:26)
at cc.arduino.packages.Uploader.executeUploadCommand(Uploader.java:130)
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:209)
at cc.arduino.UploaderUtils.upload(UploaderUtils.java:78)
at processing.app.Sketch.upload(Sketch.java:1187)
at processing.app.Sketch.exportApplet(Sketch.java:1160)
at processing.app.Sketch.exportApplet(Sketch.java:1132)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2409)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: CreateProcess error=2, Не удается найти указанный файл
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.(ProcessImpl.java:386)
at java.lang.ProcessImpl.start(ProcessImpl.java:137)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
… 9 more
An error occurred while uploading the sketch

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

Why use a ‘beta’ release of the IDE? Try IDE version 1.6.9.

Thank you! It works with new version!

I have the same problem. Tested version 1.6.10 this morning on Windows 10.

report v1.6.10.txt (39.5 KB)

Putter:
I have the same problem.

Please do File > Preferences > Show verbose output during: upload(check) then try uploading again and post the full output. Please post the text directly in your forum message using code tags(</> button on the toolbar) whenever possible because this makes it easier for people here to look at it. If it’s longer than the forum will allow then it’s fine to use an attachment.

@Putter

Just reporting this? Or looking for a solution? For the latter, see reply #1.

Same problem with 1.6.10 on Windows 10. No more info on the upload error when showing verbose output.

Works fine with 1.6.9. :slight_smile:

Jim

Workaround - 1.6.10 uploads OK if you DON'T open a sketch by double-clicking it in Windows Explorer or similar.

Updated to 1.6.10, win 10 same issue, no further details with verbose. Tried opening via file>menu>open still no joy.

Try what jgmdavies said: Start the Arduino IDE, then open the sketch via File > Open, File > Sketchbook, or File > Examples. The problem seems to be caused when you open a sketch directly(by double clicking on the .ino file, etc.).

This issue has been reported to the Arduino developers here: Windows 10 64Bit, Arduino 1.6.10 upload issue. · Issue #5173 · arduino/Arduino · GitHub

Sorry, what I wrote wasn't very clear. I meant try closing the IDE, then restart it normally(without opening a sketch) file, then use File > open as you did before.

I moved back to IDE 1.6.9, and loaded a simple sketch (a few calcualtions, Serial I/O) - it loaded and ran without errors. Then I tried a slightly more complex sketch (LCD and RTC), and it blocked "Uploading" after the memory usage lines. I tried again with the second program and it loaded with the following output:

avrdude: Version 6.3, compiled on Jun 22 2016 at 16:05:21
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Users\Bob Gilman\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino2/etc/avrdude.conf"

Using Port : COM3
Using Programmer : arduino
Overriding Baud Rate : 115200
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : Arduino
Description : Arduino
Hardware Version: 3
Firmware Version: 4.4
Vtarget : 0.3 V
Varef : 0.3 V
Oscillator : 28.800 kHz
SCK period : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "C:\Users\BOBGIL~1\AppData\Local\Temp\build035381eb57ccce2bf9dc82d1a987f4d1.tmp/DS3231DSTmon.ino.hex"
avrdude: writing flash (19962 bytes):

Writing | ################################################## | 100% 3.27s

avrdude: 19962 bytes of flash written
avrdude: verifying flash memory against C:\Users\BOBGIL~1\AppData\Local\Temp\build035381eb57ccce2bf9dc82d1a987f4d1.tmp/DS3231DSTmon.ino.hex:
avrdude: load data flash data from input file C:\Users\BOBGIL~1\AppData\Local\Temp\build035381eb57ccce2bf9dc82d1a987f4d1.tmp/DS3231DSTmon.ino.hex:
avrdude: input file C:\Users\BOBGIL~1\AppData\Local\Temp\build035381eb57ccce2bf9dc82d1a987f4d1.tmp/DS3231DSTmon.ino.hex contains 19962 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 2.56s

avrdude: verifying ...
avrdude: 19962 bytes of flash verified

avrdude done. Thank you.

And now it won't load either sketch - using AVR 1.6.12, IDE 1.6.9 on Windows 10. IIRC, the problem started after I updated to AVR 1.6.12 - should I back up to an earlier release?

Thanks for any suggestions.
-Bob

Bobsloginid:
I tried again with the second program and it loaded with the following output

That output indicates a successful upload. What output are you getting when uploading won’t work?

Please use code tags(</> button on the toolbar) when you post any console output, error/warning messages or code. The reason is that the forum can mistake part of the message for forum markup and corrupt it, won’t wrap lines, puts it in a scrollable box so it takes up less space and can be easily selected and copied.

Bobsloginid:
should I back up to an earlier release?

It’s worth a try, you can install any version with Boards Manager. The developers don’t seem to do any testing of the new versions of the official boards packages for backwards compatibility, they just make sure it works with the latest IDE version. This is pretty crazy since Boards Manager will tell people to install a version that is incompatible with their IDE.

Hi guys. I hit this problem yesterday, albeit uploading to my MEGA board was failing 50% of the times prior to it stopping all together yesterday with version 1.6.9. I then tried uploading with a proven UNO board and no success in uploading either. In both cases the com port was working fine as the code in the Arduino was reporting data back to the monitor. Reading the posts I went to version 1.6.9 and then 1.6.10, but no success their either; just an error message.

Having read the posts I then started to go back in versions, until I found that 1.6.5 r2 worked fine, when loading from the .ino file. I then read that later versions might work if I load the file from within the IDE, so I went back to version 1.6.10 and tried that and yes it does.

So the fix for me is to load from within the IDE, not .ino file. Not sure what the issue is though. It appears to be something to do with Avrdude not being triggered correctly. Hopefully someone can fix for later versions as .ino loading is very convenient for me. Thanks.

@Tony_Swanwick

I followed the same route, went also to 1.6.5 r2. Two days ago uploading stopped suddenly and completely with 1.6.9. without any error message. Even uploading the "bling" sketch to a proven uno succeeded just once. And the same with 1.6.8.
Checked for possible (disturbing) updates of Windows 10, but the latest were a couple of weeks old. Loading the .ino from within the ide with 1.6.10 works well now, but hopefully the problem will be fixed.

With respect to strange file behaviour on Windows 10 with 1.6.9. I also found the following:

  • Just keeping an .ino file open for some time -without making any changes to it- cause file corruption. The file needs to be closed and reopened again to use it.
  • When working on an .ino don't "undo" when the file is open for some time. The cursor jumps to odd places and pastes are uncontrolled. Closing and reopening the .ino was the only way to get out of this situation.
  • The compiler reported multiple Adafruit libraries which were not to be found on the pc. With 1.6.10 this seems to be solved.

Arduino: 1.6.10 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Sketch uses 1,634 bytes (0%) of program storage space. Maximum is 253,952 bytes.
Global variables use 15 bytes (0%) of dynamic memory, leaving 8,177 bytes for local variables. Maximum is 8,192 bytes.
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -cwiring -PCOM6 -b115200 -D -Uflash:w:C:\Users\RAJESH~1\AppData\Local\Temp\builddb8ae029c159ec667d6c55be7f7f7907.tmp/sketch_dec16a.ino.hex:i
An error occurred while uploading the sketch

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

rahul_2:
Arduino: 1.6.10 (Windows 10), Board: “Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)”

Sketch uses 1,634 bytes (0%) of program storage space. Maximum is 253,952 bytes.
Global variables use 15 bytes (0%) of dynamic memory, leaving 8,177 bytes for local variables. Maximum is 8,192 bytes.
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -cwiring -PCOM6 -b115200 -D -Uflash:w:C:\Users\RAJESH~1\AppData\Local\Temp\builddb8ae029c159ec667d6c55be7f7f7907.tmp/sketch_dec16a.ino.hex:i
An error occurred while uploading the sketch

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

Please update to Arduino IDE 1.6.13.

Arduino: 1.6.9 (Windows 10), Board: "Arduino/Genuino Uno"

Build options changed, rebuilding all

Sketch uses 928 bytes (2%) of program storage space. Maximum is 32,256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2,039 bytes for local variables. Maximum is 2,048 bytes.
avrdude: ser_open(): can't open device "\.\COM3": The system cannot find the file specified.

Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Woodward:
Arduino: 1.6.9 (Windows 10), Board: “Arduino/Genuino Uno”

Build options changed, rebuilding all

Sketch uses 928 bytes (2%) of program storage space. Maximum is 32,256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2,039 bytes for local variables. Maximum is 2,048 bytes.
avrdude: ser_open(): can’t open device “\.\COM3”: The system cannot find the file specified.

Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

Select the COM port of your Arduino from the Tools > Port menu.

Woodward:
Arduino: 1.6.9 (Windows 10), Board: "Arduino/Genuino Uno"

Build options changed, rebuilding all

Sketch uses 928 bytes (2%) of program storage space. Maximum is 32,256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2,039 bytes for local variables. Maximum is 2,048 bytes.
avrdude: ser_open(): can't open device "\.\COM3": The system cannot find the file specified.

Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

I don't see a question.

Maybe give a little more info if you need help. Did it work before? Installed any new software before this started happening? Is the board still recognized in the device manger? Is it indeed com3?