Hello,
I am having trouble to upload to a megaatmega1280 target. The code compiles successfully, but it can not be uploaded. I just tried to upload the same code using Arduino IDE and worked fine. The same occurred on a PC running Ubuntu 14.04 and on a Mac running Mac OS X Sierra. Here follows the error message.
Linking .pioenvs/megaatmega1280/firmware.elf
Checking program size
text data bss dec hex filename
1892 44 166 2102 836 .pioenvs/megaatmega1280/firmware.elf
Building .pioenvs/megaatmega1280/firmware.hex
Looking for upload port…
Use manually specified: /dev/tty.usbserial-A600ecwl
Uploading .pioenvs/megaatmega1280/firmware.hex
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x73
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x74
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x61
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x72
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x74
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x0a
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x65
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x63
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x68
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x6f
avrdude done. Thank you.
*** [upload] Error 1
=============================== [ERROR] Took 6.26 seconds =============================
Thank you very much.