Community
cancel
Showing results for 
Search instead for 
Did you mean: 
idata
Community Manager
996 Views

Problem with Uploading Sketch via Arduino IDE

Jump to solution

I was following the first few steps to "/thread/77945 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:

<<COMPILING SKETCH SUCCESSFUL>>

<<LINKING SKETCH SUCCESSFUL>>

Sketch uses 100,829 bytes (1%) of program storage space. Maximum is 10,000,000 bytes.

# !/bin/sh

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

# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU

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 /

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

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.

host_file_name=$2

"$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

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

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,

Gavin

0 Kudos
1 Solution
idata
Community Manager
78 Views

Ok... found it. Here's a thread that answers my question -

Answer # 12 by JasonZ solved my problem.

Thanks for reading.

Gavin

View solution in original post

1 Reply
idata
Community Manager
79 Views

Ok... found it. Here's a thread that answers my question -

Answer # 12 by JasonZ solved my problem.

Thanks for reading.

Gavin

View solution in original post

Reply