11.07.2015 Views

MSP430 IAR C/C++ Compiler reference guide - Rice University

MSP430 IAR C/C++ Compiler reference guide - Rice University

MSP430 IAR C/C++ Compiler reference guide - Rice University

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Functions .......................................................................................... 106New and Delete operators ................................................................ 106Templates ........................................................................................ 107Variants of casts ............................................................................... 110Mutable ............................................................................................ 111Namespace ...................................................................................... 111The STD namespace ........................................................................ 111Using interrupts and E<strong>C++</strong> destructors ............................................ 111<strong>C++</strong> language extensions ................................................................... 111Efficient coding for embedded applications ...................................... 113Selecting data types ............................................................................. 113Using efficient data types ................................................................. 113Floating-point types ......................................................................... 114Rearranging elements in a structure ................................................. 114Anonymous structs and unions ........................................................ 115Controlling data and function placement in memory .......... 116Data placement at an absolute location ............................................ 117Data and function placement in segments ........................................ 119Controlling compiler optimizations ............................................. 120Scope for performed optimizations .................................................. 120Optimization levels .......................................................................... 121Speed versus size ............................................................................. 121Fine-tuning enabled transformations ............................................... 122Writing efficient code ......................................................................... 124Saving stack space and RAM memory ............................................ 125Function prototypes .......................................................................... 125Integer types and bit negation .......................................................... 126Protecting simultaneously accessed variables .................................. 126Accessing special function registers ................................................ 127Non-initialized variables .................................................................. 128Efficient switch statements .............................................................. 129x<strong>MSP430</strong> <strong>IAR</strong> C/<strong>C++</strong> <strong>Compiler</strong>Reference Guide

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!