Using MCU = cortex-m7 with GCC 4.9 causes an _unhandled_exception, at least when using the USB driver. (for example in STM32F7xx/USB_CDC project). With GCC 5.3 it seems to be stable. According to the changelogs support for Cortex-M7 was added in 4.9, while Cortex-M7 performance tuning was added in 5.0, so it probably makes sense.
I didn't do performance tests yet, but theoretically it makes sense to have the compiler optimize for cortex-m7 with all the differences in execution.
Does anyone have experience with the Cortex-M7 performance tuning of GCC? (-mcpu=cortex-m7 option which is set by MCU variable)
I guess the default in the ChibiOS STM32F7 projects is kept at MCU = cortex-m4 for compatibility reasons?
Using MCU = cortex-m7
Moderator: RoccoMarco
- Giovanni
- Site Admin
- Posts: 14893
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: Using MCU = cortex-m7
Hi,
We are still defaulting to GCC 4.9 and using M4 as target even for M7. I haven't benchmarked the two modes yet, something to do before switching to GCC 5.3.
Giovanni
We are still defaulting to GCC 4.9 and using M4 as target even for M7. I haven't benchmarked the two modes yet, something to do before switching to GCC 5.3.
Giovanni
Re: Using MCU = cortex-m7
I did a quick measurement of the speed increase from using MCU = cortex-m4 to cortex-m7 on an almost pure float synthesizer thread, and got a performance increase of 7.1% at low duty cycle (18.86 -> 17.60) and a 3.6% increase at higher duty cycle (62.09 -> 59.92). I used GCC 5.3 with -O3.
P.S. USE_FPU = hard or softfp didn't have any influence on speed.
P.S. USE_FPU = hard or softfp didn't have any influence on speed.