Compiling on Linux

Almost all of the programmers on our software team run Linux and use editors like Vim, Geany, etc. As far as I know, Wind River Workbench on Windows and is the only supported method for compiling C++ code to the robot. Is there a Makefile we could use instead?

Yes and no.
If you started now, trying to establish a viable build environment on Linux, you might get it right in time for the 2011 season.
Workbench has a VI mode editor though.
Also, WB installs many UNIX-like utilities that can be accessed from the development shell.

i asked my friend who mentioned something about g++… not sure if it will make robot compatible code, or if it just makes linux excutables…

There is no reason why you can’t do all of your editing in vim, emacs, etc. (after all, they are just text files on the disk). Then, use Workbench to do compilation and deploy the code. You could either install Cygwin on a Windows machine, or get WindRiver running on WINE for this to work.

GCC/G++ can build for just about anything, including PowerPC (what the cRio is), although I doubt a plain PowerPC build will work on the cRio, plus the WPIlib will probably not like not being run through its normal compiler.

Have you tried running any of this on WINE? Then you can edit the files as you wish, then compile them in a sorta-native-running WindRiver (since Wine does not actually emulate, it is much faster then emulators/visualizers).

Another option you have is to use a SVN or similar repository server and then have a computer running Windows with WindRiver dedicated to building stuff and loading it to the cRio (possibly your Classmate.) This would also give you a central repository for all of your code, which would help with versioning and out-of-date code in builds.

It would have been better to start before kickoff. You should still be able to get it done in the next few days.

We compiled and downloaded under Linux last year using WINE, and will this year. I started in on getting debugging working, but backed down. Download the windows tools at the following URL, and extract them to the spot listed in the Makefile. The makefile should then download WPILib (last year’s version, you can easily see where to specify the new source), patch it, and then compile it. I also included the patches I wrote to get doxygen to work to my satisfaction with the downloaded version of WPILib, and to get the Makefile for WPILib to actually work. Remove the .txt extension, and make a directory called bin where you are compiling, and put the patches there. It should be slightly obvious from the Makefile. Also, remove the .txt extension from the *ppc.txt files, and put those in the bin folder.

If you need any help getting it to work, or I forgot a step/file, I’d be glad to help.

http://zone.ni.com/devzone/cda/tut/p/id/5694

Makefile.txt (4.47 KB)
makefile.patch.txt (1.13 KB)
Doxyfile.patch.txt (2.13 KB)
arppc.txt (61 Bytes)
ccppc.txt (61 Bytes)


Makefile.txt (4.47 KB)
makefile.patch.txt (1.13 KB)
Doxyfile.patch.txt (2.13 KB)
arppc.txt (61 Bytes)
ccppc.txt (61 Bytes)

The easiest way to compile on linux is to use java.