Float operations on ARM i.MX27
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"
Quoted 5 lines · Cagnulein
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.
Quoted 4 lines
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
Signature · 1 line
Gilles.
Quoted 10 lines
Quoted 5 lines · Cagnulein
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".
Quoted 11 lines
Quoted 4 lines
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 :(
Quoted 4 lines
--
Gilles.