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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Descriptions of pragma directivesconstsegSyntax#pragma constseg=[__memoryattribute ]{SEGMENT_NAME|default}Parameters__memoryattributeSEGMENT_NAMEdefaultAn optional memory attribute denoting in what memory thesegment will be placed; if not specified, default memory is used.A user-defined segment name; cannot be a segment namepredefined for use by the compiler and linker.Uses the default segment for constants.DescriptionExampleUse this pragma directive to place constant variables in a named segment. The segmentname cannot be a segment name predefined for use by the compiler and linker. Thesetting remains active until you turn it off again with the #pragma constseg=defaultdirective.#pragma constseg=__data20 MY_CONSTANTSconst int factorySettings[] = {42, 15, -128, 0};#pragma constseg=defaultdata_alignmentSyntax#pragma data_alignment=expressionParametersexpressionA constant which must be a power of two (1, 2, 4, etc.).DescriptionUse this pragma directive to give a variable a higher (more strict) alignment than itwould otherwise have. It can be used on variables with static and automatic storageduration.When you use this directive on variables with automatic storage duration, there is anupper limit on the allowed alignment for each function, determined by the callingconvention used.202<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!