3 Replies Latest reply on Dec 3, 2014 1:20 PM by zzyyfff

    Arduino sketch won't upload. How to fix?

    zzyyfff

      I'm using the edison on an Arduino breakout board with both micro USBs connected to a Mac running OS X 10.10 and Arduino 1.5.3-Intel.1.0.4. It's a brand new board and I'm just trying to upload the Blink example, there should be lots of space. I checked the cables and the edison board and cu.usbserial are selected.

       

      Any thoughts?

       

      The log from the Arduino app:

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

      starting download script

      #!/bin/sh

      #

      Args to shell: /Applications/ArduinoEdison.app/Contents/Resources/Java/hardware/tools/x86/bin /var/folders/4x/szw1b1h554vgqn4wtd41m8sc0000gn/T/build4617143142579444225.tmp/Blink.cpp.elf /dev/cu.usbserial-A402IDGS

      echo "starting download script"

      Serial Port PORT (note: should be /dev/cu.xxxxxx for OSX)

      echo "Args to shell:" $*

      Using tty Port /dev/cu.usbserial-A402IDGS

      #

      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 "(note: should be /dev/cu.xxxxxx for OSX)"

      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

      bMUElD$}5<D5|4E?Tt55<}M5]\Retry 0: Got TIMEOUT

      4MUDDD$}4E4|E?ut5<%L]\Retry 0: Got TIMEOUT

       

       

      Transfer incomplete

      #"$fixed_path/lsz.exe" --escape -c "mv -f /sketch/sketch.elf /sketch/sketch.elf.old" < $tty_port_id > $tty_port 1>&0

      #

      # 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

      Sending: Blink.cpp.elf

       

       

      Ymodem sectors/kbytes sent:   0/ 0kRetry 0: Got 95 for sector ACK

      Retry 0: NAK on sector

      Retry 0: Got 95 for sector ACK

      Retry 0: NAK on sector

      Retry 0: Got 95 for sector ACK

      Retry 0: NAK on sector

      Retry 0: Got 95 for sector ACK

      Retry 0: NAK on sector

      Retry 0: Got 95 for sector ACK

      Retry 0: NAK on sector

      Retry 0: Got 95 for sector ACK

      Retry 0: NAK on sector

      Retry 0: Got 95 for sector ACK

      Retry 0: NAK on sector

      Retry 0: Got 95 for sector ACK

      Retry 0: NAK on sector

      Retry 0: Got 95 for sector ACK

      Retry 0: NAK on sector

      Retry 0: Got 95 for sector ACK

      Retry 0: NAK on sector

      Retry 0: Got 95 for sector ACK

      Retry 0: NAK on sector

      Retry 0: Retry Count Exceeded

       

       

      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

      Retry 0: Got TIMEOUT

      4MUDDD$}54E|E?uu5=mE]\Z"bkZRetry 0: Got TIMEOUT

       

       

      Transfer incomplete

      #

      #