OK, cross-compiling happy fun time. I'm going to assume you're using Linux as your development desktop, since those are the tools provided by plugcomputing:
1) Download the relevant development kit from plugcomputing. Specifically, go to resources->downloads, click on Compilers, then download "SHEEVAPLUG HOST SW SUPPORT PACKAGE FOR LINUX"
2) Extract it all. I'm going to set up some "standards" for you to adhere to now that will work for you:
Code:
unzip SheevaPlug_Host_SWsupportPackageLinuxHost.zip
cd LinuxHost
bzip2 -cd ./gcc.tar.bz2 | tar -xvf-
sudo mv gcc /usr/local/sheeva-toolchain
gzip -cd "./Linux Host Filesystem - rootfs.tar.bz2" | tar -xvf-
sudo mv rootfsv1.0 /usr/local/sheeva
2a) Make sure you have cmake installed. If you're using ubuntu, "sudo apt-get install cmake".
You now have all the tools you need to cross-compile stuff for sheeva. Now to try compiling.
3) Make sure you have the latest svn of obdgpslogger, as I've added a Sheeva toolchain file to it:
Code:
svn co svn://svn.icculus.org/obdgpslogger/trunk obdgpslogger
4) Set your environment to let cmake find the sheeva toolchain:
Code:
PATH=/usr/local/sheeva-toolchain/bin:$PATH; export PATH
5) And build!
Code:
mkdir build; cd build
cmake -DCMAKE_TOOLCHAIN_FILE=../cmakemodules/Toolchain-sheeva.cmake ..
make
See what happens. Assuming all goes to plan, you will find the important binary you need in ../bin:
Code:
$ file ../bin/obdgpslogger
../bin/obdgpslogger: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.14, not stripped
Well, that was easy. [comparatively :-D]
Gary (-;
Bookmarks