Skip to content

Size and speed optimisations

Compare
Choose a tag to compare
@andysworkshop andysworkshop released this 12 Nov 12:41
· 52 commits to master since this release

This release collects together a number of optimisations for speed and size. You can read about them in more detail in issue #189. To summarise, they are:

  1. Wrap the libc atexit function with a do-nothing replacement. This is one of those methods that's only required if you have a real OS managing your process.
  2. Add a scons option for link-time optimisation (lto=yes). Link-time optimisation can save a lot of space due to the ability to optimise across compilation units. This even benefits those of us that practice 'header-only' development due to its ability to optimise the inefficient layout of the ST standard peripheral library.
  3. Import the small, efficient implementation of the udiv instruction from the chromium project. The F0 does not have a udiv instruction so it has to be done in software and the gcc implementation isn't small or efficient. Other MCU families are not affected.