2 Replies Latest reply on Feb 12, 2015 3:02 PM by Chris.Charlton

    cannot upload Blink sketch from Ubuntu 12.04 to Galileo 1.0.2

    virtualmark

      I set up an Ubuntu 12.04 with arduino 1.5.3-intel.1.0.3. I have two problems and not sure they are related or not. I am using /dev/ttyUBS1 serial port and I can use Putty to see the output on Galileo.

       

      1. Tried to upload Blink to Galileo running 1.0.2 firmware thru arduino but kept getting timeout and incomplete error. From the terminal window, I can see these errors.

       

      demouser@ubuntu12:~/arduino-1.5.3-Intel.1.0.3$ ./arduino

      Board arduino:x86:izmir_fd doesn't define a 'build.board' preference. Auto-set to: X86_IZMIR_FD

      Board arduino:x86:izmir_fg doesn't define a 'build.board' preference. Auto-set to: X86_IZMIR_FG

      Board arduino:edison:izmir_ec doesn't define a 'build.board' preference. Auto-set to: EDISON_IZMIR_EC

      Experimental:  JNI_OnLoad called.

      Stable Library

      =========================================

      Native lib Version = RXTX-2.1-7

      Java lib Version   = RXTX-2.1-7

      done

      Binary sketch size: 57,999 bytes (of a 10,000,000 byte maximum) - 0% used

      #!/bin/sh

      starting download script

      Args to shell: /home/demouser/arduino-1.5.3-Intel.1.0.3/hardware/tools /tmp/build7067675651078581328.tmp/Blink.cpp.elf /dev/ttyUSB1

       

      Serial Port PORT

      echo "starting download script"

      Using tty Port /dev/ttyUSB1

      echo "Args to shell:" $*

      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: TTY port to use.

      #

      #path may contain \ need to change all to /

      path_to_exe=$1

      fixed_path=${path_to_exe//\\/\/}

      #

      tty_port_id=$3

      echo "Serial Port PORT" $com_port_id

      echo "Using 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

      #Give the host time to stop the process and wait for download

      sleep 1

      #

      Deleting existing sketch on target

      #Move the existing sketch on target.

      echo "Deleting existing sketch on target"

      "$fixed_path/lsz" --escape -c "mv -f /sketch/sketch.elf /sketch/sketch.elf.old" < $tty_port_id > $tty_port_id

      Retry 0: Got TIMEOUT

      Retry 0: Got TIMEOUT

       

      Transfer incomplete

      #

      # Execute the target download command

      #

      #Download the file.

      host_file_name=$2

      "$fixed_path/lsz" --escape --binary --overwrite $host_file_name < $tty_port_id  > $tty_port_id

      Retry 0: Timeout on pathname

       

      Transfer incomplete

      #

      #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" --escape -c "mv $target_download_name /sketch/sketch.elf; chmod +x /sketch/sketch.elf" < $tty_port_id > $tty_port_id

      Login timed out aer 60 secondsPoky 9.0.2 (Yocto Project 1.4 Reference Distro) 1.4.2 clanton /dev/ttyS1clanton login: Retry 0: Got TIMEOUT

      B00000000000000Password: Retry 0: Got TIMEOUT

       

      Transfer incomplete


      2. I tried to update the firmware. I got "target firmware version query failed". The arduino is installed on "/home/demouser/arduino-1.5.3-Intel.1.0.3", no space.


      Thanks for the help.