|
 |
|
06-14-2009, 08:55 PM
|
#1
|
|
Admin. Don't bug or I'll byte.
Join Date: Sep 2004
Location: Corning, NY
Posts: 6,143
|
How to get this to work on an ARM processor?
Okay, I'm a complete Linux noob, but if you're willing to help me along, I'd like to make getting OBDII GPS Logger the first app I have working on my Sheeva plug.
It runs Debian Linux 9.04. I know that to get this to work I'll have to do two things:
1. Get a version of FTDI that works or can be compiled for the ARM.
2. Compile GPS logger for the ARM.
I've got a bunch of Linux books on the way. I presume that I need to install gcc (which I have) and can use the make command to compile this for the ARM?
Is this the right way to start?
|
|
|
|
|
|
Advertisement
|
Sponsored links
|
06-14-2009, 09:39 PM
|
#2
|
|
Mod - OBDII GPS Logger forum
Join Date: Mar 2009
Location: Los Angeles
Posts: 401
|
Sounds about right.
OBD GPS Logger has been tested on x86_64, x86, and PPC [so far]. I strongly suspect there's no reason it can't work on ARM too.
Sheevaplug - that means you won't be needing the GUI? Probably makes life easier. The GUI is the only C++ thing in the codebase, too - the rest of it should work with just about any old C compiler you can hunt down.
If you want the GPS logging working [I assume you do], you'll want to get gpsd installed too. obdgpslogger links against libgps [from gpsd] to get the gps data.
Unless you enable dbus [it's off by default, for this application you don't want it], obdgpslogger depends on nothing other than libgps, it calls nothing that isn't in standard libc - it *should* be as simple to build as anything out there. Even if you can't get gpsd working, obdgpslogger will gracefully fallback to not linking with gpsd, and just log obd data.
Are you cross-compiling, or building directly on the device? If you're building directly on the device [much, much, much easier if you can], you'll need gcc and ideally cmake. If you can't get cmake, then I'll write you a couple custom makefiles to get the job done.
Gary (-;
|
|
|
06-14-2009, 09:54 PM
|
#3
|
|
Mod - OBDII GPS Logger forum
Join Date: Mar 2009
Location: Los Angeles
Posts: 401
|
Also, I just checked out that SheevaPlug. I want one! Looks Sweet :-)
Gary (-;
|
|
|
06-14-2009, 10:01 PM
|
#4
|
|
Maximum Bitrate
Join Date: Jan 2008
Location: Dartmouth, MA
Posts: 517
|
And if you really have trouble, I should be getting my sheeva by the end of the week. Next weekend I'll be able to give some pretty serious help. ;-)
Plus Friday is the last day of school for me.
|
|
|
06-15-2009, 03:30 PM
|
#5
|
|
Constant Bitrate
Join Date: Aug 2007
Location: Northern VA
Posts: 125
|
Paul, how do you know yours is coming? Did you get an email letting you know? I have not heard back since I ordered.
Bugbyte, have you tried following this 9.0.4 howto? ALl the ubuntu steps should be the same as long as the ARM repo has the same packages, and you should be able to just build it on board (and you have the memory space)
http://www.mp3car.com/vbulletin/obdi...igure-run.html
hth
charles
|
|
|
06-15-2009, 03:36 PM
|
#6
|
|
Admin. Don't bug or I'll byte.
Join Date: Sep 2004
Location: Corning, NY
Posts: 6,143
|
I'll give it a go! I haven't had a chance to really focus on this but last time I tried to cmake, it told me it didn't know what that command was and I was lost.
|
|
|
06-15-2009, 03:49 PM
|
#7
|
|
Maximum Bitrate
Join Date: Jan 2008
Location: Dartmouth, MA
Posts: 517
|
Quote: Originally Posted by cgalpin 
Paul, how do you know yours is coming? Did you get an email letting you know? I have not heard back since I ordered.
I got an email saying:
Quote:
We just wanted to update you and let you know that your order ****** has shipped via FedEx Ground Service.
Here is your Tracking Number (if available): ***************
Thanks for shopping at GlobalScale Technologies.
GlobalScale Technologies Customer Service
|
|
|
06-15-2009, 04:51 PM
|
#8
|
|
Admin. Don't bug or I'll byte.
Join Date: Sep 2004
Location: Corning, NY
Posts: 6,143
|
Yeah, for awhile they were running a backorder. I took mine about 6 weeks to arrive and I finally got an email telling me it had shipped and when it would arrive. It also said they had stopped taking orders for awhile until they caught up.
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
06-15-2009, 04:57 PM
|
#9
|
|
Mod - OBDII GPS Logger forum
Join Date: Mar 2009
Location: Los Angeles
Posts: 401
|
Quote:
last time I tried to cmake, it told me it didn't know what that command was
Yeah, you need the cmake package installed for that to work.
I've just been browsing the sheeva development stuff; quick question, do you use a cross-compiler, or are you doing something different? If you're using a cross-compiler, cmake gracefully supports what they call "toolchain" files. I can write one for you so that you can compile obdgpslogger on your PC [with your sheeva toolchain installed] using the cmake you already have on that PC.
Gary (-;
|
|
|
06-15-2009, 05:35 PM
|
#10
|
|
Mod - OBDII GPS Logger forum
Join Date: Mar 2009
Location: Los Angeles
Posts: 401
|
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 (-;
|
|
|
06-15-2009, 06:00 PM
|
#11
|
|
Mod - OBDII GPS Logger forum
Join Date: Mar 2009
Location: Los Angeles
Posts: 401
|
Oh, it's worth noting that this doesn't work with gpsd yet.
With gps support disabled, obdgpslogger depends on absolutely nothing that doesn't come in your standard C libraries. Once you have that working, I'll help you [or someone else can] get gpsd working.
Gary (-;
|
|
|
06-15-2009, 07:11 PM
|
#12
|
|
Mod - OBDII GPS Logger forum
Join Date: Mar 2009
Location: Los Angeles
Posts: 401
|
Or, rather than cross-compiling, I read your thread Make fun of the noob; if you have a real flavor of ubuntu 9.04 on there, you might find you just need to do "sudo apt-get install cmake" on the device, and everything will magically turn up. Then you can follow my usual build instructions, but actually run it on the device...
Gary (-;
|
|
|
06-15-2009, 11:17 PM
|
#13
|
|
Admin. Don't bug or I'll byte.
Join Date: Sep 2004
Location: Corning, NY
Posts: 6,143
|
I think it worked....
I tried to make and install and I think it worked. Does this mean it compiled for the Sheeva?
Code:
bugbyte@iPlug:~/build/obdgpslogger-0.6$ cmake /home/bugbyte/build/obdgpslogger-0.6
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Couldn't find libgps
-- Found DBUS: /usr/lib/libdbus-1.so,/usr/lib/libdbus-1.so
-- Looking for include files HAVE_SIGNAL_H
-- Looking for include files HAVE_SIGNAL_H - found
-- Looking for sigaction
-- Looking for sigaction - found
-- Looking for signal
-- Looking for signal - found
-- Looking for XOpenDisplay in /usr/lib/libX11.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Found X11: /usr/lib/libX11.so
-- Found FLTK: fltk_images;fltk;fltk_gl;fltk_forms;/usr/lib/libX11.so;/usr/lib/libm.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/bugbyte/build/obdgpslogger-0.6
bugbyte@iPlug:~/build/obdgpslogger-0.6$ make
Scanning dependencies of target ckobdinfo
[ 3%] Building C object src/obdinfo/CMakeFiles/ckobdinfo.dir/obdconvertfunctions.o
[ 6%] Building C object src/obdinfo/CMakeFiles/ckobdinfo.dir/obdservicecommands.o
Linking C static library libckobdinfo.a
[ 6%] Built target ckobdinfo
Scanning dependencies of target ckobdconfigfile
[ 9%] Building C object src/conf/CMakeFiles/ckobdconfigfile.dir/obdconfigfile.o
Linking C static library libckobdconfigfile.a
[ 9%] Built target ckobdconfigfile
Scanning dependencies of target cksqlite
[ 12%] Building C object libs/sqlite3/CMakeFiles/cksqlite.dir/sqlite3.o
Linking C static library libcksqlite.a
[ 12%] Built target cksqlite
Scanning dependencies of target obdgpslogger
[ 15%] Building C object src/logger/CMakeFiles/obdgpslogger.dir/tripdb.o
[ 18%] Building C object src/logger/CMakeFiles/obdgpslogger.dir/supportedcommands.o
[ 21%] Building C object src/logger/CMakeFiles/obdgpslogger.dir/gpsdb.o
[ 25%] Building C object src/logger/CMakeFiles/obdgpslogger.dir/obdserial.o
[ 28%] Building C object src/logger/CMakeFiles/obdgpslogger.dir/main.o
/home/bugbyte/build/obdgpslogger-0.6/src/logger/main.c: In function 'main':
/home/bugbyte/build/obdgpslogger-0.6/src/logger/main.c:192: warning: assignment discards qualifiers from pointer target type
[ 31%] Building C object src/logger/CMakeFiles/obdgpslogger.dir/database.o
[ 34%] Building C object src/logger/CMakeFiles/obdgpslogger.dir/obddb.o
[ 37%] Building C object src/logger/CMakeFiles/obdgpslogger.dir/obddbus.o
[ 40%] Building C object src/logger/CMakeFiles/obdgpslogger.dir/gpscomm.o
Linking C executable ../../bin/obdgpslogger
[ 40%] Built target obdgpslogger
Scanning dependencies of target obd2kml
[ 43%] Building C object src/kml/CMakeFiles/obd2kml.dir/heightandcolor.o
[ 46%] Building C object src/kml/CMakeFiles/obd2kml.dir/singleheight.o
[ 50%] Building C object src/kml/CMakeFiles/obd2kml.dir/obdgpskml.o
Linking C executable ../../bin/obd2kml
[ 50%] Built target obd2kml
Scanning dependencies of target obd2csv
[ 53%] Building C object src/csv/CMakeFiles/obd2csv.dir/obdgpscsv.o
Linking C executable ../../bin/obd2csv
[ 53%] Built target obd2csv
[ 56%] Generating convertwindow.h
[ 59%] Generating logwindow.cxx
[ 62%] Generating gpsdwizard.cxx
[ 65%] Generating maindisplay.cxx
/home/bugbyte/build/obdgpslogger-0.6/src/gui/maindisplay.fl:2: unknown version '1.0300'
Scanning dependencies of target ckobdfl
[ 68%] Building CXX object src/gui/CMakeFiles/ckobdfl.dir/logwindow.o
[ 71%] Building CXX object src/gui/CMakeFiles/ckobdfl.dir/gpsdwizard.o
[ 75%] Building CXX object src/gui/CMakeFiles/ckobdfl.dir/maindisplay.o
[ 78%] Building CXX object src/gui/CMakeFiles/ckobdfl.dir/convertwindow.o
Linking CXX static library libckobdfl.a
[ 90%] Built target ckobdfl
Scanning dependencies of target obdgui
[ 93%] Building CXX object src/gui/CMakeFiles/obdgui.dir/loggerhandler.o
[ 96%] Building CXX object src/gui/CMakeFiles/obdgui.dir/obdgui.o
[100%] Building CXX object src/gui/CMakeFiles/obdgui.dir/guessdevs.o
Linking CXX executable ../../bin/obdgui
[100%] Built target obdgui
bugbyte@iPlug:~/build/obdgpslogger-0.6$ make install # optional
[ 6%] Built target ckobdinfo
[ 9%] Built target ckobdconfigfile
[ 12%] Built target cksqlite
[ 40%] Built target obdgpslogger
[ 50%] Built target obd2kml
[ 53%] Built target obd2csv
[ 90%] Built target ckobdfl
[100%] Built target obdgui
Install the project...
-- Install configuration: ""
CMake Error at cmake_install.cmake:36 (FILE):
file cannot create directory: /usr/local/share/man/man1. Maybe need
administrative privileges.
make: *** [install] Error 1
bugbyte@iPlug:~/build/obdgpslogger-0.6$ sudo make install # optional
[sudo] password for bugbyte:
[ 6%] Built target ckobdinfo
[ 9%] Built target ckobdconfigfile
[ 12%] Built target cksqlite
[ 40%] Built target obdgpslogger
[ 50%] Built target obd2kml
[ 53%] Built target obd2csv
[ 90%] Built target ckobdfl
[100%] Built target obdgui
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/share/man/man1/obdgpslogger.1
-- Installing: /usr/local/share/man/man1/obd2csv.1
-- Installing: /usr/local/share/man/man1/obd2kml.1
-- Installing: /usr/local/share/man/man1/obdgui.1
-- Installing: /usr/local/bin/obdgpslogger
-- Installing: /usr/local/bin/obd2kml
-- Installing: /usr/local/bin/obd2csv
-- Installing: /usr/local/bin/obdgui
bugbyte@iPlug:~/build/obdgpslogger-0.6$
|
|
|
06-15-2009, 11:26 PM
|
#14
|
|
Mod - OBDII GPS Logger forum
Join Date: Mar 2009
Location: Los Angeles
Posts: 401
|
That's actually on the sheeva? Awesome stuff, looks exactly right.
You even have fltk installed, which means that you can run the gui version on a remote system.
Gary (-;
|
|
|
06-16-2009, 07:59 AM
|
#15
|
|
Constant Bitrate
Join Date: Aug 2007
Location: Northern VA
Posts: 125
|
Quote: Originally Posted by chunkyks 
You even have fltk installed, which means that you can run the gui version on a remote system.
In case it's not clear, what Gary is saying is that you can launch obdgui on the Sheeva and display it on your mac or PC if you want.
On a Mac, the simplest is to fire up the X11 server (may need to install it from CD first) and ssh to the sheeva with X11 forwarding enabled. It should "just work" (tm).
On windows you can use Xming or cygwin for the X server and do the same.
https://sourceforge.net/projects/xming
hth
charles
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:47 PM.
| |