platformio / platform-atmelavr

Atmel AVR: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/atmelavr
Apache License 2.0
138 stars 105 forks source link

native example not working with Arduino Uno Rev2 #97

Closed Warwolt closed 6 years ago

Warwolt commented 6 years ago

When flashing the native-blink example file on Windows 10 using PlatformIO ver 3.6 with a Arduino Uno Rev2 as target device, the avrdude tool gives the error:

stk500_getsync() attempt < number > of 10: not in sync: resp=< hexnumber >

The INI-file was the following:

[env:uno]
platform = atmelavr
board_mcu = atmega328p
board_f_cpu = 16000000L

upload_protocol = arduino
upload_speed = 19200

Compiling and flashing a similar program using the Arduino framework resulted in a successfully flashed mcu, so the device is functional. Maybe it has something todo with the baud rate used for the flashing?

As of the time of writing, the example project could not be successfully flashed to an atmega 328p equipped Arduino Uno using platformIO.

ivankravets commented 6 years ago

Could you try with upload_speed = 115200?