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.

Pragma directivessegmentSyntax#pragma segment="NAME" [__memoryattribute] [align]Parameters"NAME"__memoryattributealignThe name of the segmentAn optional memory attribute identifying the memory the segmentwill be placed in; if not specified, default memory is used.Specifies an alignment for the segment part. The value must be aconstant integer expression to the power of two.DescriptionUse this pragma directive to define a segment name that can be used by the segmentoperators __segment_begin and __segment_end. All segment declarations for aspecific segment must have the same memory type attribute and alignment.If an optional memory attribute is used, the return type of the segment operators__segment_begin and __segment_end is:void __memoryattribute *.Example #pragma segment="MYSEGMENT" __data16 4See alsoImportant language extensions, page 180. For more information about segments andsegment parts, see the chapter Placing code and data.type_attributeSyntaxParametersDescription#pragma type_attribute=type_attribute[,type_attribute,...]For a list of type attributes that can be used with this pragma directive, see Typeattributes, page 189.Use this pragma directive to specify <strong>IAR</strong>-specific type attributes, which are not part ofthe ISO/ANSI C language standard. Note however, that a given type attribute may notbe applicable to all kind of objects.This directive affects the declaration of the identifier, the next variable, or the nextfunction that follows immediately after the pragma directive.Part 2. <strong>Compiler</strong> <strong>reference</strong>213

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

Saved successfully!

Ooh no, something went wrong!