I use a USBasp programmer, this one, for programming ATMega micros, and have used it on Arduino boards too.
I tried to program an Arduino Mega (2560), and couldn't get it to work. So I've tried a few things, and it turns out that I can successfully upload the bootloader, and can then use its onboard USB-serial for uploading a sample sketch (blink). This works fine, but if I try to upload the sketch directly with the programmer, the upload seems to work, but the blink sketch doesn't do anything (digital pin doesn't change).
It's particularly strange that the sketch upload seems to work, but that the sketch then either doesn't run, or the upload wasn't actually successful. Here's the (verbose) output from the programmer sketch upload:
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -patmega2560 -cusbasp -Pusb -Uflash:w:/var/folders/j0/h5xk48qx5jnfkltj14d1hvnw0000gn/T/build7227909872368675137.tmp/sketch_mar08a.cpp.hex:i
avrdude: Version 6.0.1, compiled on Apr 14 2015 at 16:30:25
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
User configuration file is "/Users/jmusther/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : usb
Using Programmer : usbasp
AVR Part : ATmega2560
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 10 8 0 no 4096 8 0 9000 9000 0x00 0x00
flash 65 10 256 0 yes 262144 256 1024 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : usbasp
Description : USBasp, http://www.fischl.de/usbasp/
avrdude: auto set sck period (because given equals null)
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9801
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: auto set sck period (because given equals null)
avrdude: reading input file "/var/folders/j0/h5xk48qx5jnfkltj14d1hvnw0000gn/T/build7227909872368675137.tmp/sketch_mar08a.cpp.hex"
avrdude: writing flash (1518 bytes):
Writing | ################################################## | 100% 0.73s
avrdude: 1518 bytes of flash written
avrdude: verifying flash memory against /var/folders/j0/h5xk48qx5jnfkltj14d1hvnw0000gn/T/build7227909872368675137.tmp/sketch_mar08a.cpp.hex:
avrdude: load data flash data from input file /var/folders/j0/h5xk48qx5jnfkltj14d1hvnw0000gn/T/build7227909872368675137.tmp/sketch_mar08a.cpp.hex:
avrdude: input file /var/folders/j0/h5xk48qx5jnfkltj14d1hvnw0000gn/T/build7227909872368675137.tmp/sketch_mar08a.cpp.hex contains 1518 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.40s
avrdude: verifying ...
avrdude: 1518 bytes of flash verified
avrdude done. Thank you.