platform = atmelavr
Atmel AVR 8- and 32-bit MCUs deliver a unique combination of performance, power efficiency and design flexibility. Optimized to speed time to market-and easily adapt to new ones-they are based on the industrys most code-efficient architecture for C and assembly programming.
For more detailed information please visit vendor site.
To upload firmware using programmer you need to use program
target instead
of upload
for platformio run --target
command. For example,
platformio run -t program
.
Warning
Upload options like upload_port
don’t work as expected with platformio run -t program
. You need to use upload_flags
if you want to specify custom port or speed (see examples below).
Note
List of avrdude supported programmers are accessible with avrdude -c ?
Configuration for the programmers:
AVR ISP
[env:myenv]
platform = atmelavr
framework = arduino
upload_protocol = stk500v1
; each flag in a new line
upload_flags =
-P$UPLOAD_PORT
; edit this line with valid upload port
upload_port = SERIAL_PORT_HERE
AVRISP mkII
[env:myenv]
platform = atmelavr
framework = arduino
upload_protocol = stk500v2
; each flag in a new line
upload_flags =
-Pusb
USBtinyISP
[env:myenv]
platform = atmelavr
framework = arduino
upload_protocol = usbtiny
ArduinoISP
[env:myenv]
platform = atmelavr
framework = arduino
upload_protocol = arduinoisp
USBasp
[env:myenv]
platform = atmelavr
framework = arduino
upload_protocol = usbasp
; each flag in a new line
upload_flags =
-Pusb
Parallel Programmer
[env:myenv]
platform = atmelavr
framework = arduino
upload_protocol = dapa
; each flag in a new line
upload_flags =
-F
Arduino as ISP
[env:myenv]
platform = atmelavr
framework = arduino
upload_protocol = stk500v1
; each flag in a new line
upload_flags =
-P$UPLOAD_PORT
-b$UPLOAD_SPEED
; edit these lines
upload_port = SERIAL_PORT_HERE
upload_speed = 19200
Bus Pirate as ISP
[env:myenv]
platform = atmelavr
framework = arduino
upload_protocol = buspirate
; each flag in a new line
upload_flags =
-P$UPLOAD_PORT
-b$UPLOAD_SPEED
; edit these lines
upload_port = SERIAL_PORT_HERE
upload_speed = 115200
To upload EEPROM data (from EEMEM directive) you need to use uploadeep
target instead upload
for platformio run --target
command.
For example, platformio run -t uploadeep
.
PlatformIO has built-in target named fuses
for setting fuse bits. The
default fuse bits are predefined in board manifest file in fuses
section.
For example, Arduino Uno Fuses.
To set fuse bits you need to use target fuses
for
platformio run --target
command.
You can specify custom fuse bits. Please create custom extra_scripts and override default “fuses” command:
platformio.ini
:
[env:custom_fuses]
platform = atmelavr
extra_scripts = extra_script.py
extra_script.py
:
Import('env')
env.Replace(FUSESCMD="avrdude $UPLOADERFLAGS -e -Ulock:w:0x3F:m -Uhfuse:w:0xDE:m -Uefuse:w:0x05:m -Ulfuse:w:0xFF:m")
Examples are listed from Atmel AVR development platform repository:
You can switch between stable releases of Atmel AVR development platform and the latest upstream version using platform option in “platformio.ini” (Project Configuration File) as described below.
; Latest stable version
[env:latest_stable]
platform = atmelavr
board = ...
; Custom stable version
[env:custom_stable]
platform = atmelavr@x.y.z
board = ...
[env:upstream_develop]
platform = https://github.com/platformio/platform-atmelavr.git
board = ...
Name |
Description |
---|---|
Arduino Wiring-based Framework (AVR Core) |
|
Simba Framework |
|
AVRDUDE |
|
Micronucleus |
|
avr-gcc |
Warning
Linux Users:
Install “udev” rules 99-platformio-udev.rules
Raspberry Pi users, please read this article Enable serial port on Raspberry Pi.
Windows Users:
Please check that you have a correctly installed USB driver from board manufacturer
Name |
Description |
---|---|
Arduino Wiring-based Framework allows writing cross-platform software to control devices attached to a wide range of Arduino boards to create all kinds of creative coding, interactive objects, spaces or physical experiences. |
|
Simba is an RTOS and build framework. It aims to make embedded programming easy and portable. |
Note
You can list pre-configured boards by platformio boards command or PlatformIO Boards Explorer
For more detailed board
information please scroll tables below by
horizontal.
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA32U4 |
8MHz |
28KB |
2.50KB |
|
No |
ATMEGA32U4 |
8MHz |
28KB |
2.50KB |
|
No |
ATMEGA328P |
8MHz |
31.50KB |
2KB |
|
No |
ATMEGA32U4 |
8MHz |
28KB |
2.50KB |
|
No |
ATMEGA32U4 |
8MHz |
28KB |
2.50KB |
|
No |
ATTINY85 |
8MHz |
8KB |
512B |
|
No |
ATMEGA32U4 |
8MHz |
28KB |
2.50KB |
|
No |
ATMEGA32U4 |
16MHz |
28KB |
2.50KB |
|
No |
ATMEGA328P |
16MHz |
31.50KB |
2KB |
|
No |
ATMEGA328P |
12MHz |
28KB |
2KB |
|
No |
ATMEGA328P |
12MHz |
28KB |
2KB |
|
No |
ATMEGA328P |
16MHz |
28KB |
2KB |
|
No |
ATMEGA328P |
16MHz |
28KB |
2KB |
|
No |
ATTINY85 |
8MHz |
8KB |
512B |
|
No |
ATTINY85 |
16MHz |
8KB |
512B |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA328P |
16MHz |
31.50KB |
2KB |
|
No |
ATMEGA328P |
16MHz |
31.50KB |
2KB |
|
No |
ATMEGA328P |
16MHz |
31.50KB |
2KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA328P |
16MHz |
31.50KB |
2KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA32U4 |
16MHz |
28KB |
2.50KB |
|
No |
ATMEGA32U4 |
16MHz |
28KB |
2.50KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA168 |
16MHz |
14KB |
1KB |
|
No |
ATMEGA328P |
16MHz |
28KB |
2KB |
|
No |
ATMEGA168 |
16MHz |
14KB |
1KB |
|
No |
ATMEGA328P |
16MHz |
30KB |
2KB |
|
No |
ATMEGA32U4 |
16MHz |
28KB |
2.50KB |
|
No |
ATMEGA328P |
16MHz |
31.50KB |
2KB |
|
No |
ATMEGA328P |
8MHz |
30KB |
2KB |
|
No |
ATMEGA32U4 |
16MHz |
28KB |
2.50KB |
|
No |
ATMEGA32U4 |
16MHz |
28KB |
2.50KB |
|
No |
ATMEGA32U4 |
16MHz |
28KB |
2.50KB |
|
No |
ATMEGA168 |
8MHz |
14KB |
1KB |
|
No |
ATMEGA328P |
8MHz |
30KB |
2KB |
|
No |
ATMEGA32U4 |
8MHz |
28KB |
2.50KB |
|
No |
ATMEGA2560 |
16MHz |
248KB |
8KB |
|
No |
ATMEGA1280 |
16MHz |
124KB |
8KB |
|
No |
ATMEGA2560 |
16MHz |
248KB |
8KB |
|
No |
ATMEGA32U4 |
16MHz |
28KB |
2.50KB |
|
No |
ATMEGA168 |
16MHz |
14KB |
1KB |
|
No |
ATMEGA328P |
16MHz |
28KB |
2KB |
|
No |
ATMEGA168 |
16MHz |
14KB |
1KB |
|
No |
ATMEGA8 |
16MHz |
7KB |
1KB |
|
No |
ATMEGA168 |
16MHz |
14KB |
1KB |
|
No |
ATMEGA328P |
16MHz |
30KB |
2KB |
|
No |
ATMEGA328P |
16MHz |
30KB |
2KB |
|
No |
ATMEGA168 |
8MHz |
14KB |
1KB |
|
No |
ATMEGA168 |
16MHz |
14KB |
1KB |
|
No |
ATMEGA328P |
8MHz |
30KB |
2KB |
|
No |
ATMEGA328P |
16MHz |
30KB |
2KB |
|
No |
ATMEGA32U4 |
16MHz |
28KB |
2.50KB |
|
No |
ATMEGA32U4 |
16MHz |
28KB |
2.50KB |
|
No |
ATMEGA328P |
16MHz |
31.50KB |
2KB |
|
No |
ATMEGA32U4 |
16MHz |
28KB |
2.50KB |
|
No |
ATMEGA32U4 |
16MHz |
28KB |
2.50KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATTINY13 |
1MHz |
1KB |
64B |
|
No |
ATTINY13A |
1MHz |
1KB |
64B |
|
No |
ATTINY1634 |
8MHz |
16KB |
1KB |
|
No |
ATTINY167 |
8MHz |
16KB |
512B |
|
No |
ATTINY2313 |
8MHz |
2KB |
128B |
|
No |
ATTINY24 |
8MHz |
2KB |
128B |
|
No |
ATTINY25 |
8MHz |
2KB |
128B |
|
No |
ATTINY261 |
8MHz |
2KB |
128B |
|
No |
ATTINY4313 |
8MHz |
4KB |
256B |
|
No |
ATTINY43U |
8MHz |
4KB |
256B |
|
No |
ATTINY44 |
8MHz |
4KB |
256B |
|
No |
ATTINY441 |
8MHz |
4KB |
256B |
|
No |
ATTINY45 |
8MHz |
4KB |
256B |
|
No |
ATTINY461 |
8MHz |
4KB |
256B |
|
No |
ATTINY48 |
8MHz |
4KB |
256B |
|
No |
ATTINY828 |
8MHz |
8KB |
512B |
|
No |
ATTINY84 |
8MHz |
8KB |
512B |
|
No |
ATTINY841 |
8MHz |
8KB |
512B |
|
No |
ATTINY85 |
8MHz |
8KB |
512B |
|
No |
ATTINY861 |
8MHz |
8KB |
512B |
|
No |
ATTINY87 |
8MHz |
8KB |
512B |
|
No |
ATTINY88 |
8MHz |
8KB |
512B |
|
No |
ATMEGA8 |
12MHz |
8KB |
1KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA328P |
16MHz |
28KB |
2KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA32U4 |
8MHz |
28KB |
2.50KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA328P |
16MHz |
30KB |
2KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA2560 |
16MHz |
248KB |
8KB |
|
No |
ATMEGA2560 |
16MHz |
248KB |
8KB |
|
No |
ATMEGA2560 |
16MHz |
248KB |
8KB |
|
No |
ATMEGA328P |
16MHz |
31.50KB |
2KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATTINY167 |
16MHz |
14.50KB |
512B |
|
No |
ATTINY167 |
16MHz |
14.50KB |
512B |
|
No |
ATTINY167 |
16MHz |
14.50KB |
512B |
|
No |
ATTINY85 |
16MHz |
5.87KB |
512B |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
AT90USB646 |
16MHz |
60KB |
2KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA328PB |
16MHz |
31.50KB |
2KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA32U4 |
8MHz |
28KB |
2.50KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA1284P |
8MHz |
127KB |
16KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA2560 |
16MHz |
252KB |
8KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA32U4 |
8MHz |
28KB |
2.50KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA32U4 |
16MHz |
28KB |
2.50KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA328P |
16MHz |
31KB |
2KB |
|
No |
ATMEGA328P |
16MHz |
31.50KB |
2KB |
|
No |
ATMEGA328P |
8MHz |
31.50KB |
2KB |
|
No |
ATMEGA1284P |
16MHz |
127KB |
16KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA128 |
8MHz |
127KB |
4KB |
|
No |
ATMEGA1284P |
16MHz |
127KB |
16KB |
|
No |
ATMEGA16 |
16MHz |
15.50KB |
1KB |
|
No |
ATMEGA164P |
16MHz |
15.50KB |
1KB |
|
No |
ATMEGA32 |
16MHz |
31.50KB |
2KB |
|
No |
ATMEGA324P |
16MHz |
31.50KB |
2KB |
|
No |
ATMEGA644P |
16MHz |
63KB |
4KB |
|
No |
ATMEGA8535 |
16MHz |
7.50KB |
512B |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA32U4 |
8MHz |
28KB |
2.50KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA168 |
16MHz |
15.50KB |
1KB |
|
No |
ATMEGA168P |
16MHz |
15.50KB |
1KB |
|
No |
ATMEGA328 |
16MHz |
31.50KB |
2KB |
|
No |
ATMEGA328P |
16MHz |
31.50KB |
2KB |
|
No |
ATMEGA328PB |
16MHz |
31.50KB |
2KB |
|
No |
ATMEGA48 |
16MHz |
4KB |
512B |
|
No |
ATMEGA48P |
16MHz |
4KB |
512B |
|
No |
ATMEGA8 |
16MHz |
7.50KB |
1KB |
|
No |
ATMEGA88 |
16MHz |
7.50KB |
1KB |
|
No |
ATMEGA88P |
16MHz |
7.50KB |
1KB |
|
No |
AT90PWM216 |
16MHz |
16KB |
1KB |
|
No |
AT90PWM316 |
16MHz |
16KB |
1KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA168P |
16MHz |
15.50KB |
1KB |
|
No |
ATMEGA168P |
8MHz |
15.50KB |
1KB |
|
No |
ATMEGA328P |
16MHz |
31.50KB |
2KB |
|
No |
ATMEGA328P |
8MHz |
31.50KB |
2KB |
|
No |
ATMEGA32U4 |
16MHz |
28KB |
2.50KB |
|
No |
ATMEGA1284P |
16MHz |
127KB |
16KB |
|
No |
ATMEGA1284P |
8MHz |
127KB |
16KB |
|
No |
ATMEGA644P |
16MHz |
63KB |
4KB |
|
No |
ATMEGA644P |
8MHz |
63KB |
4KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA328P |
16MHz |
30KB |
2KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA328P |
8MHz |
31.50KB |
2KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA256RFR2 |
16MHz |
248KB |
32KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA32U4 |
16MHz |
28KB |
2.50KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA328P |
8MHz |
31.50KB |
2KB |
|
No |
ATMEGA328P |
16MHz |
31.50KB |
2KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA32U4 |
8MHz |
28KB |
2.50KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA32U4 |
16MHz |
28KB |
2.50KB |
|
No |
ATMEGA32U4 |
16MHz |
28KB |
2.50KB |
|
No |
ATMEGA32U4 |
8MHz |
28KB |
2.50KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA2560 |
16MHz |
252KB |
8KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA1284P |
8MHz |
127KB |
16KB |
|
No |
ATMEGA1284P |
8MHz |
127KB |
16KB |
|
No |
ATMEGA328P |
8MHz |
31.50KB |
2KB |
|
No |
ATMEGA1284P |
8MHz |
127KB |
16KB |
|
No |
ATMEGA1284P |
8MHz |
127KB |
16KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA1284P |
16MHz |
127KB |
16KB |
|
No |
ATMEGA1284P |
8MHz |
127KB |
16KB |
|
No |
ATMEGA644 |
16MHz |
63KB |
4KB |
|
No |
ATMEGA644 |
8MHz |
63KB |
4KB |
|
No |
ATMEGA644P |
16MHz |
63KB |
4KB |
|
No |
ATMEGA644P |
8MHz |
63KB |
4KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA328P |
16MHz |
31.50KB |
2KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA128RFA1 |
16MHz |
16KB |
124KB |
|
No |
ATMEGA328P |
8MHz |
31.50KB |
2KB |
|
No |
ATMEGA32U4 |
8MHz |
28KB |
2.50KB |
|
No |
ATMEGA32U4 |
16MHz |
28KB |
2.50KB |
|
No |
ATMEGA2560 |
8MHz |
252KB |
8KB |
|
No |
ATMEGA2560 |
16MHz |
248KB |
8KB |
|
No |
ATMEGA2560 |
8MHz |
252KB |
8KB |
|
No |
ATMEGA328P |
16MHz |
31.50KB |
2KB |
|
No |
ATMEGA32U4 |
8MHz |
28KB |
2.50KB |
|
No |
ATMEGA32U4 |
16MHz |
28KB |
2.50KB |
|
No |
ATMEGA32U4 |
8MHz |
28KB |
2.50KB |
|
No |
ATMEGA328P |
16MHz |
31.50KB |
2KB |
|
No |
ATMEGA328P |
8MHz |
31.50KB |
2KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA328P |
8MHz |
30KB |
2KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA32U4 |
16MHz |
28KB |
2.50KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA32U4 |
16MHz |
28KB |
2.50KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA328P |
8MHz |
30KB |
2KB |
|
No |
ATMEGA328P |
8MHz |
30KB |
2KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA1284P |
16MHz |
120.00KB |
16KB |
|
No |
ATMEGA1284P |
16MHz |
127KB |
16KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA328P |
16MHz |
31.50KB |
2KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA256RFR2 |
16MHz |
248KB |
32KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA88 |
8MHz |
8KB |
1KB |
|
No |
ATMEGA128 |
16MHz |
128KB |
4KB |
|
No |
ATMEGA16 |
15MHz |
16KB |
1KB |
|
No |
ATMEGA1284P |
20MHz |
128KB |
16KB |
|
No |
ATMEGA16 |
15MHz |
16KB |
1KB |
|
No |
ATMEGA1284P |
20MHz |
128KB |
16KB |
Name |
Debug |
MCU |
Frequency |
Flash |
RAM |
---|---|---|---|---|---|
No |
ATMEGA328P |
16MHz |
31.50KB |
2KB |