STM32F7 Floating Point
Posted: Thu Jan 28, 2016 7:11 am
Hi Giovanni,
I'm working with ChibiOS 3.1.0 on STM32F745, using gcc-arm-none-eabi-4_9-2015q3.
I just had some issues with calls to sinf(), cosf() and sincosf() where I would get an unhandled exception when they were called.
I narrowed it down to the compiler setting in rules.mk, where according to the gcc-arm readme we should be using fpv5 rather than fpv4.
I changed rules.mk to:
OPT += -mfloat-abi=$(USE_FPU) -mfpu=fpv5-sp-d16 -fsingle-precision-constant
(from OPT += -mfloat-abi=$(USE_FPU) -mfpu=fpv4-sp-d16 -fsingle-precision-constant)
and things seem to be OK now, with calls to sinf etc working fine!
Does this need a change on your end? Or is this something I should be putting in the Makefile?
Thanks!
Laurence M
I'm working with ChibiOS 3.1.0 on STM32F745, using gcc-arm-none-eabi-4_9-2015q3.
I just had some issues with calls to sinf(), cosf() and sincosf() where I would get an unhandled exception when they were called.
I narrowed it down to the compiler setting in rules.mk, where according to the gcc-arm readme we should be using fpv5 rather than fpv4.
I changed rules.mk to:
OPT += -mfloat-abi=$(USE_FPU) -mfpu=fpv5-sp-d16 -fsingle-precision-constant
(from OPT += -mfloat-abi=$(USE_FPU) -mfpu=fpv4-sp-d16 -fsingle-precision-constant)
and things seem to be OK now, with calls to sinf etc working fine!
Does this need a change on your end? Or is this something I should be putting in the Makefile?
Thanks!
Laurence M