Upload using Programmer

To upload firmware using programmer you need to use program target instead upload for platformio run --target command. For example, platformio run -t program.

Configuration for the programmers:

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_script and override default “fuses” command:

platformio.ini:

[env:custom_fuses]
platform = atmelavr
extra_script = 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")

Articles

See more Articles about us.

Examples

All project examples are located in PlatformIO repository Examples for Atmel AVR platform.