6 Replies Latest reply on Jan 29, 2014 9:37 AM by Mikal.Hart

    galileo forgets sketch after power off

    LeFelix

      Hey

       

      when i flash my sketches to my Arduino Uno it is stored till i flash something new (even if i power it off).

      The Galileo only stores it till i power it off.

      How can i make the Galileo store the sketch longer?

        • 1. Re: galileo forgets sketch after power off
          Intel_Jesus

          Hi LeFelix,

           

          In order for the Galileo to run a persistent sketch. It requires the SD card with the LINUX IMAGE FOR SD For Intel Galileo. You can download it here: https://communities.intel.com/docs/DOC-22226

           

          Once the Galileo boots from the SD card it will not forget your sketches. Take a look at the Getting Started Guide Section 11 for more information on how to setup the SD card. The Getting Started Guide can be found here: https://communities.intel.com/docs/DOC-22204

           

          This is what the Getting Started Guide says in the intro to Section 11.

          "This setup also allows you to save your sketch to the Galileo board, so it will be able to repeat sketches after board power-down. (These steps create a persistent /sketch forlder and rootfs.)"

           

          Regards,

          Intel_JEspinoza

          • 2. Re: galileo forgets sketch after power off
            JamesBond

            What Intel_JEspinoza said.


            If you boot run Galileo as is, there is no room to store the sketch. Thus, it forgets the sketch right after you boot. The instructions can be found in the link above. You know if it worked if the SD led begins flashing on startup. In addition, installing the extended version of linux will provide you other opportunities such as being able to program in Python and accessing the console directly through telnet. I highly recommend you try it.


            Best of Luck!

            007

            1 of 1 people found this helpful
            • 3. Re: galileo forgets sketch after power off
              LeFelix

              Thanks for your help, your SD boot solution works without problems.

               

              Thanks a lot

              • 4. Re: galileo forgets sketch after power off
                Mikal.Hart

                I'm still struggling with this.  I've formatted an 8GB SD card with FAT, copied what I believe are the correct files into the root directory, updated the firmware to v782 (?), but I still can't get my sketch to persist over a reboot.

                 

                When I plug in the power cable the SD light flickers for a few hundred milliseconds, and when I finally get booted I can see the SD card:

                 

                ls -l /media/mmcblk0p1

                -rwxrwxrwx    1 root     root         21504 Sep 20  2013 CapsuleApp.efi

                -rwxrwxrwx    1 root     root       2113856 Sep 30  2013 bzImage

                -rwxrwxrwx    1 root     root       1441609 Sep 30  2013 core-image-minimal-initramfs-clanton.cpio.gz

                -rwxrwxrwx    1 root     root           801 Sep 30  2013 grub.conf

                -rwxrwxrwx    1 root     root     314572800 Sep 30  2013 image-full-clanton.ext3

                -rwxrwxrwx    1 root     root       6989200 Sep 30  2013 sysimage_Intel_Galileo_v0.7.5.cap

                 

                mount

                rootfs on / type rootfs (rw,relatime)

                proc on /proc type proc (rw,relatime)

                sysfs on /sys type sysfs (rw,relatime)

                debugfs on /sys/kernel/debug type debugfs (rw,relatime)

                devtmpfs on /dev type devtmpfs (rw,relatime,size=115544k,nr_inodes=28886,mode=755)

                /dev/mmcblk0p1 on /media/mmcblk0p1 type vfat (rw,sync,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

                none on /dev/mqueue type mqueue (rw,relatime)

                tmpfs on /var/volatile type tmpfs (rw,relatime)

                tmpfs on /media/ram type tmpfs (rw,relatime)

                devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)

                 

                But when I reset (unplug, plug) my Galileo, the sketch I was running doesn't restart.

                 

                Any advice?

                 

                Thanks!

                 

                Mikal

                • 5. Re: galileo forgets sketch after power off
                  LeFelix

                  Hey Mikal,

                   

                  i think you have some files on your card which i dont have.

                  Unbenannt.JPG

                  these are the files from the intel file. i formated my micros SD (2GB, but the galileo should also handle 16-32gb cards) in FAT32 and copied the files and folders provided to the card. as OS i used windows 7 x64.

                  the first bootup took a little longer, but now the galileo boots in appr. 7 seconds and holds the sketches after power off.

                   

                  hope this helps

                  Felix

                  • 6. Re: galileo forgets sketch after power off
                    Mikal.Hart

                    Thank you all. I got it to work.

                     

                    My problem was that I dragged and dropped the files from the archive using WinZip to the SD card, and this did not preserve the file system structure.  grub.conf is supposed to be under the "boot" folder.

                     

                    Now my sketches are preserved (and auto-run) between reboots, and I see the SD light flickering a lot.  Furthermore, there are a few more folders at the root level.

                     

                    The only thing is, my boots still take about 40 seconds.  That is, 40 seconds elapsed from the moment I apply power until I can see evidence that my sketch is running.  I'd love to know the magic for getting that down to 7.