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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ICCV8 <strong>for</strong> AVR – C Compiler <strong>for</strong> Atmel AVRPredefined MacrosThe product includes support <strong>for</strong> <strong>the</strong> following St<strong>and</strong>ard C predefined macros.“Current” refers to at <strong>the</strong> time of compilation: __DATE__ exp<strong>and</strong>s into a string literal of <strong>the</strong> current date.__FILE__ exp<strong>and</strong>s into a string literal of <strong>the</strong> current filename without <strong>the</strong> pathprefix. __LINE__ exp<strong>and</strong>s into an integer of <strong>the</strong> current line number (line numbers startwith 1) __STDC__ exp<strong>and</strong>s into <strong>the</strong> constant 1. __TIME__ exp<strong>and</strong> into a string literal of <strong>the</strong> current time in <strong>the</strong> <strong>for</strong>m “hh:mm:ss”.The following ImageCraft specific macros are defined: __IMAGECRAFT__ exp<strong>and</strong>s into <strong>the</strong> constant 1. This is defined by <strong>the</strong> driver. __ICC_VERSION exp<strong>and</strong>s into an integer constant of <strong>the</strong> <strong>for</strong>m 8xxyy, wherexxyy is <strong>the</strong> 4-digit minor version number, e.g. 80300. This is defined by <strong>the</strong> IDE.You can use this to control version-specific code:#if __ICC_VERSION > 80300... __BUILD exp<strong>and</strong>s into an integer constant representing <strong>the</strong> build number. This isdefined by <strong>the</strong> IDE. The build number starts with one <strong>and</strong> increments each time abuild is per<strong>for</strong>med. The build number is also written to <strong>the</strong> .mp map file.The IDE predefines <strong>the</strong> identifier used in <strong>the</strong> Device list in <strong>the</strong> Build Options - Targetdialog box. For example, ATMega128 is predefined when you select that device asyour target. This allows you to write conditional code based on <strong>the</strong> device.Finally, a product-specific macro is defined by <strong>the</strong> driver:ProductICCV8 <strong>for</strong> AVRICCV8 <strong>for</strong> CortexICCV7 <strong>for</strong> 430ICC08Predefined Macro_AVR_Cortex_MSP430_HC0866

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

Saved successfully!

Ooh no, something went wrong!