4 Replies Latest reply on Mar 13, 2017 5:43 PM by Intel Corporation

    Executing my Program at Board Startup & Deploying from Eclipse

    MarkInTO

      Greetings:

      I am new to Linux and Edison. I have been new to a lot of things in the past but I can usually get going quickly and learn what I need to know as I go. It's been a little more difficult with this Edison board and tools. I have been groping around in the forums for a day or two now and I have seen variants of these two questions posted with no answer that seems to work, or perhaps I have missed something.

       

      Q1:

      If I have a simple program that runs "forever", what is the simplest way to get it to start when the Edison board is powered up?

       

      Q2:

      Can I deploy a C/C++ project onto an Edison from Eclipse? I ask because I read another thread which suggested that the only way to get an executable that you have developed using Eclipse to reside permanently on your Edison board is to "splice" the program into source files on your Edison and build it using GCC. Is this true?

       

      Thank you,

      Mark

        • 1. Re: Executing my Program at Board Startup & Deploying from Eclipse
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Hi Mark,
           
          Thanks for your interest in the Intel Edison Platform.
           
          We’d love to help you with your experience using the Edison board. Regarding your first question, if you want that your program runs every time your Edison boots, we’d recommend you to create a system service. Please, take a look at this link for more details: https://communities.intel.com/docs/DOC-111103.
           
          Moreover, regarding your second question, you can develop your projects using Intel System Studio IoT Edition (Eclipse) and upload them on your Edison board, however, the program will be located in /temp and every time you reboot your Edison, it will be deleted and you will have to upload it again. So, in order to keep your program running in your Edison after rebooting, we’d recommend to create a file.c in your Edison and copy your code from the Eclipse to that file, then compile it using GCC, after that you can create a system service that runs your program when the Edison boots.
           
          Hope this information helps, however, if you have any other question, don’t hesitate to ask, we’re here to help you.
           
          Regards,
          -Yermi A.
           

          • 2. Re: Executing my Program at Board Startup & Deploying from Eclipse
            MarkInTO

            Hi Again:

            Thanks for the answer to my first question. That was do-able.

             

            As for the answer to the second question:

            What does one do if an app is developed that uses several modules (.c or .cpp source files)? This is usually the case isn't it? It's fine to experiement around with little sample programs that demonstrate this and that but when it comes down to getting something done, we're going to have separate modules doing different things and some executive module(s) fitting it all together, right? How is that managed?

             

            Also, I am finding that the Linux philosophy seems to be that separate processes communicating through pipes is a common architectural solution. This implies testing and developing one process while other processes that you have developed are active (or suspended pending some input or event). How is that managed?

             

            Thanks,

            Mark

            • 3. Re: Executing my Program at Board Startup & Deploying from Eclipse
              Intel Corporation
              This message was posted on behalf of Intel Corporation

              Hi Mark,
               
              Thanks for contacting us back.
               
              We’d recommend you to try the suggestion from this link: Moving a program from Eclipse to compile with GCC on the Edison, we’ll write that answer here again, however, you can find more details in that thread.
               
              “You can use anyway, Eclipse to compile your project. Once compiled you will find the binary in the Debug folder of your folder project in your workspace (so something like (.../worksace_iot/<project_name>/Debug). You can copy this binary to your Edison board then”
               
              Please try this suggestion and let us know if it helps.
               
              Regards,
              -Yermi A.
               

              • 4. Re: Executing my Program at Board Startup & Deploying from Eclipse
                Intel Corporation
                This message was posted on behalf of Intel Corporation

                Hi Mark,
                 
                We would like to know if you tried the previous suggestion or if you have any other questions.
                 
                Regards,
                -Yermi A.