[arm-gnu] Regarding Double Data Type Support on Cortex M4

Carlos O'Donell carlos_odonell at mentor.com
Mon Jun 4 15:23:25 UTC 2012


On 6/4/2012 2:22 AM, Vikas R wrote:
> Hello Carlos,
>             Thanks for your prompt reply.
> 
>             I made changes suggested by you (i.e. I added `-mfpu=fpv4-sp-d16
> -mfloat-abi=softfp)option in command, but it is still not working. Processor
> goes in to hard fault for the "double" data types. 
>
>             I have also tried following command for emulated "float" data
> type keeping FPU disabled but still not working. 
> 
> 		arm-none-eabi-gcc -Wall -mfpu=fpv4-sp-d16 -mfloat-abi=soft
> -mcpu=cortex-m4 -mthumb -Qn -Os  -mlong-calls -c main.c -o main.o
> 
>            we are using Code Sourcery G++ Light Version 4.5.2.
> 
>           Is it possible to support "float" and "double" data types without
> enabling FPU?

[including the public list this time around]

Yes, that's what -mfloat-abi=soft does.

If `-mfloat-abi=soft' doesn't work then something else is wrong with your application.

Try using `arm-none-eabi-objdump -ldr <binary>' and review the instructions being used in your final application.

When you debug this *exactly* which instruction causes the fault?

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