The absence of padding printf formats on the TI MSP430 development board explained

The issue

When developing a project within Code Composer Studio 6.1 for the MSP430F2274, one will notice the absence of padding format "%02d". It may be slightly annoying when the application is driven towards formatted user input and output.

The cause

This occurs because of the default CCS 6.1 compiler settings which include a really stripped version of the printf library.

The solution

In order to have access to the full printf library, one has to set the compiler settings

Project > Properties > MSP430 Compiler > Set additional flags

--printf_support=full

The drawback

This is more a storage space issue more than anything. Embedding the full library will reduce the FLASH/FRAM space available for your application.

The conclusion

Depending on the usage of the printf library one would like to make, it is advisable, simply for space considerations, to have a custom padding function.

Startup Growth Lite is a free theme, contributed to the Drupal Community by More than Themes.