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...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Basic settings for project configurationOPTIMIZATION FOR SPEED AND SIZEThe <strong>MSP430</strong> <strong>IAR</strong> C/<strong>C++</strong> <strong>Compiler</strong> is a state-of-the-art compiler with an optimizer thatperforms, among other things, dead-code elimination, constant propagation, inlining,common subexpression elimination, and precision reduction. It also performs loopoptimizations, such as unrolling and induction variable elimination.You can decide between several optimization levels and for the highest level you canchoose between different optimization goals—size, speed, or balanced. Mostoptimizations will make the application both smaller and faster. However, when this isnot the case, the compiler uses the selected optimization goal to decide how to performthe optimization.The optimization level and goal can be specified for the entire application, for individualfiles, and for individual functions. In addition, some individual optimizations, such asfunction inlining, can be disabled.For details about compiler optimizations and for more information about efficientcoding techniques, see the chapter Efficient coding for embedded applications.RUNTIME ENVIRONMENTTo create the required runtime environment you should choose a runtime library and setlibrary options. You may also need to override certain library modules with your owncustomized versions.There are two different sets of runtime libraries provided:● The <strong>IAR</strong> DLIB Library, which supports ISO/ANSI C and <strong>C++</strong>. This library alsosupports floating-point numbers in IEEE 754 format and it can be configured toinclude different levels of support for locale, file descriptors, multibyte characters,et cetera.● The <strong>IAR</strong> CLIB Library is a light-weight library, which is not fully compliant withISO/ANSI C. Neither does it fully support floating-point numbers in IEEE 754format or does it support Embedded <strong>C++</strong>. Note that the legacy <strong>IAR</strong> CLIB Library isprovided for backward compatibility and should not be used for new applicationprojects.The runtime library you choose can be one of the prebuilt libraries, or a library that youhave customized and built yourself. The <strong>IAR</strong> Embedded Workbench IDE provides alibrary project template for both libraries, that you can use for building your own libraryversion. This gives you full control of the runtime environment. If your project onlycontains assembler source code, there is no need to choose a runtime library.For detailed information about the runtime environments, see the chapters The DLIBruntime environment and The CLIB runtime environment, respectively.8<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!