Syntax
#pragma AVRPART ADMIN PART_NAME
string
#pragma AVRPART CORE
CORE_VERSION version-string
#pragma AVRPART CORE
INSTRUCTIONS_NOT_SUPPORTED mnemonic[ operand[,operand] ][:...]
#pragma AVRPART CORE
NEW_INSTRUCTIONS mnemonic[ operand[,operand]][:...]
#pragma AVRPART MEMORY
PROG_FLASH size
#pragma AVRPART MEMORY EEPROM
size
#pragma AVRPART MEMORY INT_SRAM
SIZE size
#pragma AVRPART MEMORY INT_SRAM
START_ADDR address
#pragma partinclude
num
Description
These directives are used to specify various part-specific properties, and are normally used in the part definition include files (partdef.inc). Normally, there is no reason to use these pragmas directly in user programs.
Preprocessor macros are not allowed in pragmas. Expressions are not allowed for the numeric arguments, must be pure numbers in decimal, hex, octal, or binary format. String arguments must not be quoted. The pragmas specify the following part-specific properties:
DEVICE
directive to include a
file called device.h that is expected to contain the #pragma
s described
above. This enables partdef.inc files designed for AVRASM1 (containing a
DEVICE
directive but no part-describing #pragma
s)
to be used with AVRASM2. This property can also be set using the AVR Assembler Command Line Options command line option. Examples
Note that the combination of these examples does not describe a real AVR part!
#pragma AVRPART ADMIN PART_NAME
ATmega32
#pragma AVRPART CORE
CORE_VERSION V2
#pragma AVRPART CORE
INSTRUCTIONS_NOT_SUPPORTED movw:break:lpm rd,z
#pragma AVRPART CORE
NEW_INSTRUCTIONS lpm rd,z+
#pragma AVRPART MEMORY
PROG_FLASH 131072
#pragma AVRPART MEMORY EEPROM
4096
#pragma AVRPART MEMORY INT_SRAM
SIZE 4096
#pragma AVRPART MEMORY INT_SRAM
START_ADDR 0x60