9 Replies Latest reply on Feb 20, 2015 5:27 AM by DiegoV_Intel

    Cannot upload sketch from Arduino IDE

    massca

       

      Hi,

       

      I have an Edison with Arduino Board. It has latest image (ww05-15) and works fine with XDK, including the serial communication with the PC.

       

      I cannot upload an Arduino Sketch because the upload hangs. I tried on two different computers with Win7 and Win8.1 with the same result, the uploads doesn’t stops and the sktch dir on the Edison is empty.

       

      This is the output of the upload phase:

      -----------------------------------------------------------------------------------------------------------------------------------------------------

      cygwin warning:
      MS-DOS style path detected: C:\arduino-1.5.3-Intel.1.0.4/hardware/arduino/edison/tools/izmir/clupload_win.sh
      Preferred POSIX equivalent is: /cygdrive/c/arduino-1.5.3-Intel.1.0.4/hardware/arduino/edison/tools/izmir/clupload_win.sh
      CYGWIN environment variable option "nodosfilewarning" turns off this warning.
      Consult the user's guide for more details about POSIX paths:
      http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
      #!/bin/sh

       

      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 /
      starting download script
      path_to_exe=$1
      Args to shell: C:\arduino-1.5.3-Intel.1.0.4/hardware/tools/x86/bin C:\Users\Max\AppData\Local\Temp\build7528617955723142954.tmp/sketch_feb16a.cpp.elf COM10
      fixed_path=${path_to_exe//\\/\/}
      COM PORT 10

       

      Converted COM Port COM10 to tty port /dev/ttyS9
      #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
      Sending Command String to move to download if not already in download mode

       

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

       

      Deleting existing sketch on target
      #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
      -----------------------------------------------------------------------------------------------------------------------------------------------------

       

      Any advice?

       

      Thanks!

       

      -massimo

       

        • 1. Re: Cannot upload sketch from Arduino IDE
          CMata_Intel

          Hi massca

           

          Are you selecting the right board in Tools->Board and the right port in Tools->Serial Port? This COM number has to be the one called Intel Edison Virtual Com Port(COM XX) in the Device Manager.

          Also, is the "SW1" switch pointing to the microUSB ports of the board? If it's not put it in that position.

          Let's check that first and let us know if it fix the problem.


          Regards;

          CMata

          • 2. Re: Cannot upload sketch from Arduino IDE
            mhahn

            which Edison image do you use? Looks to me like you're using an older image which used to have an issue with the rootfs becoming full due to journal files in /var/log. In the case of a full rootfs you wouldn't be able to upload the sketch and the Arduino IDE would just hang. See e.g. write error: No space left on device

            • 3. Re: Cannot upload sketch from Arduino IDE
              massca

               

              Hi CMata, mhahn,

              I’m using latest image (ww05-15). I think there is a problem with the settings/drivers of serial ports on my PC. I usually work with the XDK and putty, this is the first time that I try to use the Arduino IDE and probably I miss something. I’m traveling today, so I’m trying to remember my Edison configuration.

              In my XDK standard configuration, I use an USB charger connected to the central micro USB port to provide power. Another USB cable is attached to the PC (COM10) and to the side micro USB port.

               

               

              After the answer of CMata about the needs to use with Arduino an “Intel Edison Virtual Com Port(COM XX)”, I read again the Getting Started with the Intel® Edison Board for Windows:  http://www.intel.com/support/edison/sb/CS-035336.htm

              I understand now that to upload Arduino sketches I need to use the central micro USB port. I’m not sure but I suppose this will binded to another serial port than the COM10 that I use with the side connection.

              If I’m right there should be at least two serial ports and I need to choose the one labeled “Intel Edison Virtual Com Port(COM XX)”. When I’ll go back home tomorrow I’ll check this.

               

              I looked also to the Getting Started Arduino IDE: http://www.intel.com/support/motherboards/desktop/sb/CS-035337.htm

              This page needs some reworking because the Windows section has the pictures of the XDK instead of the Arduino IDE.

               

              Please let me know if you consider correct what I wrote.

               

              Thanks

                -massimo

              • 4. Re: Cannot upload sketch from Arduino IDE
                mhahn

                massca wrote:

                 

                 

                I understand now that to upload Arduino sketches I need to use the central micro USB port. I’m not sure but I suppose this will binded to another serial port than the COM10 that I use with the side connection.

                 

                 

                that's correct.

                 

                 

                I looked also to the Getting Started Arduino IDE: http://www.intel.com/support/motherboards/desktop/sb/CS-035337.htm

                This page needs some reworking because the Windows section has the pictures of the XDK instead of the Arduino IDE.

                 

                 

                Thanks for the feedback. DiegoV_Intel or CMata_Intel is this something you could look onto?

                • 5. Re: Cannot upload sketch from Arduino IDE
                  DiegoV_Intel

                  Hello,

                   

                  massca, I've just checked the Getting Started Guide for Arduino and the pictures seems to be correct. I couldn't check it yesterday so the guide was probably fixed recently. Thanks for the feedback.

                   

                  Regards,

                  Diego.

                  • 6. Re: Cannot upload sketch from Arduino IDE
                    massca

                    Hi mhahn,

                    Now I have an Arduino working setup on my Win7 PC. On my Win8 PC it doesn’t work due to the problems with the drivers, as described in this thread: https://communities.intel.com/thread/60309

                     

                    Hi DiegoV,

                    About Arduino setup guide described here: http://www.intel.com/support/motherboards/desktop/sb/CS-035337.htm

                    I think “Step 19” and “Figure 8” needs to be correct based on my learning with this thread.

                    It suggest to use the “USB Serial Port (COM#)”, instead of the “Intel Edison Virtual Com Port(COM XX)” that is the correct one to upload the Arduino Sketches.

                     

                    Please let me know if my conclusion is correct.

                     

                    Thanks

                     

                    -massimo

                     

                    • 7. Re: Cannot upload sketch from Arduino IDE
                      CMata_Intel

                      Hi guys!

                       

                      massca I think we will have to wait a bit for the release of the driver as MPayne said in Re: RNDIS and CDC Serial won't install in Windows 8

                       

                      mhahn and massca:  I had the same issue that you with the figures in the document, however as DiegoV_Intel said, he didn't have problems with it. So I opened the same link in another web browser (IE) and I had some figures related to the IDE and others to the XDK.  Workaround: I close a VPN connection that I was using and opened again the link with IE and all the images were fine. Let me know if it works for you too.

                       

                      Regards;

                      CMata

                      • 8. Re: Cannot upload sketch from Arduino IDE
                        mhahn

                         

                         

                        I had the same issue that you with the figures in the document, however as DiegoV_Intel said, he didn't have problems with it. So I opened the same link in another web browser (IE) and I had some figures related to the IDE and others to the XDK.  Workaround: I close a VPN connection that I was using and opened again the link with IE and all the images were fine. Let me know if it works for you too.

                         

                         

                        CMata_Intel - that sounds pretty odd. I guess you just had caching issues? Anyways, by now the XDK images seem gone. Still note the open from massca [slightly modified the quote]:


                        I think “Step 19” and “Figure 8” needs to be corrected based on my learning with this thread.

                        It suggest to use the “USB Serial Port (COM#)”, instead of the “Intel Edison Virtual Com Port(COM XX)” which would be the correct one to upload the Arduino Sketches.

                         

                        Please let me know if my conclusion is correct.

                        • 9. Re: Cannot upload sketch from Arduino IDE
                          DiegoV_Intel

                          Hello massca,

                           

                          Yes, your conclusion is correct. Good catch by the way. I will report this detail.

                           

                          Thanks for the feedback.

                           

                          Regards,

                          Diego.