Unable to upload sketch

Hi,

I am new to arduino, i am trying to upload a sketch and getting following error.

open nul: the system cannot find the file specified.
error compiling for board arduino/genuino uno.

OS: Windows 10
Arduino Ide : 1.8.5

Please help

Please take a few moments to Learn and Use The Forum

How to get the best out of this forum Installation & Troubleshooting

Hello, Welcome to the Arduino Forum. This guide explains how to get the best out of this forum. Please read and follow the instructions below. Being new here you might think this is having rules for the sake of rules, but that is not the case. If you don’t follow the guidelines all that happens is there is a long exchange of posts while we try to get you to tell us what we need in order to help you, which is frustrating for you and frustrating for us. The people who try to help with your pro…

It will help you get the very best out of the forum in the future.

  • Your OS and version can be valuable information, please include it along with extra security you are using. Antivirus etc.
  • Always list the version of the IDE you are using and the board version if applicable.
  • Use quote or add error messages as an attachment NOT a picture.
  • How to insert an image into your post. ( Thanks sterretje )
  • Add your sketch where applicable but please use CODE TAGS
  • Add a SCHEMATIC were needed even if it is hand drawn
  • Add working links to any specific hardware as needed (NOT links to similar items)
  • Remember that the people trying to help cannot see your problem so give as much information as you can

COMMON ISSUES

  • Ensure you have FULLY inserted the USB cables.
  • Check you have a COMMON GROUND where required. ( Thanks Perry)
  • Where possible use USB 2.0 ports or a USB 2.0 POWERED HUB to rule out USB 3.0 issues.
  • Try other computers where possible.
  • Try other USB leads where possible.
  • You may not have the correct driver installed. CH340/341 or CP2102 or FT232 VCP Drivers - FTDI
  • There may be a problem with the board check or remove your wiring first.
  • Remove any items connected to pins 0 and 1.

COMPUTER RELATED

  • Close any other serial programs before opening the IDE.
  • Ensure you turn off any additional security / antivirus just to test.
  • There may be a problem with the PC try RESTARTING it.
  • You may be selecting the wrong COM port.
  • Avoid cloud/network based installations where possible OR ensure your Network/Cloud software is RUNNING.
  • Clear your browsers CACHE.
  • Close the IDE before using any other serial programs.
  • Preferably install IDE’s as ADMINISTRATOR or your OS equivalent

ARDUINO SPECIFIC BOARDS

  • CH340/341 based clones do not report useful information to the “get board info” button.
  • NANO (Old Types) some require you to use the OLD BOOTLOADER option.
  • NANO (ALL Types) See the specific sections lower in the forum.
  • NANO (NEW Types) Install your board CORE’s.
  • Unless using EXTERNAL PROGRAMMERS please leave the IDE selection at default “AVRISP mkII”.
  • Boards using a MICRO USB connector need a cable that is both DATA and CHARGE. Many are CHARGE ONLY.

CREATE editor install locations.

  • On macOs ~/Applications/ArduinoCreateAgent-1.1/ArduinoCreateAgent.app/Contents/MacOS/config.ini
  • On Linux ~/ArduinoCreateAgent-1.1/config.ini
  • On Windows C:\Users[your user]\AppData\Roaming\ArduinoCreateAgent-1.1

Performing the above actions may help resolve your problem without further help.

Language problem ?

Try a language closer to your native language:

Thanks to all those who helped and added to this list.

Also make sure you are not using a USB 3.0 port and that you have selected the correct COM port as listed in windows device manager for the board (you failed to mention type).

I have some problem while uploading arduinoisp to new atmega328P-PU it shows invalid library and bootloader while click this message shows...

avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.

Error while burning bootloader.

Hello!,

If you want, try out this post, Error conpiling to Arduino Uno-SOLVED!

Hi... I am also new to Arduino and I can't seem to upload a sketch. Any help would be greatly appreciated.

Arduino: 1.6.11 (Windows 8.1), Board: "Intel® Edison"

Sketch uses 76,331 bytes (0%) of program storage space. Maximum is 10,000,000 bytes.
C:\Users\Kevin\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/x86/bin/bash.exe --verbose --noprofile C:\Users\Kevin\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadEdison_win.sh C:\Users\Kevin\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/x86/bin C:\Users\Kevin\AppData\Local\Temp\build08e4957f02c018eb579e11ddc64f9701.tmp/Blink.ino.elf COM5
#!/bin/sh

clupload script to invoke lsz

Copyright (C) 2014 Intel Corporation

This library is free software; you can redistribute it and/or

modify it under the terms of the GNU Lesser General Public

License as published by the Free Software Foundation; either

version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,

but WITHOUT ANY WARRANTY; without even the implied warranty of

MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU

Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public

License along with this library; if not, write to the Free Software

Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

echo "starting download script"
echo "Args to shell:" $*

ARG 1: Path to lsz executable.

ARG 2: Elf File to download

ARG 3: COM port to use.

#path contains \ need to change all to /
path_to_exe=$1
fixed_path=${path_to_exe//\//}

#COM ports are not always setup to be addressed via COM for redirect.
#/dev/ttySx are present. Howwever, COMy -> /dev/ttySx where x = y - 1

com_port_arg=$3
com_port_id=${com_port_arg/COM/}
echo "COM PORT" $com_port_id
tty_port_id=/dev/ttyS$((com_port_id-1))
echo "Converted COM Port" $com_port_arg "to tty port" $tty_port_id

echo "Sending Command String to move to download if not already in download mode"
echo "~sketch downloadEdison" > $tty_port_id
starting download script
Args to shell: C:\Users\Kevin\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/x86/bin C:\Users\Kevin\AppData\Local\Temp\build08e4957f02c018eb579e11ddc64f9701.tmp/Blink.ino.elf COM5
COM PORT 5
Converted COM Port COM5 to tty port /dev/ttyS4
Sending Command String to move to download if not already in download mode
C:\Users\Kevin\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadEdison_win.sh: line 42: /dev/ttyS4: Permission denied
Deleting existing sketch on target

#Move the existing sketch on target.
echo "Deleting existing sketch on target"
"$fixed_path/lsz.exe" --escape -c "mv -f /sketch/sketch.elf /sketch/sketch.elf.old" <> $tty_port_id 1>&0
C:\Users\Kevin\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadEdison_win.sh: line 46: /dev/ttyS4: Permission denied

Execute the target download command

#Download the file.
host_file_name=$2
"$fixed_path/lsz.exe" --escape --binary --overwrite $host_file_name <> $tty_port_id 1>&0
C:\Users\Kevin\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadEdison_win.sh: line 51: /dev/ttyS4: Permission denied

#mv the downloaded file to /sketch/sketch.elf
target_download_name="${host_file_name##*/}"
Moving downloaded file to /sketch/sketch.elf on target
echo "Moving downloaded file to /sketch/sketch.elf on target"
"$fixed_path/lsz.exe" --escape -c "mv $target_download_name /sketch/sketch.elf; chmod +x /sketch/sketch.elf" <> $tty_port_id 1>&0
C:\Users\Kevin\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadEdison_win.sh: line 56: /dev/ttyS4: Permission denied
An error occurred while uploading the sketch

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

Are you certain your Edison board is on COM5?

Try this:

  • With the Arduino board unplugged from the USB open the Tools > Port menu and note the listed ports. If the Port menu is gray and disabled then that means there are no ports available.
  • Close the Tools > Port menu.
  • Plug in the USB cable on the Arduino board
  • Wait a little while for the Arduino board to connect
  • Open Tools > Port, the new port on the list is your Arduino board. In some cases it will have the name of the board next to the port name but this doesn't happen with all boards. If the Port menu is gray and disabled then that means your Arduino board didn't install correctly. You may need to install a driver.
  • Select your Arduino's port from the menu.

If the COM5 port is correct, try restarting your computer. Sometimes COM ports can get stuck and cause this sort of problem.