1 Reply Latest reply on May 29, 2016 9:35 AM by gavinkoh70

    Problem with Uploading Sketch via Arduino IDE


      I was following the first few steps to "Run Arduino sketch on boot Workaround", when I decided not to proceed. I had not done any flashing, but was just going through the motion to get familiar with the workaround procedure. But I did archive all the files that I needed, including the files in the /opt/edison folder.


      I decided to restore my backup files, including "launcher.sh", "clloader", "sketch_reset", and "sketch_reset.sh" which I had archived to my Windows notebook using WinSCP. I uploaded these 4 files back to the /opt/edison folder. - Doh!


      Now whenever I compile in the Arduino IDE, I get this output from the bottom half of the IDE window:

      Sketch uses 100,829 bytes (1%) of program storage space. Maximum is 10,000,000 bytes.
      starting download script
      Args to shell: C:\Users\S7045719I\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/x86/bin C:\Users\S70457~1\AppData\Local\Temp\buildb92e1b2eb45da914b588ae48cf361e8d.tmp/GraphicsTest.ino.elf COM43
      # 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
      COM PORT 43
      Converted COM Port COM43 to tty port /dev/ttyS42
      Sending Command String to move to download if not already in download mode
      # 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 /
      #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
      echo "COM PORT" $com_port_id
      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
      C:\Users\S7045719I\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadEdison_win.sh: line 42: /dev/ttyS42: Permission denied
      #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\S7045719I\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadEdison_win.sh: line 46: /dev/ttyS42: Permission denied
      # Execute the target download command
      #Download the file.
      "$fixed_path/lsz.exe" --escape --binary --overwrite $host_file_name <> $tty_port_id 1>&0
      C:\Users\S7045719I\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadEdison_win.sh: line 51: /dev/ttyS42: Permission denied
      Moving downloaded file to /sketch/sketch.elf on target
      #mv the downloaded file to /sketch/sketch.elf 
      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\S7045719I\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadEdison_win.sh: line 56: /dev/ttyS42: Permission denied


      My Arduino ino script does not get uploaded to the Edison anymore. There is no response from the Edison via the IDE, although I can still Putty or WinSCP and access the folders within. It's like the files (launcher.sh, clloader, sketch_reset, and sketch_reset.sh) got corrupted? But it can't be, right? Do I need a chmod somewhere?


      What could have happened? Is there anyway that I can recover without having to go through the hassle of re-configuring the Edison all over again?


      Thanks in advance,