11.07.2015 Views

Imagecraft c compiler and development environment for the atmel avr

Imagecraft c compiler and development environment for the atmel avr

Imagecraft c compiler and development environment for the atmel avr

SHOW MORE
SHOW LESS

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

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

ICCV8 <strong>for</strong> AVR – C Compiler <strong>for</strong> Atmel AVRDefines a register variable. is a target-specific register name. Currentlyonly applicable <strong>for</strong> <strong>the</strong> AVR <strong>and</strong> <strong>the</strong> Cortex-M <strong>compiler</strong>s.DEFREG register name is a decimal integer corresponding to <strong>the</strong> register number.The variable may occupy more than one register depending on <strong>the</strong> data type.Consecutive registers are used in that case. For example:DEFREG n 4 ideclares “n” as a register integer variable, occupying R4 <strong>and</strong> R5.STACK Used only by <strong>the</strong> HC11 <strong>compiler</strong>. See below.DEFSTATIC Defines a function-scoped static symbol.DEFGLOBAL Defines a global symbol.Structure Declaration STRUCT/UNION Starts a structure or union declaration. is <strong>the</strong> total size of <strong>the</strong> structure inbytes. is <strong>the</strong> structure tag name. If this structure has no tag in <strong>the</strong> sourcefile, a unique name of <strong>the</strong> <strong>for</strong>m . (dot followed by a number) will beused. The . is unique within a file scope as delimited by <strong>the</strong> FILEcomm<strong>and</strong>, <strong>and</strong> may be reused in o<strong>the</strong>r FILE units.If <strong>the</strong> is 0, this signifies a structure that is not defined in this FILE unit.For example, <strong>the</strong> following C fragment:struct bar { struct foo *p; struct bar *x; } bar;outputs a STRUCT comm<strong>and</strong> with equal to 0 <strong>for</strong> <strong>the</strong> structure tag foo if<strong>the</strong> structure is not defined prior to <strong>the</strong> declaration. A STRUCTEND/UNIONENDcomm<strong>and</strong> must close off a STRUCT/UNION comm<strong>and</strong>. Nested declaration is notused.The STRUCT/UNION comm<strong>and</strong>s appear ei<strong>the</strong>r at <strong>the</strong> file or function / block scope,depending on <strong>the</strong> scope in <strong>the</strong> original C source. All data type references tostructures use <strong>the</strong> structure tag name . FIELD 195

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

Saved successfully!

Ooh no, something went wrong!