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

    Intel Edison Arduino failed to upload

    Parthiban


      Dear All,

       

      I tried my first program in intel edison (blinking LED) from Arduino IDE in Ubuntu 14.04. This is failed due to timeout.

       

      I have checked my debug serial port and board selection in the IDE and it's look. I tried copying the same ELF file from host to target in SCP, placed under /sketch and restarting clloader works.

       

      I have attached the log snip below. Please address the following queries.

       

      1. How to solve this issue? Am i doing anything wrong in connectivity?
      2. How this "Upload" process works? How clloader restarts/notified once a new file is uploaded over zmodem?

       

      Thanks in advance,

      Parthiban N

       

      Log snip:

      parthiban@parthi:~/git/hw/intel/edison/arduino/arduino-1.5.3-Intel.1.0.4$ sudo ./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

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

      #!/bin/sh

      starting download script

      Args to shell: /home/parthiban/git/hw/intel/edison/arduino/arduino-1.5.3-Intel.1.0.4/hardware/tools /tmp/build1832824671649983140.tmp/Blink.cpp.elf /dev/ttyUSB0

      Serial Port PORT

      Using tty Port /dev/ttyUSB0

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

       

       

      echo "starting download script"

      echo "Args to shell:" $*

      #

      # 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

      rz-sh: rz: not foundroot@edison:~# B00000000123273-sh: B00000000123273: not foundroot@edison:~# 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

      B00000000000000-sh: B00000000000000: not foundroot@edison:~# Retry 0: Got TIMEOUT

      Retry 0: Got TIMEOUT

       

       

      Transfer incomplete

      #

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

      rz-sh: rz: not foundroot@edison:~# B00000000123273-sh: B00000000123273: not foundroot@edison:~# Retry 0: Got TIMEOUT

      Retry 0: Got TIMEOUT

       

       

      Transfer incomplete

      #

      #

        • 1. Re: Intel Edison Arduino failed to upload
          shb

          Hi

          maybe it is the same issue

          sketch upload fails: "transfer incomplete"

          that your edison is running out of memroy

           

          by

          • 2. Re: Intel Edison Arduino failed to upload
            Parthiban

            Dear shb,

             

            Thanks for your response.

             

            I have checked the disk usage in my edison and i see lot of space is still available to make it functional. To add, Upload process always fails in my case.

             

            df output:

            root@edison:~# df -h

            Filesystem                Size      Used Available Use% Mounted on

            /dev/root               463.9M    279.4M    148.7M  65% /

            devtmpfs                480.2M         0    480.2M   0% /dev

            tmpfs                   480.5M         0    480.5M   0% /dev/shm

            tmpfs                   480.5M    500.0K    480.0M   0% /run

            tmpfs                   480.5M         0    480.5M   0% /sys/fs/cgroup

            tmpfs                   480.5M    500.0K    480.0M   0% /etc/machine-id

            systemd-1                 5.5M      5.1M    456.0K  92% /boot

            systemd-1                 2.2G      3.6M      2.2G   0% /home

            systemd-1              1003.0K     19.0K    913.0K   2% /factory

            tmpfs                   480.5M     56.0K    480.5M   0% /tmp

            tmpfs                   480.5M      6.0M    474.5M   1% /var/volatile

            /dev/mmcblk0p5         1003.0K     19.0K    913.0K   2% /factory

            /dev/mmcblk0p10           2.2G      3.6M      2.2G   0% /home

            /dev/mmcblk0p7            5.5M      5.1M    456.0K  92% /boot

             

            Thanks,

            Parthiban N

            • 3. Re: Intel Edison Arduino failed to upload
              mhahn

              asking the obvious questions: have you selected the right board in Arduino IDE (-> Edison)? have you selected the right COM port?

              • 4. Re: Intel Edison Arduino failed to upload
                Parthiban

                Dear mhahn,

                 

                Thanks for your response.

                 

                Yes, I have double checked that I have selected Edison in Board type and /dev/ttyUSB0 in serial port.

                 

                Thanks,

                Parthiban N

                • 5. Re: Intel Edison Arduino failed to upload
                  mhahn

                  I haven't used Arduino IDE on Linux yet. However, note: there are 2 serial ports if you connect both USB.

                  You would need to put the switch towards the micro USB and select the serial which comes up when connecting the USB closer to the switch

                  • 6. Re: Intel Edison Arduino failed to upload
                    xixixihaha

                    I met the same issue with Mac version Arduino. It is not caused by memory. It is caused by IDE. I switched to Windows and no issue any more.

                    • 7. Re: Intel Edison Arduino failed to upload
                      Parthiban

                      Dear mhahn,

                       

                      Am not sure about two serial ports here in this context. I have a Micro USB client port which has the FTDI to USB for serial port as per Arduino Hardware document. The other Micro USB client port which is used for powering with 5V & 1A combination. These two ports are visible in Arduino IDE as /dev/ttyUSB0 and /dev/ACM* respectively. I have connected using /dev/ttyUSB0.

                       

                      From your answer I understand that there is a switch/jumper to slipped to make it functional for IDE? Please clarify

                       

                      Thanks,

                      Parthiban N

                      • 8. Re: Intel Edison Arduino failed to upload
                        Parthiban

                        Dear xixixihaha,

                         

                        In my case I have only Ubuntu Machine. I cannot go for Windows for sure. I want to live with Linux even though it's painful Sorry.

                         

                        Thanks,

                        Parthiban N

                        • 9. Re: Intel Edison Arduino failed to upload
                          Parthiban

                          Dear mhahn,

                           

                          I have checked the switch and changed the position. But the board is not powered when I connect the Micro USB. I am checking the schematic diagram to understand the background of this switch.

                           

                          Thanks,

                          Parthiban N

                          • 10. Re: Intel Edison Arduino failed to upload
                            Parthiban

                            Dear mhahn,

                             

                            Sorry for making trouble. I have connected both the debug cable and powering Micro USB to the board. From which I got two serial interface. One on /dev/ttyUSB0 for debugging alone and /dev/ACM0 for programming. I have meshed with my understanding my selecting the /dev/USB0 instead of /dev/ACM0 which resulted in this error.

                             

                            Connecting with /dev/ttyACM0 work fine.

                             

                            Thanks,

                            Parthiban N

                            • 11. Re: Intel Edison Arduino failed to upload
                              ksam917

                              Hi, I am able to make the LED to blink on my device. I want to stop the application running on it, b'coz every time when I restart the board, its getting blinked continuously. Otherwise I need to run the same app again with sending LOW signal to it. Do any one konw how to terminate the app. Please suggest, thanks in advance.

                              • 12. Re: Intel Edison Arduino failed to upload
                                mhahn

                                if you don't require Arduino functionality:

                                systemctl stop clloader
                                systemctl disable clloader
                                

                                 

                                if you just want to remove the sketch:

                                rm /sketch/sketch.elf
                                systemctl restart clloader
                                
                                • 13. Re: Intel Edison Arduino failed to upload
                                  Chris.Charlton

                                  Mac users: the "Edison" partition auto-mounts so be sure to unmount (eject) that drive before uploading new code.