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 consistencyIf this module is used in an application that contains modules where the register R4 hasnot been locked, an error is issued by the linker:Error[e117]: Incompatible runtime models. Module myCounterspecifies that '__reg_r4' must be 'counter', but module part1has the value 'free'USER-DEFINED RUNTIME MODEL ATTRIBUTESIn cases where the predefined runtime model attributes are not sufficient, you can defineyour own attributes by using the RTMODEL assembler directive. For each property, selecta key and a set of values that describe the states of the property that are incompatible.Note that key names that start with two underscores are reserved by the compiler.For example, if you have a UART that can run in two modes, you can specify a runtimemodel attribute, for example uart. For each mode, specify a value, for example mode1and mode2. You should declare this in each module that assumes that the UART is in aparticular mode. This is how it could look like in one of the modules:#pragma rtmodel="uart", "mode1"74<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!