I am trying to program a clone m2560 and am having a heck of a time.
I have previously used this usb asp to icsp program an m128 in a turnigy 9x radio transmitter with success, but can't get it to work with this 2560 board. I am using a win10 atom tablet and the proto 3.0.7 drivers, but I have also had the same results on my xp machine with zadig installed libusb drivers.
I am using the files from http://jenkins.open-tx.org/MEGA2560/. There are 2 bat files to do what needs to be done. I set the fuses without error with:
avrdude -p m2560 -c usbasp -P usb -F -e -u -Ulfuse:w:0xFF:m -Uhfuse:w:0xD8:m -Uefuse:w:0xFD:m -v
pause
And then try to flash the bootloader I need from the second bat file:
avrdude -p m2560 -c usbasp -P usb -U lock:w:0x3F:m -U flash:w:mega2560_stk500v2boot_opentx.hex -U lock:w:0x0F:m
pause
But at the end of the burning the bootloader i get an error of:
avrdude: verification error, first mismatch at by 0x1e000
0xff != 0x0d
After burning the bootloader, I use companion 2.1 to try to load firmware to my board, but avrdude outputs:
avrdude.exe: erasing chip
avrdude.exe: stk500v2_command(): command failed
avrdude.exe done. Thank you.
I have included pics of my board and programmer for reference. What am I missing?

some chinese and all o'fischl usbasp firmware are incapable of programming m2560 properly. details here:
http://forum.arduino.cc/index.php?topic=363772.0
there are a couple solutions:
- reflash usbasp with petervh recompiled gruvin file (usbasp-v1.5.hex).
- change hfuse to d9 when flashing above 128kbytes.
lately i prefer that last because reflashing usbasp is a pain and there are other issues with the official firmware and versions based on it. the stock chinese has many advantages over o'fischl versions.
Okidoki!
I've also tried to use another arduino as avrisp, but couldn't get it to work. I didn't wan't to make my original post to confusing.
I have clone Arduino Nano 328p wired up as avrisp, flashed with "arduino isp" through IDE. I have a cap between rst and gnd on nano.
I have changed the bat files to reflect that.
avrdude -p m2560 -c avrisp -P com3 -U lock:w:0x3F:m -U flash:w:mega2560_stk500v2boot_opentx.hex -U lock:w:0x0F:m
pause
But i get an error of
avrdude: stk500_getsync(): not in sync: resp=0xe0
even in IDE I get sync error.
interestingfellow:
I've also tried to use another arduino as avrisp, but couldn't get it to work.
In the Arduino IDE preferences checkmark show verbose output on upload. On the Tools, Programmer menu choose "Arduino As ISP." On the Tools menu do Burn Bootloader. Verify that works. The command lines the IDE does will be shown to you in the console output at the bottom of the IDE window, and you can copy and paste them to the command line on your computer and make any modifications you wish, such as to upload your custom bootloader.
John1993, why is hfuse not already d9, if that would do it anyway?
I read some about high vs low mem on a few other sites, but i just dont grasp memmory mapping.
High fuse set to D8 is what you would use to run the bootloader upon startup. It is the normal fuse setting. High fuse set to D9 is what you would use to run the user program (sketch) and not run the bootloader (ever). People use that setting when they want to upload a sketch using a programmer (instead of using USB and the bootloader, the normal way).
This fuse setting is called the BOOTRST fuse, or Select Reset Vector.
This fuse setting is not related to the fact some ISP programmers can't write beyond 128K in memory. The bootloader starts at flash memory location 253952, and when it runs and you send a sketch to it using USB, the bootloader stores your code in low memory, near location 0. Your USBasp can't write higher than 131071.