All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Float operations on ARM i.MX27
@ 2010-10-12 16:21 Cagnulein
  2010-10-12 16:54 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 3+ messages in thread
From: Cagnulein @ 2010-10-12 16:21 UTC (permalink / raw)
  To: xenomai

I'm continuing my experience on Xenomai and i've reached the floating
point "point" :)
I've succesfully compiled a project using some floats (division and
printf) but when i try to use a "high level" function like "ceil" or
"sqrt" the linker can't find them.

I know there isn't any hard floating point unit on this cpu, so it's all
emulated (soft floats): if it's so, i've to implement these functions
inside my project?

It's not a problem doing this, but i don't understand the reason.

Thanks in advance.
Roberto aka "Cagnulein"



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xenomai-help] Float operations on ARM i.MX27
  2010-10-12 16:21 [Xenomai-help] Float operations on ARM i.MX27 Cagnulein
@ 2010-10-12 16:54 ` Gilles Chanteperdrix
  2010-10-12 17:09   ` Cagnulein
  0 siblings, 1 reply; 3+ messages in thread
From: Gilles Chanteperdrix @ 2010-10-12 16:54 UTC (permalink / raw)
  To: cagnulein; +Cc: xenomai

Cagnulein wrote:
> I'm continuing my experience on Xenomai and i've reached the floating
> point "point" :)
> I've succesfully compiled a project using some floats (division and
> printf) but when i try to use a "high level" function like "ceil" or
> "sqrt" the linker can't find them.

If you read sqrt or ceil manpage, you will see that you need to add -lm
on gcc command line. As you would do on your host system.

> 
> I know there isn't any hard floating point unit on this cpu, so it's all
> emulated (soft floats): if it's so, i've to implement these functions
> inside my project?

No. This is not to say that there are no issues on ARM, but this one is
a purely classical beginner mistake.

For the FPU issue, see:
http://www.arm.linux.org.uk/mailinglists/faq.php#f3


-- 
					    Gilles.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xenomai-help] Float operations on ARM i.MX27
  2010-10-12 16:54 ` Gilles Chanteperdrix
@ 2010-10-12 17:09   ` Cagnulein
  0 siblings, 0 replies; 3+ messages in thread
From: Cagnulein @ 2010-10-12 17:09 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

> Cagnulein wrote:
>> I'm continuing my experience on Xenomai and i've reached the floating
>> point "point" :)
>> I've succesfully compiled a project using some floats (division and
>> printf) but when i try to use a "high level" function like "ceil" or
>> "sqrt" the linker can't find them.
>
> If you read sqrt or ceil manpage, you will see that you need to add -lm
> on gcc command line. As you would do on your host system.
>
I was so focused on Xenomai and i didn't thought "simply".

>>
>> I know there isn't any hard floating point unit on this cpu, so it's all
>> emulated (soft floats): if it's so, i've to implement these functions
>> inside my project?
>
> No. This is not to say that there are no issues on ARM, but this one is
> a purely classical beginner mistake.
>
> For the FPU issue, see:
> http://www.arm.linux.org.uk/mailinglists/faq.php#f3
>
Thank you again, i was thinking about kernel/user space issues,
architecture not well implemented...and i didn't thought about this
mistake :(
>
> --
> 					    Gilles.
>




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-12 17:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-12 16:21 [Xenomai-help] Float operations on ARM i.MX27 Cagnulein
2010-10-12 16:54 ` Gilles Chanteperdrix
2010-10-12 17:09   ` Cagnulein

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.