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:
AVR ISP
[env:myenv]
platform = atmelavr
framework = arduino
upload_protocol = stk500v1
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
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
upload_flags = -Pusb
Parallel Programmer
[env:myenv]
platform = atmelavr
framework = arduino
upload_protocol = dapa
upload_flags = -F
Arduino as ISP
[env:myenv]
platform = atmelavr
framework = arduino
upload_protocol = stk500v1
upload_flags = -P$UPLOAD_PORT -b$UPLOAD_SPEED
; edit these lines
upload_port = SERIAL_PORT_HERE
upload_speed = 19200
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_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")
Dec 01, 2015 - Michał Seroczyński - Push Notification from Arduino Yún with motion sensor
Nov 29, 2015 - Keith Hughes - Using PlatformIO for Embedded Projects
Nov 22, 2015 - Michał Seroczyński - Using PlatformIO to get started with Arduino in CLion IDE
Nov 09, 2015 - ÁLvaro García Gómez - Programar con Arduino “The good way” (Programming with Arduino “The good way”, Spanish)
Oct 18, 2015 - Nico Coetzee - First Arduino I2C Experience with PlatformIO
Oct 10, 2015 - Floyd Hilton - Programming Arduino with Atom
June 20, 2014 - Ivan Kravets, Ph.D. - Building and debugging Atmel AVR (Arduino-based) project using Eclipse IDE+PlatformIO
See more Articles about us.
All project examples are located in PlatformIO repository Examples for Atmel AVR platform.