1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Using the fantom driver on Mac OS X, intel architecture

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.

Using the fantom driver on Mac OS X, intel architecture

Postby lizard381 » 01 Dec 2010, 17:58

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.
I haven't grown past my playing with Legos stage and I don't think I want to :)
Blog: http://nuhlikklebickle.blogspot.com
Kami
User avatar
lizard381
 
Posts: 44
Joined: 16 Nov 2010, 19:57

Re: Using the fantom driver on Mac OS X, intel architecture

Postby gloomyandy » 01 Dec 2010, 18:26

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
User avatar
gloomyandy
 
Posts: 320
Joined: 29 Sep 2010, 05:03

Re: Using the fantom driver on Mac OS X, intel architecture

Postby lizard381 » 01 Dec 2010, 21:34

Ahh, I'll see if any of this helps.

So Lego has just abandoned updating their SDK?

Kami
I haven't grown past my playing with Legos stage and I don't think I want to :)
Blog: http://nuhlikklebickle.blogspot.com
Kami
User avatar
lizard381
 
Posts: 44
Joined: 16 Nov 2010, 19:57

Re: Using the fantom driver on Mac OS X, intel architecture

Postby gloomyandy » 02 Dec 2010, 00:16

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)....
User avatar
gloomyandy
 
Posts: 320
Joined: 29 Sep 2010, 05:03

Re: Using the fantom driver on Mac OS X, intel architecture

Postby linusa » 02 Dec 2010, 01:06

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.
RWTH - Mindstorms NXT Toolbox for MATLAB
state of the art in nxt remote control programming
http://www.mindstorms.rwth-aachen.de
MotorControl now also in Python, .net, and Mathematica
User avatar
linusa
 
Posts: 228
Joined: 16 Oct 2010, 11:44
Location: Aachen, Germany

Re: Using the fantom driver on Mac OS X, intel architecture

Postby lizard381 » 02 Dec 2010, 01:31

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]?
I haven't grown past my playing with Legos stage and I don't think I want to :)
Blog: http://nuhlikklebickle.blogspot.com
Kami
User avatar
lizard381
 
Posts: 44
Joined: 16 Nov 2010, 19:57

Re: Using the fantom driver on Mac OS X, intel architecture

Postby linusa » 02 Dec 2010, 14:51

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).
RWTH - Mindstorms NXT Toolbox for MATLAB
state of the art in nxt remote control programming
http://www.mindstorms.rwth-aachen.de
MotorControl now also in Python, .net, and Mathematica
User avatar
linusa
 
Posts: 228
Joined: 16 Oct 2010, 11:44
Location: Aachen, Germany

Re: Using the fantom driver on Mac OS X, intel architecture

Postby lizard381 » 09 Dec 2010, 00:36

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.
I haven't grown past my playing with Legos stage and I don't think I want to :)
Blog: http://nuhlikklebickle.blogspot.com
Kami
User avatar
lizard381
 
Posts: 44
Joined: 16 Nov 2010, 19:57

Re: Using the fantom driver on Mac OS X, intel architecture

Postby gloomyandy » 09 Dec 2010, 02:27

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
User avatar
gloomyandy
 
Posts: 320
Joined: 29 Sep 2010, 05:03

Re: Using the fantom driver on Mac OS X, intel architecture

Postby javajunkie » 09 Dec 2010, 08:53

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
javajunkie
 
Posts: 3
Joined: 09 Dec 2010, 08:47

Next

Return to Mindstorms Software

Who is online

Users browsing this forum: No registered users and 0 guests