4 Replies Latest reply on Jul 24, 2015 5:09 AM by ccordero

    How do I upload a compiled sketch created with the Arduino IDE without using USB??

    warmour

      Hi All,

       

      I want to compile a sketch using the Arduino IDE, but upload via scp and then execute - Is this possible?

       

      Cheers!

        • 1. Re: How do I upload a compiled sketch created with the Arduino IDE without using USB??
          DiegoV_Intel

          Hello warmour,

           

          I haven't tested it, but it might be possible. When you upload a sketch, it is stored in the /sketch directory as a file named "sketch.elf". You might want to try copying a new compiled sketch through SCP under the directory /sketch, delete the old sketch.elf file and rename the new one to "sketch.elf". Then you can try running this new sketch.

           

          As I said, I haven't tested it but I encourage you to try it and post your results.

           

          Regards,

          Diego.

          • 2. Re: How do I upload a compiled sketch created with the Arduino IDE without using USB??
            warmour

            Hi,

             

            Thanks for you response. I did try but it doesn't work, I get:

             

            root@galileo:~# cp build6955031346436128377.tmp/adafruit_adc.cpp.elf /sketch/sketch.elf                                                                                    

            root@galileo:~# cd /sketch/                                                                                                                                                

            root@galileo:/sketch# chmod +x sketch.elf                                                                                                                                  

            root@galileo:/sketch# ./sketch.elf                                                                                                                                         

            /sketch/sketch.elf: cache '/etc/ld.so.cache' is corrupt                                                                                                                    

            root@galileo:/sketch#                                                                                                                                                      

            root@galileo:/sketch#


            Cheers!   

            • 3. Re: How do I upload a compiled sketch created with the Arduino IDE without using USB??
              DiegoV_Intel

              Hi warmour,

               

              I tested it and I was able to run the new sketch transfered through SCP. I copied the new sketch in the /sketch directory with the name "sketch.elf". Then I rebooted the board and the sketch started once the board booted.

               

              Regards,

              Diego.

              • 4. Re: How do I upload a compiled sketch created with the Arduino IDE without using USB??
                ccordero

                Warmour, download this excellent free ebook: Intel Galileo and Intel Galileo Gen 2 - API Features and Arduino Projects for Linux Programmers

                 

                In one of the chapters there is a step by step "how to hack arduino ide script" guide to upload sketches to galileo/edison with scp.

                 

                Regards,

                Carlos