To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 3573
3572  |  3574
Subject: 
Re: Linux legos install help me please
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Wed, 10 Dec 2003 17:39:11 GMT
Viewed: 
4021 times
  
Sebastian Scott wrote:

Wow thanks for the speedy response nanobapt.   I am going to attempt to run legnoppix as a guestthrough VMware tonight.  I will keep you posted on how that goes.   Whati am really interested in is the math.

Nano wrote


For Debian : you need to compile the math.c with the kernel and put the
math.h in the include file .... In legOS 0.2.6 you only need to add a
line in the makefile in the boot directory ! but I don't know if it's
the same in last version.

Or an other way is to use legnoppix ;-)

nanobapt



1st Are you saying that lenoppix already has math.h



Oups nbo sorry ... not for the moment but I can implement it !!

Oh if someone know how to make work the USB tower under linux (to add
this function to legnoppix) that would be fun

2nd If my first question is not correct and all goes to plan using legnoppix as
a host in VMware and I do need to maually do it the hard way can I clarify a few
things is math.h only what is below? And math.c the rst (from your original
posting)?


/*math.h*/

#define PI 3.1415

/*
*puiss(2, 3) == 2^3
*/

extern float puiss(float nb, int deg);

/*
*factor(5) == 5!
*be aware taht the RCX can't calculate foctor like 20! :)
*/

extern int factor(int n);

/*
*Precision is not really good but enought for the RCX
*/

extern float sin(float x);
extern float cos(float x);



Yes that only this file ...

3rd when you say compile math.c with the kernel, do you mean put math.c in
brickos/kernel/ and recompile? (Assuming math.c is the rest of the code from the
posting above)




Yes put it in the kernel directoy and edit makefile and then recompile

4th I am assuming you meant the include directory or is there an include file?



put math.h in the include file






the sentence would be :

"put math.h in the include directory" sorry


5thAnd if we are talking the directory are we talking in the the apt-get install
legos created /usr/legos/include or the manually created
/home/sebs/legOS/include?




That's a bit more complex ... when you compile a brickOS program, gcc
need to access to include directory that include the math.h

6th from your posting 3270

Oh note : you need to compile with -lfloat your kernel if you want to
include it into kernel

just add -lfloat to $LIBS in the Makefile.kernel

When does this come into it?




Before compile your kernel !! you need to say to say " I want the float
support" to gcc :)

How I broke my debian legos kernel was that I tried to add math.c to Legos/kernel and math.h to the include directory, but when I recompiled and tried to run test.c it would return cannot find math.h.   So thenI tried adding the math.h to the /usr version and added the -lfloat to the Makefile.kernel and it recognised math.h but not _sin and since then my program on my rcx give a one crazy reading 891 or something.




if you dont compile your kernl with the math.c gcc can't link sin
funtion to the correct adress !!

I really appreciate your help I think i will have success with legnoppix amd
VMware, but I really need to use trig functions for a project I am working on at
the moment



I don't know if legnoppix will work with VMware cause there are no
option to install legnoppix



Message is in Reply To:
  Re: Linux legos install help me please
 
Wow thanks for the speedy response nanobapt. I am going to attempt to run legnoppix as a guestthrough VMware tonight. I will keep you posted on how that goes. Whati am really interested in is the math. Nano wrote (...) 1st Are you saying that (...) (21 years ago, 10-Dec-03, to lugnet.robotics.rcx.legos)

4 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR