Page 1 of 2
Using the fantom driver on Mac OS X, intel architecture
Posted: 01 Dec 2010, 17:58
by lizard381
I'm not sure if I'm missing an update, but I've sesarched long and hard online for one. I want to use the NXT header files that you get in the fantom driver, but they seem targeted to ppc architecture, and when I try to compile using them I keep getting the following error: #error Unknown processor.
This is being thrown by platform.h, and I see where it has cases for ppc, i386, but not x86_84. Is there an updated version of this file? The targets folder also the Fantom.framework file under macosxU/ppc/apple-gcc-3.3/release. This seems pretty outdated.
Re: Using the fantom driver on Mac OS X, intel architecture
Posted: 01 Dec 2010, 18:26
by gloomyandy
Hi,
I don't think there is a 64bit version of the SDK. For leJOS (which uses the Fantom driver on Mac and Windows), we use a 32bit jni (native code), library and hence can only run using a 32bit JVM. If it is of any use to you our Fantom interface is here:
http://lejos.svn.sourceforge.net/viewvc ... k/jfantom/
As you can see we have build files and some notes about OS X usage...
Andy
Re: Using the fantom driver on Mac OS X, intel architecture
Posted: 01 Dec 2010, 21:34
by lizard381
Ahh, I'll see if any of this helps.
So Lego has just abandoned updating their SDK?
Kami
Re: Using the fantom driver on Mac OS X, intel architecture
Posted: 02 Dec 2010, 00:16
by gloomyandy
Hi,
It's not a Lego SDK it is supplied by NI (National Instruments), and I guess that since the Lego software is 32bits on both the Mac and Windows (and as far as I know works fine) then they see no need to port it to 64 bits. The actual drivers are I think 64 bits (certainly there is a 64bit windows driver)....
Re: Using the fantom driver on Mac OS X, intel architecture
Posted: 02 Dec 2010, 01:06
by linusa
Just for the record, I've never got it working to load the Fantom driver library into MATLAB using a 64bit OS and 64bit MATLAB. While the problem could be Fantom itself, or MATLAB, or Windows, a 64bit SDK is definitely missing! Maybe that's the problem.
Re: Using the fantom driver on Mac OS X, intel architecture
Posted: 02 Dec 2010, 01:31
by lizard381
linusa wrote:Just for the record, I've never got it working to load the Fantom driver library into MATLAB using a 64bit OS and 64bit MATLAB. While the problem could be Fantom itself, or MATLAB, or Windows, a 64bit SDK is definitely missing! Maybe that's the problem.
Interesting, so you've only gotten the fantom driver library to work with 32bit MATLAB [on a 64bit OS]?
Re: Using the fantom driver on Mac OS X, intel architecture
Posted: 02 Dec 2010, 14:51
by linusa
lizard381 wrote:
Interesting, so you've only gotten the fantom driver library to work with 32bit MATLAB [on a 64bit OS]?
Exactly! I've tried many things. There are so-called "thunkfiles" in MATLAB, which are apparently exactly what seems to be needed to load a library that doesn't match the bits you need. I tried all different compiler and OS combinations of Visual Studio 2005, 2008, 32bit Windows XP and 64bit Windows 7. The one and only thunkfile I could ever produce (on 32bit) was no help.
I'm afraid I did the testing using the old Fantom 1.03 driver and the ROBOTC 64bit driver (which seems to be just a 64bit wrapper / installer for the original 32bit version). So using the "new" Fantom 1.1, the tests might need to be repeated (newer MATLAB versions have also been released).
Anyway, I've personally given up on that topic (at least for now).
Re: Using the fantom driver on Mac OS X, intel architecture
Posted: 09 Dec 2010, 00:36
by lizard381
gloomyandy wrote:Hi,
I don't think there is a 64bit version of the SDK. For leJOS (which uses the Fantom driver on Mac and Windows), we use a 32bit jni (native code), library and hence can only run using a 32bit JVM. If it is of any use to you our Fantom interface is here:
http://lejos.svn.sourceforge.net/viewvc ... k/jfantom/
As you can see we have build files and some notes about OS X usage...
Andy
Actually I have problems just running build_OSX.sh, the same problems I'm now having when I try to compile anything linking to the fantom files, I get around 200 errors from the header files, with errors like " 'ViInt32' does not name a type", "'kStatusOffset' was not declared in this scope" or "expected initializer before 'nFANTOM100_iFile_openForWrite' ". I know this must be something silly I've done or have omitted to do in setting everything up.
Re: Using the fantom driver on Mac OS X, intel architecture
Posted: 09 Dec 2010, 02:27
by gloomyandy
Hi,
I probably can't help that much as I'm not a Mac guy. But have you followed all of the instructions in the readme file and downloaded and installed the various required sdks etc.? Also have you setup the paths to reference the various sdks correctly? Other than that just strat with the first error and see if you can work out what is going on, grep through the files to try and find the required definitions etc. and that should tell you what is wrong. Certainly that code can be built on a Mac it is what we ship as standard for that platform. I'm pretty sure a number of people have actually built it as well, but you never know Shawn (our Mac guy) may have missed out a step... I'll see if I can get him to drop by and take a look at this thread...
Andy
Re: Using the fantom driver on Mac OS X, intel architecture
Posted: 09 Dec 2010, 08:53
by javajunkie
lizard381 wrote:
Actually I have problems just running build_OSX.sh, the same problems I'm now having when I try to compile anything linking to the fantom files, I get around 200 errors from the header files, with errors like " 'ViInt32' does not name a type", "'kStatusOffset' was not declared in this scope" or "expected initializer before 'nFANTOM100_iFile_openForWrite' ". I know this must be something silly I've done or have omitted to do in setting everything up.
Look at both the README and the script itself.
If you are building on Snow Leopard, you will have to change the script as from Java 6 rev 3, jni.h is in the Java Developer package (/System/Library/Frameworks/JavaVM.framework/Headers).
I tested a Snow Leopard build and have it in the script but you have to comment out leopard and enable SL. Have a look at the OSX.sh and the notes should be clear.
Shawn