Page 1 of 1

Using MCU = cortex-m7

Posted: Wed Jun 22, 2016 11:20 am
by piers
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?

Re: Using MCU = cortex-m7

Posted: Wed Jun 22, 2016 12:02 pm
by Giovanni
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

Re: Using MCU = cortex-m7

Posted: Thu Jun 30, 2016 5:17 pm
by piers
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.