13 Replies Latest reply on Mar 10, 2017 12:29 PM by Intel Corporation

    Program wouldn't upload on Edison ( Arduino IDE )

    KunalArora

      Hi All,

       

      I'm using Arduino IDE to program the Intel Edison - Mini Breakout Board. In the script I'm trying to establish a connection between IBM Bluemix and Edison but it gives certain errors while uploading the script.

      I've tried the following:

      a) Uploading a sample program. - Didn't work

      b) Uploading it through a different PC ( Mac OS ) -  Didn't work

       

      I'm attaching the error messages below. Would be grateful if anyone could help.

       

      Thanks

       

      Regards

      Kunal

       

       

      Error message on Windows:

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

      echo "~sketch downloadEdison" > $tty_port_id

      C:\Users\KUNAL\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadEdison_win.sh: line 42: /dev/ttyS4: 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\KUNAL\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadEdison_win.sh: line 46: /dev/ttyS4: 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\KUNAL\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadEdison_win.sh: line 51: /dev/ttyS4: 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\KUNAL\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadEdison_win.sh: line 56: /dev/ttyS4: Permission denied

      An error occurred while uploading the sketch

       

      Error message on Mac :

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

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

      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

      Retry 0: Got TIMEOUT

      Retry 0: Got TIMEOUT

       

      Transfer incomplete

      #

      #

      An error occurred while uploading the sketch

       

      This report would have more information with

      "Show verbose output during compilation"

      option enabled in File -> Preferences.

        • 1. Re: Program wouldn't upload on Edison ( Arduino IDE )
          Intel Corporation
          This message was posted on behalf of Intel Corporation


          Hi Kunal,

           

          Thanks for your interest in the Intel Edison Platform.

           

          I'm sorry to hear that you are having trouble uploading an Arduino sketch into the Edison. Had you already followed this guides:

           

          - IoT - Installing the Arduino* IDE | Intel® Software
          - IoT - Blinking an LED with the Arduino* IDE | Intel® Software

           

          If you did please let me know, also be sure that you are using your Virtual Com Port. See the image below:

           

          Virtual com port.PNG

           

          I will be waiting for your reply, have a nice day!

           

          Best Regards,
          -Jose P.

          • 2. Re: Program wouldn't upload on Edison ( Arduino IDE )
            MikeS

            Hi Jose

             

            I am having a similar problem with uploading the Blink example.  I just set it up using the windows 64 version of the tool and am using the Intel Virtual com port for uploading. I am also using Arduino IDE 1.8.1 with the intel Edison installed through the boards manager.  Here is the exact error I am receiving:

             

            Sketch uses 76351 bytes (0%) of program storage space. Maximum is 10000000 bytes.


            #!/bin/sh
            starting download script

            Args to shell: C:\Users\CyberPalin\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/x86/bin C:\Users\CYBERP~1\AppData\Local\Temp\arduino_build_194151/Blink.ino.elf COM24
            # clupload script to invoke lsz
            COM PORT 24


            # Copyright (C) 2014 Intel Corporation
            Converted COM Port COM24 to tty port /dev/ttyS23
            #
            Sending Command String to move to download if not already in download mode
            # 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
            # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
            # 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//\\/\/}
            Deleting existing sketch on target

             

            #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\CyberPalin\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadEdison_win.sh: line 42: /dev/ttyS23: No such device or address

             

            #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\CyberPalin\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadEdison_win.sh: line 46: /dev/ttyS23: No such device or address

             

            # 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\CyberPalin\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadEdison_win.sh: line 51: /dev/ttyS23: No such device or address

            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\CyberPalin\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadEdison_win.sh: line 56: /dev/ttyS23: No such device or address
            An error occurred while uploading the sketch

             

            Thanks

            Mike

            • 3. Re: Program wouldn't upload on Edison ( Arduino IDE )
              MikeS

              Ok.  Managed to solve problem by changing one of the USB cables.  Now it uploads fine.

              • 4. Re: Program wouldn't upload on Edison ( Arduino IDE )
                Intel Corporation
                This message was posted on behalf of Intel Corporation

                Hi Kunal,

                I'm glad to know that you solved your issue! Please let us know if you have any more questions.

                We hope you have a nice day!

                Best Regards,
                -Jose P.

                • 5. Re: Program wouldn't upload on Edison ( Arduino IDE )
                  KunalArora

                  Hi Jose

                   

                  Thanks for getting in touch. I have been following the guide available at https://software.intel.com/en-us/node/628261. According to this guide,  the user is suggested to identify the Serial COM Port instead of Intel Edison Virtual Com Port.

                  01.JPG

                   

                  Moreover, I am unable to view any of the Intel Edison Virtual Com Port in the Device Manager.

                  02.JPG

                   

                  I'd like to confirm that I had already covered all the steps mentioned in 'Installing Arduino IDE' guide.

                   

                  There is one thing that I suspect could be wrong. In the guide (IoT - Assemble Mini Breakout Board | Intel® Software) it shows that the device would show up like this -

                   

                  03.JPG

                   

                  However, in my PC, it shows up like this -

                   

                  04.JPG

                  My Edison shows up like a blank disk drive unlike the one shown in the guide.

                   

                  Also to clarify that I have tried taking in MikeS's suggestion but it doesn't work for me.

                   

                  Kindly suggest what to do.

                   

                  Thanks and regards

                  Kunal Arora

                  • 6. Re: Program wouldn't upload on Edison ( Arduino IDE )
                    Intel Corporation
                    This message was posted on behalf of Intel Corporation

                    Hi Kunal,

                     

                    You don't need to worry, you are on the right track! This guide IoT - Get Started with the Intel® Edison Development Board on Windows* 32-bit | Intel® Software  should be completed before you upload an Arduino sketch into your Edison. (By the way this is the Arduino IDE guide IoT - Arduino* IDE Getting Started Guide | Intel® Software )

                     

                    Now, addressing your concern regarding that you can't see your Virtual COM Port. Make sure that you are connecting your USB port, please see the image below:

                     

                    Edison breakout USB port.PNG

                     

                    If you still can't see your Virtual COM Port, please reinstall your drivers and try again.

                     

                    I will be waiting for your results, have a great day!

                     

                    Best Regards,
                    -Jose P.

                    • 7. Re: Program wouldn't upload on Edison ( Arduino IDE )
                      Intel Corporation
                      This message was posted on behalf of Intel Corporation

                      Hi Kunal,

                      Were you able to upload Arduino sketches in your Edison? Please let me know in order to assist you.

                      Have a nice day!

                      Best Regards,
                      -Jose P.

                      • 8. Re: Program wouldn't upload on Edison ( Arduino IDE )
                        KunalArora

                        Hi Jose

                         

                        Sorry for the delayed response. Some other aspects of my project kept me busy.

                         

                        I'd like to confirm that when I connect to Edison using the port recommended by you i.e. the one illustrated below -

                        Capture.JPG

                        I am unable to see any ports in device manager. However, when I connect to Edison using both the port i.e. the ones illustrated below -

                         

                        Capture.JPG

                        I can at least see the 'USB Serial Port'. I have all the initial steps covered for all other aspects of the board are usable.

                         

                        Please suggest how to go further about it.

                         

                        Thanks

                         

                        Kind regards

                        Kunal Arora

                        • 9. Re: Program wouldn't upload on Edison ( Arduino IDE )
                          Intel Corporation
                          This message was posted on behalf of Intel Corporation

                          Hi Kunal,

                          Don't worry feel free to reply whenever you have time, we are here to help!

                           

                          Now, regarding your issue where you can't see your Virtual COM. Please download again the drivers for the Intel Edison on this link Downloads for Intel® Edison Module | IoT | Intel® Software  and follow this video Intel Edison Getting Started - A Step-By-Step Tutorial (windows) | Intel - YouTube  in order to use the Arduino IDE with the Intel Edison.

                           

                          If this doesn't work, could you please send me a screenshot of your Device Manager when you connect both your Serial port and your USB port.

                           

                          Hope this helps, have a great day!

                           

                          Best Regards,
                          -Jose P.

                          • 10. Re: Program wouldn't upload on Edison ( Arduino IDE )
                            KunalArora

                            Hi Jose

                             

                            Do I need to install 'Microcontroller (MCU) SDK' and 'Cross Compile SDK'? If yes, I am unable to download the 'Cross Compile SDK' for Windows 32 bit from Downloads for Intel® Edison Module | IoT | Intel® Software

                             

                            Thanks

                             

                            Kind regards

                            Kunal Arora

                            • 11. Re: Program wouldn't upload on Edison ( Arduino IDE )
                              Intel Corporation
                              This message was posted on behalf of Intel Corporation

                              Hi Kunal,

                               

                              You only need to download the SDK if you are going to use the MCU incorporated in the Intel Edison, since your objective is to use the Arduino IDE it is not necessary to install it.

                               

                              You need to download the drivers from this page Downloads for Intel® Edison Module | IoT | Intel® Software  , or you could also use the Configuration Tool in order to install them. Please see the image below in order to understand what I'm trying to explain:

                               

                              drivers edison.PNG

                               

                              Have a nice day!

                               

                              Best Regards,
                              -Jose P.

                              • 12. Re: Program wouldn't upload on Edison ( Arduino IDE )
                                KunalArora

                                Hi Jose

                                 

                                Thanks for your valuable inputs. I am now able to see the 'Virtual COM Port' and upload Arduino sketches onto the board.

                                 

                                Kind regards

                                Kunal Arora

                                • 13. Re: Program wouldn't upload on Edison ( Arduino IDE )
                                  Intel Corporation
                                  This message was posted on behalf of Intel Corporation

                                  Hi Kunal,
                                   
                                  I'm glad to know that you are able to see your Virtual COM! Please don't hesitate to contact us back if any questions come up.

                                  Have a great day! 

                                  Best Regards,
                                  -Jose P.