[arm-gnu] Regarding Double Data Type Support on Cortex M4
Carlos O'Donell
carlos_odonell at mentor.com
Fri Jun 1 19:11:24 UTC 2012
On 6/1/2012 10:27 AM, Vikas R wrote:
> I have used following command to compile my main.c file. The option -mfloat-abi=softfp helps me to support float datatype on MK60FN1M0VLQ12 (COTREX-M4) when I kept FPU enabled.
> arm-none-eabi-gcc -Wall -mfloat-abi=softfp -mcpu=cortex-m4 -mthumb -Qn -Os -mlong-calls -c main.c -o main.o
>
> If you know any GCC compiler commands to solve the above problem, please let me know.
Sourcery CodeBench Lite for ARM EABI does support compiling application code for the Cortex-M4F.
The FPU on the Cortex-M4F is not a full VFP so you need to pass:
`-mfpu=fpv4-sp-d16 -mfloat-abi=softfp`
Without specifying -mfpu you likely generate floating point instructions that are unsupported by the M4F's single-precision floating point unit.
Does that help?
Cheers,
Carlos.
--
Carlos O'Donell
Mentor Graphics / CodeSourcery
carlos_odonell at mentor.com
carlos at codesourcery.com
+1 (613) 963 1026
More information about the arm-gnu
mailing list