1 2 Previous Next 15 Replies Latest reply on Jul 17, 2015 7:01 PM by MARC_T

    Can't Upload Sketch To Galileo Gen 2


      Hello All,


      I know this question has been asked time and time again but I'm about to lose my sanity over a sketch transfer issue that have been trying to fix without success for six hours in a row.


      I went trough all the posts I could find on the subject as thoroughly as possible without success.


      I managed to compile and upload a working "Fade" example at my first attempt this morning.

      I than went on updating my firmware and obviously broke something either on the Galeileo or on the PC side

      What is driving me crazy is that I managed during my test to upload both the "Blink" and "Fade" twice examples and lost it again after rebooting the board.


      I going nuts !!!!!!


      Do anybody know how I could get out of this mess ?


      Here is everything a got on the subject.

      Thank You


      My setup is like this

      • I'm running Windows 7 Enterprise SP1 64 bits
      • I'm using an Intel Galileo Gen 2 as target
      • I used the Device Manager, running as Administrator, to get rid of all unused serial ports ; that left me with:
        • Communication Port (COM1, Real RS232 Port)
      • I than disabled "COM1"
      • I installed both the "Galileo Driver" and the "Intel Arduino 1.6.4 IDE" with the "iotdk_galileo_win_installer"
      • I connected the FDDI console cable and let Windows find a suitable driver
      • I powered up the Galileo with the power supply and connected the micro USB cable
      • That got me the three following serial ports:
        • Communication Port (COM1, Disabled, Real RS232 Port)
        • Galileo (COM3, micro USB)
        • USB Serial Port (COM4, FDDI 3.3v USB Serial)
      • I used "IntelGalileoFirmwareUpdater-1.0.4-Windows" to update my firmware from 1.0.2 to 1.04 successfully
      • I launched IDE and set the Board to "Intel Galileo Gen 2" and the Port to "COM3"

      Status prior to test

      • I can see in the Device Manager the Galileo's USB Port (COM3) is going away and coming back every time I'm rebooting the board with the "Reboot" button
      • I know the Galileo is booting and running because I can see the whole Linux boot sequence and can log myself as root on the console port (COM4)


      Test Sequence

      • I'm starting the IDE
      • I make sure that IDE active port is set to "COM3"
      • I quitting the IDE
      • I make sure that the "bash.exe *32" and "lsz.exe *32" processes are not running with "Windows Task Manager" killing them if necessary
      • I'm resetting the Galileo using the board's "reboot" button
      • I'm waiting for the "COM3" to go away and come back with the "Device Manager"
      • I'm starting the IDE
      • I'm making sure the IDE is still set to "COM3"
      • I'm requesting the "Blink" example
      • I'm closing the Window with the "Default empty sketch"
      • I'm Verifying/Compiling the "Blink" Example with any issue:
        • Sketch uses 83,463 bytes (0%) of program storage space. Maximum is 10,000,000 bytes.
      • I than attempt to Upload the compiled sketch and stall into an eternal wait state after the following line:
        • "$fixed_path/lsz.exe" --escape -c "mv -f /sketch/sketch.elf /sketch/sketch.elf.old" <> $tty_port_id 1>&0


      I tried the same sequence with the IDE running as Administrator and it didn't help

      I can see, while sniffing "COM3", that the IDE is sending something to request a ZModem transfer and that the Galileo is not send anything back


      The complete log is

      C:\Users\marc\AppData\Roaming\Arduino15\packages\Intel\tools\i586-poky-linux-uclibc\1.6.2+1.0/pokysdk/usr/bin/i586-poky-linux-uclibc/i586-poky-linux-uclibc-g++ -m32 -march=i586 --sysroot=C:\Users\marc\AppData\Roaming\Arduino15\packages\Intel\tools\i586-poky-linux-uclibc\1.6.2+1.0/i586-poky-linux-uclibc -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -D__ARDUINO_X86__ -Xassembler -mquark-strip-lock=yes -march=i586 -m32 -DARDUINO=10604 -IC:\Users\marc\AppData\Roaming\Arduino15\packages\Intel\hardware\i586\1.6.2+1.0\cores\arduino -IC:\Users\marc\AppData\Roaming\Arduino15\packages\Intel\hardware\i586\1.6.2+1.0\variants\galileo_fab_g C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\Blink.cpp -o C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\Blink.cpp.o

      Using previously compiled file: C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\variant.cpp.o

      Using previously compiled file: C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\fast_gpio_common.c.o

      Using previously compiled file: C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\fast_gpio_nc.c.o

      Using previously compiled file: C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\fast_gpio_sc.c.o

      Using previously compiled file: C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\i2c.c.o

      Using previously compiled file: C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\interrupt.c.o

      Using previously compiled file: C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\mux.c.o

      Using previously compiled file: C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\sysfs.c.o

      Using previously compiled file: C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\trace.c.o

      Using previously compiled file: C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\wiring_analog.c.o

      Using previously compiled file: C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\wiring_digital.c.o

      Using previously compiled file: C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\IPAddress.cpp.o

      Using previously compiled file: C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\main.cpp.o

      Using previously compiled file: C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\Print.cpp.o

      Using previously compiled file: C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\pulseIn.cpp.o

      Using previously compiled file: C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\RingBuffer.cpp.o

      Using previously compiled file: C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\Stream.cpp.o

      Using previously compiled file: C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\Tone.cpp.o

      Using previously compiled file: C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\TTYUART.cpp.o

      Using previously compiled file: C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\UtilMisc.cpp.o

      Using previously compiled file: C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\UtilTime.cpp.o

      Using previously compiled file: C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\WMath.cpp.o

      Using previously compiled file: C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\WString.cpp.o

      Using previously compiled file: C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\core.a

      C:\Users\marc\AppData\Roaming\Arduino15\packages\Intel\tools\i586-poky-linux-uclibc\1.6.2+1.0/pokysdk/usr/bin/i586-poky-linux-uclibc/i586-poky-linux-uclibc-g++ -m32 -march=i586 --sysroot=C:\Users\marc\AppData\Roaming\Arduino15\packages\Intel\tools\i586-poky-linux-uclibc\1.6.2+1.0/i586-poky-linux-uclibc -Os -Wl,--gc-sections -march=i586 -o C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp/Blink.cpp.elf C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\Blink.cpp.o C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp\variant.cpp.o C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp/core.a -LC:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp -lm -lpthread

      C:\Users\marc\AppData\Roaming\Arduino15\packages\Intel\tools\i586-poky-linux-uclibc\1.6.2+1.0/pokysdk/usr/bin/i586-poky-linux-uclibc/i586-poky-linux-uclibc-strip C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp/Blink.cpp.elf


      Sketch uses 83,463 bytes (0%) of program storage space. Maximum is 10,000,000 bytes.


      C:\Users\marc\AppData\Roaming\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/x86/bin/bash.exe --verbose --noprofile C:\Users\marc\AppData\Roaming\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadGalileo_win.sh C:\Users\marc\AppData\Roaming\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/x86/bin C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp/Blink.cpp.elf COM3


      starting download script


      Args to shell: C:\Users\marc\AppData\Roaming\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/x86/bin C:\Users\marc\AppData\Local\Temp\build4854807629687327064.tmp/Blink.cpp.elf COM3

      # clupload script to invoke lsz

      COM PORT 3

      # Copyright (C) 2014 Intel Corporation


      Converted COM Port COM3 to tty port /dev/ttyS2

      # This library is free software; you can redistribute it and/or

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

      # modify it under the terms of the GNU Lesser General Public

      Deleting existing sketch on target

      # 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


      # 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 /




      #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




      echo "COM PORT" $com_port_id


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


      #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

        1 2 Previous Next