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.

Data segmentsexample DATA16 and __data16. The following table summarizes the memory typesand the corresponding segment groups:Memory type Segment group Memory rangeData16 DATA16 0x0000-0xFFFFData20 DATA20 0x00000-0xFFFFFTable 7: Memory types with corresponding segment groupsSome of the declared data is placed in non-volatile memory, for example ROM, andsome of the data is placed in RAM. For this reason, it is also important to know theXLINK segment memory type of each segment. For more details about segmentmemory types, see Segment memory type, page 32.The following table summarizes the different suffixes, which XLINK segment memorytype they are, and which category of declared data they denote:Categories of declared data Segment memory type SuffixNon-initialized data DATA NZero-initialized data DATA ZNon-zero initialized data DATA IInitializers for the above CONST IDConstants CONST CNon-initialized absolute addressed dataANConstant absolute addressed dataACTable 8: Segment name suffixesFor a summary of all supported segments, see Summary of segments, page 241.ExamplesAssume the following examples:__data16 int j;__data16 int i = 0;The data16 variables that are to be initialized to zerowhen the system starts will be placed in the segmentDATA16_Z.__no_init __data16 int j;The data16 non-initialized variables will be placed inthe segment DATA16_N.__data16 int j = 4;The data16 non-zero initialized variables will beplaced in the segment DATA16_I in RAM, andinitializer data in segment DATA16_ID in ROM.36<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!