I am quite new to Makefiles, Linux, cross-compiling, etc. and was wondering if you could give me a hand.
I have a relatively large code which compiles perfectly fine inside the Beaglebone Blue. However, it takes quite some time. Can I compile it on my Windows WSL Ubuntu 20.04 LTS? I use the #include <robotcontrol.h> library. What would be the steps?
After cross compiling, how would I upload the code to the board “securely”? I’ve read something with like ssh or something like this?
I’d like to organise my code a bit better, eg. having scr folder, include folder, probably object folder, and somefolder where it outputs the executable like “bin” and so on. At the moment I have this makefile which I took from one of the templates. What would I need to modify on it?
Thank you very much in advance for your help.
All the best!
Not exactly sure why, but this one now works as expected.
Just a quick update on my progress. I’ve managed to be almost where I want. I added everything to folders src and inc, did a few changes on the Makefile as well as on includes (#include <> rather than " ") and its working… The only thing left is for the objects to go to another folder, say obj. I couldn’t find how to do this so for the moment I added a rule at the end that deletes all the objects from the src folder after the executable is generated.
Here is a screen shot of my Makefile now. Would appreciate if anyone can tell me what little change I can do to put the obj elsewhere, though I don’t think I even need them.
For the time being, I’m gonna consider this done, but please do let me know if you have a more appropriate solution.
Let me know if you have any suggestions for my other 2 points!
All the best!