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 extended keywords__no_initSyntax Follows the generic syntax rules for object attributes, see Object attributes, page 191.DescriptionExampleUse the __no_init keyword to place a data object in non-volatile memory. This meansthat the initialization of the variable, for example at system startup, is suppressed.__no_init int myarray[10];__noreturnSyntax Follows the generic syntax rules for object attributes, see Object attributes, page 191.DescriptionExampleThe __noreturn keyword can be used on a function to inform the compiler that thefunction will not return. If you use this keyword on such functions, the compiler canoptimize more efficiently. Examples of functions that do not return are abort and exit.__noreturn void terminate(void);__rawSyntax Follows the generic syntax rules for object attributes, see Object attributes, page 191.DescriptionExampleThis keyword prevents saving used registers in interrupt functions.Interrupt functions preserve the contents of all used processor registers at functionentrance and restore them at exit. However, for some very special applications, it can bedesirable to prevent the registers from being saved at function entrance. This can beaccomplished by the use of the keyword __raw.__raw __interrupt void my_interrupt_function()__regvarSyntax Follows the generic syntax rules for type attributes, see Type attributes, page 189.DescriptionThis keyword is used for declaring that a global or static variable should be placedpermanently in the specified register. The registers R4–R5 can be used for this purpose,provided that they have been reserved with one of the --regvar_r4 or --regvar_r5compiler options.196<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!