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
STM32F7 Floating Point
Moderator: RoccoMarco
Re: STM32F7 Floating Point
It should be v5 for the Cortex-M7 series.
For details see the reference manual: http://infocenter.arm.com/help/topic/co ... efdgf.html
For details see the reference manual: http://infocenter.arm.com/help/topic/co ... efdgf.html
- Giovanni
- Site Admin
- Posts: 14893
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: STM32F7 Floating Point
This requires changes in rules.mk and Makefiles... I'll try to include this in next release.
Giovanni
Giovanni
Re: STM32F7 Floating Point
Additionally the fpv4-sp-d16 is also listed in the asm files crt0_v7m.s, nilcoreasm_v7m.s and chcoreasm_v7m.s. I assume it must be changed to fpv5-sp-d16 there too?
And when looking to these files it feels strange that in crt0_v7m.s there is .cpu cortex-m3, and in the other two .cpu cortex-m4, independent on the cpu used. Can you elaborate on what is the reasoning behind this?
I'm getting here because my FPU on a STM32F745 is behaving strange, after half a second of running a some synthesizer code NaN's start appearing in the output, while exactly the same code works fine on a STM32F4 or on the pc. I don't know if I'm searching in the right direction though, anybody any idea what could influence the FPU? Might there be cache invalidation issues like with many other F7 peripherals?
Thanks, Piers
And when looking to these files it feels strange that in crt0_v7m.s there is .cpu cortex-m3, and in the other two .cpu cortex-m4, independent on the cpu used. Can you elaborate on what is the reasoning behind this?
I'm getting here because my FPU on a STM32F745 is behaving strange, after half a second of running a some synthesizer code NaN's start appearing in the output, while exactly the same code works fine on a STM32F4 or on the pc. I don't know if I'm searching in the right direction though, anybody any idea what could influence the FPU? Might there be cache invalidation issues like with many other F7 peripherals?
Thanks, Piers
- Giovanni
- Site Admin
- Posts: 14893
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: STM32F7 Floating Point
Hi,
All of those are not really important because the code is written in asm, the kind of FPU does not matter, those m3-m4 should be normalized however.
Giovanni
All of those are not really important because the code is written in asm, the kind of FPU does not matter, those m3-m4 should be normalized however.
Giovanni