This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to run compile code for NEON

Note: This was originally posted on 18th December 2009 at http://forums.arm.com

Hello everyone,
I'm  trying RVDS4.0 evaluation copy and i'm not able to get any option in RVDS that can compile my code in NEON instruction set.As a starting point,I've written simple addition C file with following option.:
--cpu=Cortex-A8 --fpu=VFPv2 -O3 -Otime --vectorize

The error i'm getting is:
armlink: Object main.o attributes are not compatible with provided cpu and fpu  attributes.

I searched on internet and i found most people are using this option:
-mpfu=neon -ftree-vectorize -mfloat-abi=softfp
"i don't know how to set my fpu to neon"

Please reply ASAP
Regards
S
  • Note: This was originally posted on 24th December 2009 at http://forums.arm.com

    Hello Marcus,
    First,thanks for the early reply.
    It seems to me ,i need to have some support code in order to use VFPv3 in my code.(I'm basically trying a code for NEON on CORTEX A8).
    I even found a application note for this(http://infocenter.arm.com/help/topic/com.arm.doc.dai0133c/DAI0133C_Using_VFP_with_RVDS.pdf).

    Thanks for the info.
    Regards
    Suvir
  • Note: This was originally posted on 18th December 2009 at http://forums.arm.com

    --cpu=Cortex-A8 --fpu=VFPv2 -O3 -Otime --vectorize

    The error i'm getting is:
    armlink: Object main.o attributes are not compatible with provided cpu and fpu  attributes.

    I don't know whether the evaluation license covers auto-vectorization. The error (as the message says) is caused by the fact that Cortex-A8 uses VFPv3. However, the proper vfp type is implicit when asking for Cortex-A8 anyway. No need to specifically state this unless you want to change the linkage type.

    If you expect to vectorize actual floating point operations, you have to add --fpmode=fast to your CFLAGS.

    I searched on internet and i found most people are using this option:
    -mpfu=neon -ftree-vectorize -mfloat-abi=softfp
    "i don't know how to set my fpu to neon"

    This is for GCC or armcc in compatibility mode.

    Regards
    Marcus