Arduino IDE not working after dumping .hex file using AVR dude

Hello guys,

I wrote my code in Arduino IDE.Then i imported the .ino file to Atmel 7 studio.Next i build it and using the AVR dude i dumped .hex to arduino 2560 using ICSP pins on the board.

Now after the dump was successful.
As i need some changes in code .If i go back to Arduino IDE to upload file it says:

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
An error occurred while uploading the sketch

May i find proper solution to this problem?? please

After uploading via ISP the bootloader has gone and the bootloader is necessary for uploading via USB/serial port.
You have to upload the bootloader back (via ISP of course) to repair this functionality.

im trying to upload the the atached file using ISP!

its taking more than 1hr still its running?!

avrdude: AVR device initialized and ready to accept instructions
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: reading input file "C:\Users\Rakshith\Desktop\stk500boot_v2_mega2560.hex"
avrdude: input file C:\Users\Rakshith\Desktop\stk500boot_v2_mega2560.hex auto detected as Intel Hex
avrdude: writing flash (261406 bytes):
avrdude: 261406 bytes of flash written
avrdude: verifying flash memory against C:\Users\Rakshith\Desktop\stk500boot_v2_mega2560.hex:
avrdude: load data flash data from input file C:\Users\Rakshith\Desktop\stk500boot_v2_mega2560.hex:
avrdude: input file C:\Users\Rakshith\Desktop\stk500boot_v2_mega2560.hex auto detected as Intel Hex
avrdude: input file C:\Users\Rakshith\Desktop\stk500boot_v2_mega2560.hex contains 261406 bytes
avrdude: reading on-chip flash data:
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0xe000
** 0xff != 0x0d**
avrdude: verification error; content mismatch
avrdude: safemode: Fuses OK
avrdude done. Thank you.

finally this msg came!!!

wat to do?

Attached file? Post the commend you've used. Which programmer you have? More than 1hr? Something went really wrong. It has no sense to wait so long.
Start again from the beginning. Be consistent in proceeding. First of all test the communication between the ATmega and programmer. You can test it with readings or just "do nothing" or -v command from the CMD (modify the command from the log) because writes wear MCU's FLASH memory. Whole memory should be readable without errors.
Read avrdude help for meaning of particular switches.

atmega2560 is getting detected.This is what coming wen i upload using BitBurner programmer using USBasp..(attached picture)!

"stk500boot_v2_mega2560.hex" this is the bootloader im uploading to flash of atmega2560 arduino board.

its failing to upload using ICSP pins.

help me?!

What are you trying to flash? It should be .hex file and not 'any' file. Are sure that the temp file is intel hex? Did you check the command? The HEX has some format and if it is not HEX it obtains rubbish.

Try it directly from command line:
avrdude -cUSBasp -pATmega2560 -vv for test if it can connect to the MCU**,**
avrdude -cUSBasp -pATmega2560 -Uflash:w:filename.hex:i for write, use the bootloader hex.
Try and post an output.

avrdude: verification error, first mismatch at byte 0xe000
0xff != 0x0d

This is probably OK, and a consequence of your programming being not-quite smart enough to handle the 256k of memory (since it failed in "verify" rather than during write.) Can you upload sketches now?

It's also possible that your programmer was able to erase your 2560, but not re-program the bootloader :frowning:

if i try to erase chip...programmer says "successful".

if i try to program any of the .hex file from the USBasp programmer it takes much longer time
and fails to upload.....and arduino 2560 board isn't responding at all but power led and led_pin13 is glowing.

is the chip gone damaged?!
or any soln?

May not be damaged. The L LED can glow due to oscillation on OA which drives LED. It can happen if the pin 13 is in tri-state so OA's input is in the 'air', e.g. no bootloader (raw chip symptom).

As @westfw wrote, it is possibe that your USBasp cannot handle 256k of memory. Check the web for similar problems, probably FW upgrade could solve it.
Try if it is able to upload ArduinoISP sketch to the Arduino via ISP. If yes, you could upgrade FW on the USBasp with the Arduino an then to bootload the Arduino with fixed USBasp. But be careful and check everything twice!!! Use readings first before you decide to write into USBasp!