3.6.1.6 Cpu Option
The -mcpu=device
option should be used
to specify the target device or at least a target architecture family.
For example:
xc8-cc
-mcpu=atmega161 main.c
To see a list of supported devices that can be used with this option,
use the -mprint-devices
option (see 3.6.2.4 Print-devices). The
available architecture families are tabulated below.
Architecture | Architecture Features |
---|---|
avr1 |
Simple core, no data RAM, assembly support only. |
avr2 |
Classic core, up to 8 KB program memory. |
avr25 |
avr2 with movw and
lpm Rx,Z[+] instructions. |
avr3 |
Classic core with up to 64 KB extended program memory. |
avr31 |
Classic core with 128 KB of program memory. |
avr35 |
avr3 with movw and
lpm Rx,Z[+] instructions. |
avr4 |
Enhanced core up to 8 KB program memory. |
avr5 |
Enhanced core up to 64 KB program memory. |
avr51 |
Enhanced core 128 KB program memory. |
avr6 |
Enhanced core 256 KB program memory. |
avrxmega2 |
XMEGA core, up to 64 KB program memory, up to 64 KB data address space. |
avrxmega3 |
XMEGA core with program memory mapped into data address space. |
avrxmega4 |
XMEGA core, up to 128 KB program memory, up to 64 KB data address space. |
avrxmega5 |
XMEGA core, up to 128 KB program memory, greater than 64 KB data address space. |
avrxmega6 |
XMEGA core, greater than 128 KB program memory, up to 64 KB data address space. |
avrxmega7 |
XMEGA core, greater than 128 KB program memory, greater than 64 KB data address space. |
avrtiny |
tinyAVR core, 16 registers. |