Atmel AVR

Configuration: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.

Configuration

Upload using Programmer

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
    

Upload EEPROM data

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.

Fuses

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.

Custom Fuses

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")

Stable and upstream versions

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.

Stable

; Latest stable version
[env:latest_stable]
platform = atmelavr
board = ...

; Custom stable version
[env:custom_stable]
platform = [email protected]
board = ...

Upstream

[env:upstream_develop]
platform = https://github.com/platformio/platform-atmelavr.git
board = ...

Packages

Name Description
framework-arduinoavr Arduino Wiring-based Framework (AVR Core, 1.6)
framework-simba Simba Framework
tool-avrdude AVRDUDE
tool-micronucleus Micronucleus
toolchain-atmelavr avr-gcc

Warning

Linux Users:

Windows Users:

Please check that you have a correctly installed USB driver from board manufacturer

Frameworks

Name Description
Arduino 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 Simba is an RTOS and build framework. It aims to make embedded programming easy and portable.

Boards

Note

Adafruit

Name Debug MCU Frequency Flash RAM
Adafruit Bluefruit Micro No ATMEGA32U4 8MHz 28KB 2.50KB
Adafruit Circuit Playground Classic No ATMEGA32U4 8MHz 28KB 2.50KB
Adafruit Feather 328P No ATMEGA328P 8MHz 31.50KB 2KB
Adafruit Feather 32u4 No ATMEGA32U4 8MHz 28KB 2.50KB
Adafruit Flora No ATMEGA32U4 8MHz 28KB 2.50KB
Adafruit Gemma No ATTINY85 8MHz 8KB 512B
Adafruit ItsyBitsy 3V/8MHz No ATMEGA32U4 8MHz 28KB 2.50KB
Adafruit ItsyBitsy 5V/16MHz No ATMEGA32U4 16MHz 28KB 2.50KB
Adafruit Metro No ATMEGA328P 16MHz 31.50KB 2KB
Adafruit Pro Trinket 3V/12MHz (FTDI) No ATMEGA328P 12MHz 28KB 2KB
Adafruit Pro Trinket 3V/12MHz (USB) No ATMEGA328P 12MHz 28KB 2KB
Adafruit Pro Trinket 5V/16MHz (FTDI) No ATMEGA328P 16MHz 28KB 2KB
Adafruit Pro Trinket 5V/16MHz (USB) No ATMEGA328P 16MHz 28KB 2KB
Adafruit Trinket 3V/8MHz No ATTINY85 8MHz 8KB 512B
Adafruit Trinket 5V/16MHz No ATTINY85 16MHz 8KB 512B

Alorium Technology

Name Debug MCU Frequency Flash RAM
Alorium Sno No ATMEGA328P 16MHz 31.50KB 2KB
Alorium XLR8 No ATMEGA328P 16MHz 31.50KB 2KB

Anarduino

Name Debug MCU Frequency Flash RAM
Anarduino MiniWireless No ATMEGA328P 16MHz 31.50KB 2KB

Arduboy

Name Debug MCU Frequency Flash RAM
Arduboy No ATMEGA32U4 16MHz 28KB 2.50KB
Arduboy DevKit No ATMEGA32U4 16MHz 28KB 2.50KB

Arduino

Name Debug MCU Frequency Flash RAM
Arduino BT ATmega168 No ATMEGA168 16MHz 14KB 1KB
Arduino BT ATmega328 No ATMEGA328P 16MHz 28KB 2KB
Arduino Duemilanove or Diecimila ATmega168 No ATMEGA168 16MHz 14KB 1KB
Arduino Duemilanove or Diecimila ATmega328 No ATMEGA328P 16MHz 30KB 2KB
Arduino Esplora No ATMEGA32U4 16MHz 28KB 2.50KB
Arduino Ethernet No ATMEGA328P 16MHz 31.50KB 2KB
Arduino Fio No ATMEGA328P 8MHz 30KB 2KB
Arduino Industrial 101 No ATMEGA32U4 16MHz 28KB 2.50KB
Arduino Leonardo No ATMEGA32U4 16MHz 28KB 2.50KB
Arduino Leonardo ETH No ATMEGA32U4 16MHz 28KB 2.50KB
Arduino LilyPad ATmega168 No ATMEGA168 8MHz 14KB 1KB
Arduino LilyPad ATmega328 No ATMEGA328P 8MHz 30KB 2KB
Arduino LilyPad USB No ATMEGA32U4 8MHz 28KB 2.50KB
Arduino Mega ADK No ATMEGA2560 16MHz 248KB 8KB
Arduino Mega or Mega 2560 ATmega1280 No ATMEGA1280 16MHz 124KB 8KB
Arduino Mega or Mega 2560 ATmega2560 (Mega 2560) No ATMEGA2560 16MHz 248KB 8KB
Arduino Micro No ATMEGA32U4 16MHz 28KB 2.50KB
Arduino Mini ATmega168 No ATMEGA168 16MHz 14KB 1KB
Arduino Mini ATmega328 No ATMEGA328P 16MHz 28KB 2KB
Arduino NG or older ATmega168 No ATMEGA168 16MHz 14KB 1KB
Arduino NG or older ATmega8 No ATMEGA8 16MHz 7KB 1KB
Arduino Nano ATmega168 No ATMEGA168 16MHz 14KB 1KB
Arduino Nano ATmega328 No ATMEGA328P 16MHz 30KB 2KB
Arduino Nano ATmega328 (New Bootloader) No ATMEGA328P 16MHz 30KB 2KB
Arduino Pro or Pro Mini ATmega168 (3.3V, 8 MHz) No ATMEGA168 8MHz 14KB 1KB
Arduino Pro or Pro Mini ATmega168 (5V, 16 MHz) No ATMEGA168 16MHz 14KB 1KB
Arduino Pro or Pro Mini ATmega328 (3.3V, 8 MHz) No ATMEGA328P 8MHz 30KB 2KB
Arduino Pro or Pro Mini ATmega328 (5V, 16 MHz) No ATMEGA328P 16MHz 30KB 2KB
Arduino Robot Control No ATMEGA32U4 16MHz 28KB 2.50KB
Arduino Robot Motor No ATMEGA32U4 16MHz 28KB 2.50KB
Arduino Uno No ATMEGA328P 16MHz 31.50KB 2KB
Arduino Yun No ATMEGA32U4 16MHz 28KB 2.50KB
Arduino Yun Mini No ATMEGA32U4 16MHz 28KB 2.50KB
Atmel ATmega328PB No ATMEGA328PB 16MHz 31.50KB 2KB

Atmel

Name Debug MCU Frequency Flash RAM
Generic ATTiny13 No ATTINY13 9MHz 1KB 64B
Generic ATTiny1634 No ATTINY1634 8MHz 16KB 1KB
Generic ATTiny167 No ATTINY167 8MHz 16KB 512B
Generic ATTiny2313 No ATTINY2313 8MHz 2KB 128B
Generic ATTiny24 No ATTINY24 8MHz 2KB 128B
Generic ATTiny25 No ATTINY25 8MHz 2KB 128B
Generic ATTiny261 No ATTINY261 8MHz 2KB 128B
Generic ATTiny4313 No ATTINY4313 8MHz 4KB 256B
Generic ATTiny44 No ATTINY44 8MHz 4KB 256B
Generic ATTiny441 No ATTINY441 8MHz 4KB 256B
Generic ATTiny45 No ATTINY45 8MHz 4KB 256B
Generic ATTiny461 No ATTINY461 8MHz 4KB 256B
Generic ATTiny48 No ATTINY48 8MHz 4KB 256B
Generic ATTiny828 No ATTINY828 8MHz 8KB 512B
Generic ATTiny84 No ATTINY84 8MHz 8KB 512B
Generic ATTiny841 No ATTINY841 8MHz 8KB 512B
Generic ATTiny85 No ATTINY85 8MHz 8KB 512B
Generic ATTiny861 No ATTINY861 8MHz 8KB 512B
Generic ATTiny87 No ATTINY87 8MHz 8KB 512B
Generic ATTiny88 No ATTINY88 8MHz 8KB 512B
USBasp stick No ATMEGA8 12MHz 8KB 1KB

BQ

Name Debug MCU Frequency Flash RAM
BQ ZUM BT-328 No ATMEGA328P 16MHz 28KB 2KB

BitWizard

Name Debug MCU Frequency Flash RAM
BitWizard Raspduino No ATMEGA328P 16MHz 30KB 2KB

Controllino

Name Debug MCU Frequency Flash RAM
Controllino Maxi No ATMEGA2560 16MHz 248KB 8KB
Controllino Maxi Automation No ATMEGA2560 16MHz 248KB 8KB
Controllino Mega No ATMEGA2560 16MHz 248KB 8KB
Controllino Mini No ATMEGA328P 16MHz 31.50KB 2KB

Digistump

Name Debug MCU Frequency Flash RAM
Digispark Pro No ATTINY167 16MHz 14.50KB 512B
Digispark Pro (16 MHz) (64 byte buffer) No ATTINY167 16MHz 14.50KB 512B
Digispark Pro (32 byte buffer) No ATTINY167 16MHz 14.50KB 512B
Digispark USB No ATTINY85 16MHz 5.87KB 512B

Dwengo

Name Debug MCU Frequency Flash RAM
Dwenguino No AT90USB646 16MHz 60KB 2KB

Elektor

Name Debug MCU Frequency Flash RAM
Elektor Uno R4 No ATMEGA328PB 16MHz 31.50KB 2KB

Engduino

Name Debug MCU Frequency Flash RAM
Engduino 3 No ATMEGA32U4 8MHz 28KB 2.50KB

EnviroDIY

Name Debug MCU Frequency Flash RAM
EnviroDIY Mayfly No ATMEGA1284P 8MHz 127KB 16KB

LightUp

Name Debug MCU Frequency Flash RAM
LightUp No ATMEGA32U4 8MHz 28KB 2.50KB

Linino

Name Debug MCU Frequency Flash RAM
Linino One No ATMEGA32U4 16MHz 28KB 2.50KB

LowPowerLab

Name Debug MCU Frequency Flash RAM
LowPowerLab MightyHat No ATMEGA328P 16MHz 31KB 2KB
LowPowerLab Moteino No ATMEGA328P 16MHz 31.50KB 2KB
LowPowerLab MoteinoMEGA No ATMEGA1284P 16MHz 127KB 16KB

Mcudude

Name Debug MCU Frequency Flash RAM
MightyCore ATmega1284 No ATMEGA1284P 16MHz 127KB 16KB
MightyCore ATmega16 No ATMEGA16 16MHz 15.50KB 1KB
MightyCore ATmega164 No ATMEGA164P 16MHz 15.50KB 1KB
MightyCore ATmega32 No ATMEGA32 16MHz 31.50KB 2KB
MightyCore ATmega324 No ATMEGA324P 16MHz 31.50KB 2KB
MightyCore ATmega644 No ATMEGA644P 16MHz 63KB 4KB
MightyCore ATmega8535 No ATMEGA8535 16MHz 7.50KB 512B

MediaTek Labs

Name Debug MCU Frequency Flash RAM
LinkIt Smart 7688 Duo No ATMEGA32U4 8MHz 28KB 2.50KB

Microchip

Name Debug MCU Frequency Flash RAM
Atmel AT90PWM216 No AT90PWM216 16MHz 16KB 1KB
Atmel AT90PWM316 No AT90PWM316 16MHz 16KB 1KB

Microduino

Name Debug MCU Frequency Flash RAM
Microduino Core (Atmega168PA@16M,5V) No ATMEGA168P 16MHz 15.50KB 1KB
Microduino Core (Atmega168PA@8M,3.3V) No ATMEGA168P 8MHz 15.50KB 1KB
Microduino Core (Atmega328P@16M,5V) No ATMEGA328P 16MHz 31.50KB 2KB
Microduino Core (Atmega328P@8M,3.3V) No ATMEGA328P 8MHz 31.50KB 2KB
Microduino Core USB (ATmega32U4@16M,5V) No ATMEGA32U4 16MHz 28KB 2.50KB
Microduino Core+ (ATmega1284P@16M,5V) No ATMEGA1284P 16MHz 127KB 16KB
Microduino Core+ (ATmega1284P@8M,3.3V) No ATMEGA1284P 8MHz 127KB 16KB
Microduino Core+ (Atmega644PA@16M,5V) No ATMEGA644P 16MHz 63KB 4KB
Microduino Core+ (Atmega644PA@8M,3.3V) No ATMEGA644P 8MHz 63KB 4KB

OpenEnergyMonitor

Name Debug MCU Frequency Flash RAM
OpenEnergyMonitor emonPi No ATMEGA328P 16MHz 30KB 2KB

PanStamp

Name Debug MCU Frequency Flash RAM
PanStamp AVR No ATMEGA328P 8MHz 31.50KB 2KB

Pinoccio

Name Debug MCU Frequency Flash RAM
Pinoccio Scout No ATMEGA256RFR2 16MHz 248KB 32KB

Pololu Corporation

Name Debug MCU Frequency Flash RAM
Pololu A-Star 32U4 No ATMEGA32U4 16MHz 28KB 2.50KB

Punch Through

Name Debug MCU Frequency Flash RAM
LightBlue Bean No ATMEGA328P 8MHz 31.50KB 2KB
LightBlue Bean+ No ATMEGA328P 16MHz 31.50KB 2KB

Quirkbot

Name Debug MCU Frequency Flash RAM
Quirkbot No ATMEGA32U4 8MHz 28KB 2.50KB

RedBearLab

Name Debug MCU Frequency Flash RAM
RedBearLab Blend No ATMEGA32U4 16MHz 28KB 2.50KB
RedBearLab Blend Micro 3.3V/16MHz (overclock) No ATMEGA32U4 16MHz 28KB 2.50KB
RedBearLab Blend Micro 3.3V/8MHz No ATMEGA32U4 8MHz 28KB 2.50KB

RepRap

Name Debug MCU Frequency Flash RAM
RepRap RAMBo No ATMEGA2560 16MHz 252KB 8KB

SODAQ

Name Debug MCU Frequency Flash RAM
SODAQ GaLoRa No ATMEGA1284P 8MHz 127KB 16KB
SODAQ Mbili No ATMEGA1284P 8MHz 127KB 16KB
SODAQ Moja No ATMEGA328P 8MHz 31.50KB 2KB
SODAQ Ndogo No ATMEGA1284P 8MHz 127KB 16KB
SODAQ Tatu No ATMEGA1284P 8MHz 127KB 16KB

Sanguino

Name Debug MCU Frequency Flash RAM
Sanguino ATmega1284p (16MHz) No ATMEGA1284P 16MHz 127KB 16KB
Sanguino ATmega1284p (8MHz) No ATMEGA1284P 8MHz 127KB 16KB
Sanguino ATmega644 or ATmega644A (16 MHz) No ATMEGA644 16MHz 63KB 4KB
Sanguino ATmega644 or ATmega644A (8 MHz) No ATMEGA644 8MHz 63KB 4KB
Sanguino ATmega644P or ATmega644PA (16 MHz) No ATMEGA644P 16MHz 63KB 4KB
Sanguino ATmega644P or ATmega644PA (8 MHz) No ATMEGA644P 8MHz 63KB 4KB

SeeedStudio

Name Debug MCU Frequency Flash RAM
Seeeduino No ATMEGA328P 16MHz 31.50KB 2KB

SparkFun

Name Debug MCU Frequency Flash RAM
SparkFun ATmega128RFA1 Dev Board No ATMEGA128RFA1 16MHz 16KB 124KB
SparkFun Digital Sandbox No ATMEGA328P 8MHz 31.50KB 2KB
SparkFun Fio V3 3.3V/8MHz No ATMEGA32U4 8MHz 28KB 2.50KB
SparkFun Makey Makey No ATMEGA32U4 16MHz 28KB 2.50KB
SparkFun Mega Pro 3.3V/8MHz No ATMEGA2560 8MHz 252KB 8KB
SparkFun Mega Pro 5V/16MHz No ATMEGA2560 16MHz 248KB 8KB
SparkFun Mega Pro Mini 3.3V No ATMEGA2560 8MHz 252KB 8KB
SparkFun MicroView No ATMEGA328P 16MHz 31.50KB 2KB
SparkFun Pro Micro 3.3V/8MHz No ATMEGA32U4 8MHz 28KB 2.50KB
SparkFun Pro Micro 5V/16MHz No ATMEGA32U4 16MHz 28KB 2.50KB
SparkFun Qduino Mini No ATMEGA32U4 8MHz 28KB 2.50KB
SparkFun RedBoard No ATMEGA328P 16MHz 31.50KB 2KB
SparkFun Serial 7-Segment Display No ATMEGA328P 8MHz 31.50KB 2KB

SpellFoundry

Name Debug MCU Frequency Flash RAM
SpellFoundry Sleepy Pi 2 No ATMEGA328P 8MHz 30KB 2KB

The Things Network

Name Debug MCU Frequency Flash RAM
The Things Uno No ATMEGA32U4 16MHz 28KB 2.50KB

Till Harbaum

Name Debug MCU Frequency Flash RAM
ftDuino No ATMEGA32U4 16MHz 28KB 2.50KB

TinyCircuits

Name Debug MCU Frequency Flash RAM
TinyCircuits TinyDuino Processor Board No ATMEGA328P 8MHz 30KB 2KB
TinyCircuits TinyLily Mini Processor No ATMEGA328P 8MHz 30KB 2KB

Wicked Device

Name Debug MCU Frequency Flash RAM
Wicked Device WildFire V2 No ATMEGA1284P 16MHz 120.00KB 16KB
Wicked Device WildFire V3 No ATMEGA1284P 16MHz 127KB 16KB

Wisen

Name Debug MCU Frequency Flash RAM
Talk2 Whisper Node No ATMEGA328P 16MHz 31.50KB 2KB

makerlab.mx

Name Debug MCU Frequency Flash RAM
Altair No ATMEGA256RFR2 16MHz 248KB 32KB

nicai-systems

Name Debug MCU Frequency Flash RAM
nicai-systems BOB3 coding bot No ATMEGA88 8MHz 8KB 1KB
nicai-systems NIBO 2 robot No ATMEGA128 16MHz 128KB 4KB
nicai-systems NIBO burger robot No ATMEGA16 15MHz 16KB 1KB
nicai-systems NIBO burger robot with Tuning Kit No ATMEGA1284P 20MHz 128KB 16KB
nicai-systems NIBObee robot No ATMEGA16 15MHz 16KB 1KB
nicai-systems NIBObee robot with Tuning Kit No ATMEGA1284P 20MHz 128KB 16KB

ubIQio

Name Debug MCU Frequency Flash RAM
ubIQio Ardhat No ATMEGA328P 16MHz 31.50KB 2KB