6 Replies Latest reply on Oct 30, 2014 8:47 AM by mhahn

    Which command Galileo uses to upload the sketch internally

    BREL

      All,

       

      How does intel Galileo uploads sketch to MCU?

       

      If I need to upload the sketch manually without IDE what steps I need to follow

       

      Please advice.

       

      Thanks

       

      BREL

        • 1. Re: Which command Galileo uses to upload the sketch internally
          mhahn

          on Galileo side "clloader" (started  from galileo_target.service) is listening on /dev/ttyGS0.

          On Arduino side a script is sending the data over serial. Just check the script within the Arduino IDE for the protocol.

           

          But: why not using scp, rsync, ...? Or working natively on the board (e.g. C/C++/Python/Node.JS ...)

          • 2. Re: Which command Galileo uses to upload the sketch internally
            BREL

            Dear Mhahn,

             

            This is encouraging - Thank you very much for the quick response.

             

            From your reply, it is possible to upload a sketch using Python or C/C++ directly over scp

            Let us say, I have fastblink.ino sketch, copied over to galileo linux /home/root - from there how do I upload this sketch to mcu using Python or C

            I am not very knowledgeable in this area - if you could give me steps will be of great help

             

            Thank you so much

             

            High Regards

             

            BREL

            • 3. Re: Which command Galileo uses to upload the sketch internally
              mhahn

               

              From your reply, it is possible to upload a sketch using Python or C/C++ directly over scp

              Let us say, I have fastblink.ino sketch, copied over to galileo linux /home/root - from there how do I upload this sketch to mcu using Python or C

              I am not very knowledgeable in this area - if you could give me steps will be of great help

               

              a sketch.ino is effectively a C++ program which will be cross compiled by the Arduino IDE to a Linux binary which is executed on the target.

              With you not wanting to use the Arduino IDE I assumed you were looking for alternative means to program. So you could run Python or Node.JS code on the target or build C/C++ projects outside of the Arduino IDE.

              If you want to stick to *.ino sketches you probably will want to use the Arduino IDE - at least to cross compile them. You may manually upload the generated binaries which ever way you'd like if you dislike the Arduino IDE way via serial.

              • 4. Re: Which command Galileo uses to upload the sketch internally
                BREL

                Understood,

                 

                As you outlined, yes - I would like to use python code running on the SD card Linux to upload the sketch manually. Could you please help outline how to upload the same to MCU ( Quark Processor). Getting closer on this - few more hurdles to go. with   /opt/cln/galileo/clloader  - how do I specify the sketch file for the cloader to upload the same - is what I am asking.

                Sorry for being naive

                 

                Thanks and Regards

                BREL

                • 5. Re: Which command Galileo uses to upload the sketch internally
                  BREL

                  Dear Mhahn,

                   

                  Thank you very much for your reply and this is truly encouraging,

                   

                  Please advice on the steps uploading the sketch file from CLLoader as you mentioned.  I am currently held up ! or Point me to some articles on this.

                   

                  Regards,

                   

                  BREL

                  • 6. Re: Which command Galileo uses to upload the sketch internally
                    mhahn

                    as mentioned: if you are interested in clloader usage pls check the uploading script in the Arduino IDE for the protocol (or alternatively clloader sources).

                    However, if you don't want to use that - why not writing your own listening daemon?

                     

                    BTW: somewhere in this forum you'd find a thread on uploading sketches wirelessly; maybe a good start?