Cloud Compile



  • I use VirtualBox running Ubuntu on my OSX box, and that works great.

    My current development environment is Eclipse (CDT) using the tool chain that is built as part of the instructions on the wiki. When you create your Eclipse project(s), you specify the tool chain location, etc. I simply copy the generated binaries over to the Omega and I'm off to the races.

    FWIW, I use two build profiles within Eclipse, 'Release' and 'Unit'. The Release profile cross compiles and generates Omega binaries, the Unit profile is for unit testing and generates native (Ubuntu) binaries. This way I run all my unit tests locally and then, assuming all unit tests pass, push (scp/rsync) the Release profile generate code to the Omega.



  • ...I guess I should add that it may take you the better part of a Saturday to get cross compile and Eclipse working, but once its all setup, you'll get it all back and more over using 'Cloud Compile'.



  • @Mitch-Christensen Pretty similar to what I do. Though I use Windows and run a Kubuntu virtual box on which I have Netbeans set up and the toolchain installed and just point my Netbeans C/C++ environment to the toolchain. Even have a custom target in the Netbeans project that once the code is built, connects to the Omega and downloads the code



  • @Mitch-Christensen Thanks Mitch. Hopefully I'll get it sorted at some time.



  • By the by, it's been days now and everything is still queued. Pretty much useless.



  • @Kit-Bishop I tried long to get the SDK working on my host linux installation, but everything were broken dependencies. Then I decided to use Docker for a clean environment, lighter than a VM, and ended up with a working project (here my post asking for feedback).

    I would love to add IDE support, so could you do another tutorial, to explain how you have everything set up?



  • The recipe is really quite straightforward (in hindsight 🙂 ). Once you have your development linux OS (i.e. Ubuntu) installed and running, compile the OpenWRT/LEDE OS using the instructions on the Cross Compile wiki. I've done it several times now and it works for me every time. FWIW, I'm using OpenWRT versus LEDE as I'm still focusing on Omega(1) until things calm down a bit on the Omega2 front. Once compiled, the OS will contain a openwrt-toolchain-... directory. That is the cross compile toolchain.

    Now install the latest (stable) Eclipse CDT.

    With Eclipse running, create a new 'hello world' c/c++ project, and in the cross compile options page of the new project wizard specify the prefix (I use 'mips-openwrt-linux-') and the full path to your tool chain.

    Now, in Eclipase compile a simple HelloWorld implementation. The 'Release' directory within your Eclipse workspace for the project will contain the 'a.out' (or whatever) binary. Copy the binary to the Omega and run it.



  • @Mitch-Christensen said in Cloud Compile:

    until things calm down a bit on the Omega2 front

    Best summary ever.

    And thanks for the answer. I hope to make some tutorials on different IDEs some time in the future, and this helps a lot.



  • @Mitch-Christensen Basically the same process can be done with Netbeans as well - I even have a build target that automatically transfers the resultant executable to the Omega



  • Agreed @Kit-Bishop. Automating the 'copy to the Omega' within the IDE makes total sense.

    At some point I was going to look into FSSM/RDIST to completely automate the copy (i.e. FSSM detects changes to the binaries and calls scp/rdist to copy them out).



  • @Mitch-Christensen said in Cloud Compile:

    At some point I was going to look into FSSM/RDIST to completely automate the copy (i.e. FSSM detects changes to the binaries and calls scp/rdist to copy them out).

    Maybe with rsync will work too (I'm not sure if Omega2 has rsync)



  • @Mitch-Christensen said in Cloud Compile:

    Agreed @Kit-Bishop. Automating the 'copy to the Omega' within the IDE makes total sense.

    At some point I was going to look into FSSM/RDIST to completely automate the copy (i.e. FSSM detects changes to the binaries and calls scp/rdist to copy them out).

    Since it is meaningless to try to run an Omega program on the host machine (in my case Kubuntu), what I did was to create a small script on the system on which I run Netbeans that copies the file passed as a parameter to the Omega using scp. Then in the Run section of the Project Properties, I set the Run Command to: "<myscript> ${OUTPUT_PATH}" where <myscript> is the name of the script file for the transfer including full path to it.



  • Just as an aside, the whole reason for starting this whole discussion, I'm still showed "queued" on cloud compile. What's that now, 3 weeks or so?........ Cloud compile is crap slow. Just a little.



Looks like your connection to Community was lost, please wait while we try to reconnect.