Marlin/reprap ramps 1.4

i am trying to download some firmware for an arduino mega (mine is an elegoo mega 2560) and i keep getting this error

avrdude: stk500v2_setparm(): failed to set parameter 0x9e
avrdude: stk500v2_command(): unknown status 0xc8
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude: stk500v2_command(): unknown status 0x01
avrdude: stk500v2_disable(): failed to leave programming mode
An error occurred while uploading the sketch

i have no idea what to do, and it is making me severely miffed >:(