Skip to main content
Armandas
Associate II
August 31, 2020
Solved

Bad compile-time and run-time performance when using STM32CubeIDE compiler

  • August 31, 2020
  • 18 replies
  • 8813 views

I am preparing for migration from SWSTM32 V2.4 (GCC 6.3.1) to STM32CubeIDE V1.4 (GCC 7.3.1).

During testing, I have noticed very significant performance issues in both compile time and generated executable run time. Please see the attached table for my test results.

All tests were done using CMake and changing the compiler path, so there is no effect of different IDEs.

NOTE: I was not able to test the generic ARM toolchain bundled with STM32CubeIDE, due to it not being able to find a header <bits/c++config.h>. I, therefore, downloaded GCC 7.3.1 form ARM for this comparison.

Run times are in seconds.

0693W000002lj0cQAA.png

This topic has been closed for replies.
Best answer by Armandas

I think I got down to the bottom of this.

I was able to get the build time down to ~42 seconds, by making all the include paths absolute and removing almost all -I include path parameters from GCC build commands. I guess the long path support overhead is increasing with each include parameter.

By the way, the ARM GCC build time went down to about 20 seconds.

18 replies

Cartu38 OpenDev
Graduate II
September 4, 2020

Please be aware 2 toolchains are STM32CubeIDE supported. Both are GCC ones. One is GNU ARM embedded, second is ST improved one especially thinking long path support. As such long path support may have some performance drawbacks if long path not required to you always possible to rely on native proposal ...

See project properties then C/C++ Build > Settings ​> Toolchain Version