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.

Checking module consistencyObject file Color Tastefile2 red not definedfile3 red *file4 red spicyfile5 red leanTable 20: Example of runtime model attributes (Continued)USING RUNTIME MODEL ATTRIBUTESRuntime model attributes can be specified in your C/<strong>C++</strong> source code to ensure moduleconsistency with other object files by using the #pragma rtmodel directive. Forexample:#pragma rtmodel="__rt_version", "1"For detailed syntax information, see rtmodel, page 212.Runtime model attributes can also be specified in your assembler source code by usingthe RTMODEL assembler directive. For example:RTMODEL "color", "red"For detailed syntax information, see the <strong>MSP430</strong> <strong>IAR</strong> Assembler Reference Guide.Note: The predefined runtime attributes all start with two underscores. Any attributenames you specify yourself should not contain two initial underscores in the name, toeliminate any risk that they will conflict with future <strong>IAR</strong> runtime attribute names.At link time, the <strong>IAR</strong> XLINK Linker checks module consistency by ensuring thatmodules with conflicting runtime attributes will not be used together. If conflicts aredetected, an error is issued.PREDEFINED RUNTIME ATTRIBUTESThe table below shows the predefined runtime model attributes that are available for the<strong>MSP430</strong> <strong>IAR</strong> C/<strong>C++</strong> <strong>Compiler</strong>. These can be included in assembler code or in mixedC/<strong>C++</strong> and assembler code.Runtime model attribute Value Description__core 430 or 430X Corresponds to the --core option.__data_model small,medium,or largeCorresponds to the data model used in theproject; only available for <strong>MSP430</strong>X.__double_size 32 or 64 The size, in bits, of the doublefloating-point type.Table 21: Predefined runtime model attributes72<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!