Cross Compiling on the Omega2
Thank you I'm trying now but seems that the libonionoledexp isn't installed, this is the screen:
@MarshalllGG Take a look in make menuconfig and ensure you have selected Onion->Libraries->libonionoledexp, if it is not selected, select it then run make
Maybe do I need to compile another time the toolchain?
also searching "oled" no matches found
@MarshalllGG From the main menu "Onion" then "Libraries"
Okay I did all these things and I tried to build the project:
The libraries I included are:
@MarshalllGG In Project Properties, select "C Compiler" in the left side menu, then add to "include directories" source/staging_dir/target-mipsel_24kc_musl/usr/inlcude
Hey @crispyoz I'm sorry I didn't thanked you, now I'm using the Omega2+ for some projects with threads and semaphores and I wanted ask you how to add the flag -lpthread in linking (because I think it's for this that the run command gives me error in make)
crispyoz last edited by crispyoz
@MarshalllGG Glad to see you are making progress. If you look at the attached screen shot, this is in the project properties and you can see I also have added pthread library to the link. Use the Add Standard Library Button
Oh thank you this works and it's very powerful! Thank you so much!
I have just some other questions I hope you can ask...
This NetBeans setup is the same as cross-compiling for omega? Means that I can run server programs binding to Omega's IP and the omega will run a tcp server?
Another question, I tried all the combinations possible, but seems that the libonionoledexp.so can't work, I combined it with liboniondebug and libonion12c as it's suggested in documentation, and I also configured the project properties (now in compilation line the flags -l<lib> are added).. Did you use that library too?
@MarshalllGG The term "Cross Compiling" simply means that you are compiling on one system but the generated binary is targeted at a different system. Using Netbeans you are using the same compiler and linker as you would use if you are using the commandline compile and link steps. You can certainly develop an app that binds to a TCP port, some of my own apps run as Daemons/Services on Omega2S+ providing those services via TCP and UDP.
You can certainly include libonionoledexp.so etc simply add them to the Libraries as you have done above with pthreads, just use the "Add Library" button instead and browse for the .so files. I recall I had an issue with this a couple of years ago but I don't recall what it was. Post your build log so I can look at it.
Okay it's all clear now, then when I build I think I have to transfer the executable and run it in the omega's terminal, it seems work when I try this
Then I will try to finish my project without OLED libraries, thank you so much!
@MarshalllGG Yes you can compile on say Linux but you have to run the app on your Omega2. Sometimes if I am developing an app I might do the skeleton of the work on my Linux system and test it on Linux without all the Omega2 specific stuff. Once I have that all correct I then start adding the Omega2 specific stuff and then need to test it on the Omega2.