ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

-msoft-float for beagleboard

asked 2011-10-30 21:18:45 -0600

noonv gravatar image

updated 2014-01-28 17:10:40 -0600

ngrennan gravatar image

Is it really need to use g++ flag

-msoft-float

for compile OpenCV on beagleboard (beagleboard xm)?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2011-10-30 23:05:06 -0600

updated 2011-10-30 23:22:46 -0600

EDIT I have checked again and it turns out that the BeagleBoard-xM has a Super-scalar ARM Cortex TM -A8 with floating point capabilities. So the -msoft-float flag should be unnecessary.


Old answer, Incorrect for BeagleBoard-xM, right for other ARM processors.

This flag tells gcc to use a (very slow) software implementation of floating point arithmetic. As the ARM processors don't have a floating point processor this flag becomes necessary. As far as I know the BeagleBoard-xM does not have a floating point co-processor.

Theoretically you can compile bits of OpenCV to use only integer arithmetic, but I don't know how many routines will be available.

So the short answer is "yes, unless you can strip away all the floating point arithmentic from OpenCV".

edit flag offensive delete link more

Comments

Thanks a lot!
noonv gravatar image noonv  ( 2011-10-30 23:11:59 -0600 )edit
So BeagleBoard-xM has floating poit co-processor, but BeagleBoard doesnt?
noonv gravatar image noonv  ( 2011-10-30 23:16:49 -0600 )edit
They have the same processor (ARM Cortex-A8 superscalar) with different clock speeds, so they are both capable of floating point arithmetic.
Lorenzo Riano gravatar image Lorenzo Riano  ( 2011-10-30 23:21:28 -0600 )edit
i see. Thanks!
noonv gravatar image noonv  ( 2011-10-30 23:26:51 -0600 )edit
No problem! If you are satisfied with the answer please mark the question as solved, so other people will see it as well.
Lorenzo Riano gravatar image Lorenzo Riano  ( 2011-10-30 23:27:59 -0600 )edit
1

answered 2011-10-31 03:51:19 -0600

Ash Charles gravatar image

Two clarifications:

  1. https://wiki.linaro.org/Linaro-arm-hardfloat shows 'soft', 'softfp' and 'hardfp' arguments. 'Soft' is the really slow options using entirely software-emulater floating point. Softfp makes use of the floating point unit (VFP) but passes floating point values through the core. Hardfp directly uses the VFP but, unless you've specifically compiled your whole file system and kernel to support this ABI (yes, it is a different ABI because the parameter passing interface is different), you can use it; hardfp is typically about 30% faster than softfp.
  2. Modern ARM processors offer two different floating point units: VFP (vector floating point but, desite the 'vector' is not SIMD but a regular FP co-proc) and NEON (SIMD). Different ARM core versions support different versions of these two co-procs. and not all ARM processors choose to actually include them. The Cortex-A8 OMAP3530 from TI found on Beagleboard, Gumstix and others includes VFPv3 and NEON.

Long-story short, -mfloat-abi=softfp is a reasonable flag to include but is possibly the compiler default.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-10-30 21:18:45 -0600

Seen: 901 times

Last updated: Oct 31 '11