From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: ramon costa <ramoncostacastello@domain.hid>
Cc: Xenomai help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] using floating point in rtdm
Date: Thu, 19 Aug 2010 11:13:35 +0200 [thread overview]
Message-ID: <4C6CF5BF.3060405@domain.hid> (raw)
In-Reply-To: <AANLkTi=dpYJNx+UzbjLy6Jpky2sscccUoVS5VZCAKMUv@domain.hid>
ramon costa wrote:
> Hi,
>
> I would like to use floating point arithmetics (double, ..) and operations
> (sin, cos) inside a rtdm task.
> How should I do this ?
You should not.
If you really want to, you have two solutions:
- let the kernel compile your module as is, this will generated
"soft-float" code, which means that the operations will be done in
software. Your module will contain undefined references to functions
actually implemented in libgcc. So, you will have to extract the needed
.o from libgcc.a and put them in your module.
- try and use "hardware" floating points. This means that you will have
to change the kernel build system to allow compiling hardware floating
points in kernel space. Here again, your module will contain undefined
references, but that will be undefined references to the libm functions
(such as sin, cos). So, you will have to compile the libm as a kernel
module. You will also have to patch RTDM to allow setting the XNFPU bit
to RTDM threads, and also note that you will be only able to use FPU
from such threads (and particularily, not from module initialization and
cleanup code).
If you decide to go either way, no code helping doing this will ever be
merged into Xenomai, so you will have to maintain your own version of
Xenomai.
>
> Can anyone provide and example (Makefile+code) or point me to one ?
I am afraid nobody every did something like this because this is not
worth it.
--
Gilles.
next prev parent reply other threads:[~2010-08-19 9:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-19 9:00 [Xenomai-help] using floating point in rtdm ramon costa
2010-08-19 9:13 ` Gilles Chanteperdrix [this message]
2010-08-19 9:27 ` ramon costa
2010-08-19 9:31 ` Gilles Chanteperdrix
2010-08-19 9:45 ` Gilles Chanteperdrix
[not found] ` <AANLkTinCCejWZQhGOQd=CZ+yq482x0z4VCB5we+1mX9H@mail.gmail.com>
2010-08-19 12:30 ` Gilles Chanteperdrix
[not found] <mailman.53.1282212027.5136.xenomai@xenomai.org>
2010-08-19 21:00 ` Bob Feretich
2010-08-19 23:39 ` Gilles Chanteperdrix
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C6CF5BF.3060405@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=ramoncostacastello@domain.hid \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.