ARM Technical Support Knowledge Articles

Use of --fpu softvfp with processors with implicit VFP

Applies to: ARM Developer Suite (ADS), DS-5, RealView Development Suite (RVDS)

Answer

Some ARM processors have vector floating point (VFP) coprocessor hardware contained within them.

Usually a developer would wish to make use of this feature, but for early development you may prefer not to include it, because VFP requires specific "support code" to be added to your image - see FAQ: 'How do I build and run code for VFP?'

It is possible to disable VFP code generation for source files by compiling (or assembling) code with the options:

--cpu ARM1136JF-S --fpu softvfp

The resultant object (.o) file will not contain any VFP code, however, the Build Attributes of the object may be set to support VFP depending on toolchain and versions, which may affect the final link stage.

For RVCT2.2 and earlier (including ADS)

The compiled/assembled object (.o) file will not contain any VFP code, however the Build Attributes of the object will be set to support VFP. As a result, when linking, armlink may use VFP-enabled functions from the C-library, and so VFP code may still be contained within the image (.axf) executable.

To guarantee that no VFP code is contained in your final image, you should compile for the equivalent CPU that does not have an implicit VFP, for example:

--cpu ARM1136J-S

For RVCT 3.0 and later

The Build Attributes will now also be overruled by the --fpu switch. For example building with

--cpu ARM1136JF-S --fpu softvfp

not only prevents the compiler from using VFP instructions in the user object but also stops the attributes of the object indicating VFP is supported and thus the linker will not use those C library functions that contain VFP code. This ensures no VFP instructions are included in the final executable image (.axf).

Article last edited on: 2012-03-22 15:19:58

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential