Arduino IDE error when uploading a sketch to arduino

Hey,
I’ve got a wierd problem that I can’t seem to find the answer to browsing google. My IDE outputs an error when I try to upload a sketch to the arduino. Here’s the console:

Sketch uses 84742 bytes (0%) of program storage space. Maximum is 10000000 bytes.
#!/bin/sh
starting download script

# 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
Args to shell: C:\Users\Alex Nuta\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/x86/bin C:\Users\Alex Nuta\AppData\Local\Temp\arduino_build_784874/Blink_v2.ino.elf COM6
# version 2.1 of the License, or (at your option) any later version.
COM PORT 6
Converted COM Port COM6 to tty port /dev/ttyS5
# 
Sending Command String to move to download if not already in download mode
# 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 downloadGalileo" > $tty_port_id

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

Transfer incomplete
# 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
lsz: cannot open C:\Users\Alex: No such file or directory
lsz: cannot open Nuta\AppData\Local\Temp\arduino_build_784874/Blink_v2.ino.elf: No such file or directory

Can't open any requested files.

Transfer incomplete

Moving downloaded file to /sketch/sketch.elf on target
#mv the downloaded file to /sketch/sketch.elf 
target_download_name="${host_file_name##*/}" 
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
Retry 0: Got TIMEOUT

Transfer incomplete

What I’ve tried: Reinstalling IDE, I’ve searched the path where it said in the console it couldn’t find the .ino.elf file however the file is there; the sketch I’m trying to upload is a modified blink example, I have tried with my actual sketch and there is no difference.

I’ve attached a photo of the path where the console said there’s no file there.

Verifying a sketch works great, after searching google, reinstalling the IDE, verifying that files are there even tho the IDE doesn’t find them, I don’t know what else to do, please help!

It looks like you're trying to upload to an Intel Galileo. Is that correct?

The problem is that you have a space in your Windows user name and they forgot to quote the path in the script so it thinks the path is two arguments separate arguments:

nutzaalex: lsz: cannot open C:\Users\Alex: No such file or directory lsz: cannot open Nuta\AppData\Local\Temp\arduino_build_784874/Blink_v2.ino.elf: No such file or directory

I seem to remember this problem was fixed long ago. Make sure you're using the latest version of Intel i586 Boards:

  • Tools > Board > Boards Manager
  • Wait for download to finish
  • Scroll down until you see "Intel i586 Boards". Click on it.
  • If you see an "Update" button, click on it. If not, which version does it say you have installed?

hey, thanks for your reply, yes I am using a galileo gen 2, I got all the latest drivers installed,the space in my windows account… that was my suspicion too and today I just tried that out, made a new user on my pc and it works, it’s a lot of trouble to go through…its not easy to rename your own user, because you have to rename in the registry too and stuff, so yeah I guess I’m stuck working on my actual username (where everything is) then logging in another to modify and upload the sketch then going back

Please do this:

  • File > Preferences > Show verbose output during: > compilation (uncheck) > upload (check) > OK
  • Sketch > Upload
  • After the upload fails you'll see a button on the right side of the orange bar "Copy error messages". Click that button.
  • Paste the error messages in a reply here using code tags.