Which gcc toolchain version to use for cortex-m4

Asked by Dev

Right now we are using 4.7-2014-q2-update, what would be advantage of using 4.8 series.
Our main focus to reduce size of generated binary in debug build without interfering the debugability

Question information

Language:
English Edit question
Status:
Solved
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Solved by:
Thomas Preud'homme
Solved:
Last query:
Last reply:
Revision history for this message
Best Thomas Preud'homme (thomas-preudhomme) said :
#1

Hi Dev,

The main changes come from using an newer major version of GCC and these are documented at [1]. In addition, it would contain some specific changes we did to this toolchain and that are not part of the FSF release of GCC, such as the optimization for Finite State Machine algorithms. These ARM toolchain specific changes, among other changes made by ARM employee, are listed in the release notes [2] for the toolchain.

[1] https://gcc.gnu.org/gcc-4.8/changes.html
[2] https://launchpadlibrarian.net/160488692/release.txt

However, if you are considering to update your toolchain I would suggest you to consider the latest 5 release (2015Q4) or, if you are looking for a more proven release, the latest 4.9 release (2015Q3).

Best regards.

Revision history for this message
john (jkovach) said :
#2

GCC 4.8: "A new general optimization level, -Og, has been introduced. It addresses the need for fast compilation and a superior debugging experience while providing a reasonable level of run-time performance. Overall experience for development should be better than the default optimization level -O0."
In my experience, binary size with -Og is only a few percent larger than with -Os. And it's dramatically smaller than with -O0. You should try it.

Revision history for this message
Dev (dev-khan) said :
#3

Thanks Thomas Preud'homme, that solved my question.