To improve development efficiency, many microcontroller-based products are programmed in C rather than Assembly language. When programs are written in C and compiled by a C compiler, the code efficiency is generally lower compared to an Assembly language program. The programmer can lend a helping hand to the C compiler by adopting certain programming styles.


This paper provides an overview of common optimizing techniques used by C compilers and recommends C programming guidelines that will result in optimized code for microcontroller applications.