I am trying to upload the Arduino bootloader on a custom PCB with MEGA2560. The configuration of this board is minimal and is using the same scheme of official Arduino Mega2560.
1 - Upload the ArduinoISP sketch on the programmer
2 - Upload the bootloader on the target. I received this error:
avrdude: verification error, first mismatch at byte 0x1e000
0xff != 0x0d
avrdude: verification error; content mismatch
After that, led 13 continuosly blinks 2 times and half second delay.
I also tried to:
Use 10uF cap on reset. Same error.
Change the IDE version (.022, 0.23)- Same Error
Use the ZIF socket to program a brand new ATmega328. It works with no problems. (programmer looks to work).
Ignore the error and tried to program a sketch. The upload finished without problems with every example sketch I tried, but the board does not work at all (every led is off and rx/tx does not work).
Mirko76:
avrdude: verification error, first mismatch at byte 0x1e000
0xff != 0x0d
avrdude: verification error; content mismatch
In my case that meant "You didn't disable auto-reset on the Arduino running ArduinoISP."
I'm a little surprised that ArduinoISP would work on an ATmega2560. The 2560 needs the STK500 V2 protocol to handle the larger memory size. If you are designing custom Arduino clones you should probably invest in a hardware ISP programmer. You can get the USBasp for under $10.
i was to try tutorial from http://www.gammon.com.au/forum/?id=11635
i was download "Atmega_Board_Programmer" and place it on library folder of arduino.
then i run arduino ide..open example "Atmega_Boot_Programmer"..but when i compile i get an error like this:
Atmega_Board_Programmer\md5.c.o: In function md5_starts': C:\Users\micosoft\Desktop\arduino-1.0.4\libraries\Atmega_Board_Programmer/md5.c:40: multiple definition of md5_starts'
md5.c.o:C:\Users\micosoft\AppData\Local\Temp\build1166844666296615961.tmp/md5.c:40: first defined here
Atmega_Board_Programmer\md5.c.o: In function md5_process': C:\Users\micosoft\Desktop\arduino-1.0.4\libraries\Atmega_Board_Programmer/md5.c:51: multiple definition of md5_process'
md5.c.o:C:\Users\micosoft\AppData\Local\Temp\build1166844666296615961.tmp/md5.c:51: first defined here
Atmega_Board_Programmer\md5.c.o: In function md5_update': C:\Users\micosoft\Desktop\arduino-1.0.4\libraries\Atmega_Board_Programmer/md5.c:174: multiple definition of md5_update'
md5.c.o:C:\Users\micosoft\AppData\Local\Temp\build1166844666296615961.tmp/md5.c:174: first defined here
Atmega_Board_Programmer\md5.c.o: In function md5_finish': C:\Users\micosoft\Desktop\arduino-1.0.4\libraries\Atmega_Board_Programmer/md5.c:221: multiple definition of md5_finish'
md5.c.o:C:\Users\micosoft\AppData\Local\Temp\build1166844666296615961.tmp/md5.c:221: first defined here
testes88:
i was to try tutorial from Gammon Forum : Electronics : Microprocessors : Atmega bootloader programmer
i was download "Atmega_Board_Programmer" and place it on library folder of arduino.
then i run arduino ide..open example "Atmega_Boot_Programmer"..but when i compile i get an error like this:
Atmega_Board_Programmer\md5.c.o: In function md5_starts': C:\Users\micosoft\Desktop\arduino-1.0.4\libraries\Atmega_Board_Programmer/md5.c:40: multiple definition of md5_starts'
md5.c.o:C:\Users\micosoft\AppData\Local\Temp\build1166844666296615961.tmp/md5.c:40: first defined here
Atmega_Board_Programmer\md5.c.o: In function md5_process': C:\Users\micosoft\Desktop\arduino-1.0.4\libraries\Atmega_Board_Programmer/md5.c:51: multiple definition of md5_process'
md5.c.o:C:\Users\micosoft\AppData\Local\Temp\build1166844666296615961.tmp/md5.c:51: first defined here
Atmega_Board_Programmer\md5.c.o: In function md5_update': C:\Users\micosoft\Desktop\arduino-1.0.4\libraries\Atmega_Board_Programmer/md5.c:174: multiple definition of md5_update'
md5.c.o:C:\Users\micosoft\AppData\Local\Temp\build1166844666296615961.tmp/md5.c:174: first defined here
Atmega_Board_Programmer\md5.c.o: In function md5_finish': C:\Users\micosoft\Desktop\arduino-1.0.4\libraries\Atmega_Board_Programmer/md5.c:221: multiple definition of md5_finish'
md5.c.o:C:\Users\micosoft\AppData\Local\Temp\build1166844666296615961.tmp/md5.c:221: first defined here
what's wrong i'm doing??
please help...
you need to rename md5.c to md5.cpp and then you get error "onli"
md5.cpp: In function 'void md5_update(md5_context*, unsigned char*, long unsigned int)':
md5.cpp:191: error: 'memcpy' was not declared in this scope
md5.cpp:208: error: 'memcpy' was not declared in this scope