1 Reply Latest reply on Apr 24, 2014 1:27 AM by tamir

    cant upload sketch - " /dev/ttyS2: No such device or address"

    tamir

      Hi, I was messing around with some code (involving interrupts) and suddenly the board "froze"

       

      Power it off and tried to write a new sketch - got the following error in the IDE console

      ------------------------------------------------------------------------------------------------------------------------------------------------------

      bash.exe: warning: could not find /tmp, please create!

      cygwin warning:

        MS-DOS style path detected: C:\arduino-1.5.3/hardware/arduino/x86/tools/izmir/clupload_win.sh

        Preferred POSIX equivalent is: /cygdrive/c/arduino-1.5.3/hardware/arduino/x86/tools/izmir/clupload_win.sh

        CYGWIN environment variable option "nodosfilewarning" turns off this warning.

        Consult the user's guide for more details about POSIX paths:

          http://cygwin.com/cygwin-ug-net/using.html#using-pathnames

      #!/bin/sh

       

       

      echo "starting download script"

      echo "Args to shell:" $*

      starting download script

      Args to shell: C:\arduino-1.5.3/hardware/tools/x86/bin C:\Users\stamirrr\AppData\Local\Temp\build3212491962562079794.tmp/Blink.cpp.elf COM3

      COM PORT 3

      Converted COM Port COM3 to tty port /dev/ttyS2

      Sending Command String to move to download if not already in download mode

       

       

      # 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 download" > $tty_port_id

      Deleting existing sketch on target

      C:\arduino-1.5.3/hardware/arduino/x86/tools/izmir/clupload_win.sh: line 24: /dev/ttyS2: No such device or address

       

       

      #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:\arduino-1.5.3/hardware/arduino/x86/tools/izmir/clupload_win.sh: line 28: /dev/ttyS2: No such device or address

       

       

      # 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:\arduino-1.5.3/hardware/arduino/x86/tools/izmir/clupload_win.sh: line 34: /dev/ttyS2: No such device or address

       

       

      #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 "cp sketch /sketch/sketch.elf" <> $tty_port_id 1>&0

      $fixed_path/lsz.exe --escape -c "mv $target_download_name /sketch/sketch.elf; chmod +x /sketch/sketch.elf" <> $tty_port_id 1>&0

      C:\arduino-1.5.3/hardware/arduino/x86/tools/izmir/clupload_win.sh: line 40: /dev/ttyS2: No such device or address

      ------------------------------------------------------------------------------------------------------------------------------------------------------

       

      Tried pressing reboot/reset...power it off again, restarting my computer...nothing works, still the same error...

      any one knows what to do?

      thanks!