PlatformIO Community

How upload sketch to Mega2560-CORE

i try connect Mega2560-CORE (USB2SERIAL) to platfromio
http://www.inhaos.com/product_info.php?products_id=118
http://www.inhaos.com/product_info.php?products_id=120

Mega2560-CORE not use COM port they use USB2SERIAL (CP2102 USB to UART bridge controller))

How to write the configuration correctly ???
Now I am using this

[env:ATmega2560]
platform = atmelavr
board = ATmega2560
framework = arduino

Please help

The CP2102 should make a COM port available and thus regular uploading should work, if the Mega2560 has a UART bootloader preflashed.

What exactly is the error message?

1 Like

I updated the driver, the COM port appeared
but now it gives this error when trying to download

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xd5
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xd5
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xd5
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xd5
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xd5
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xd5
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xd5
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xd5
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xd5
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xd5

avrdude done. Thank you.

*** [upload] Error 1

The bootloader might be communicating at a different baud rate. Try setting upload_speed = 57600 in the platformio.ini.

Now is

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xd9
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xd9
avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xd9
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xd9

avrdude done. Thank you.

*** [upload] Error 1

SOme drivers have issues with the reset signal. Try installing the CP2102 driver from https://github.com/espressif/esptool/issues/706#issuecomment-996122044 and deleting upload_speed = ... again.

Changing the driver didn’t help (from v11 to v6.0.7)

avrdude: stk500_recv(): programmer is not responding

So, i returned driver ver=11.0.0.509 (CP210x_Universal_Windows_Driver)
And added to config

upload_protocol = stk500v2

Result:

avrdude: verifying …
avrdude: 36958 bytes of flash verified
avrdude: safemode: Fuses OK (E:FD, H:D8, L:FF)
avrdude done. Thank you.