Burning Bootloader into atmega2560 issue with usbasp??:(

hi,
im trying to burn bootloader into atmega2560 on my custom board using usbasp v2.0 programmer..
getting errors like
avrdude: AVR Part "{build.mcu}" not found.

Valid parts are:
uc3a0512 = AT32UC3A0512
c128 = AT90CAN128
c32 = AT90CAN32
c64 = AT90CAN64
pwm2 = AT90PWM2
pwm216 = AT90PWM216
pwm2b = AT90PWM2B
pwm3 = AT90PWM3
pwm316 = AT90PWM316
pwm3b = AT90PWM3B
1200 = AT90S1200
2313 = AT90S2313
2333 = AT90S2333
2343 = AT90S2343
4414 = AT90S4414
4433 = AT90S4433
4434 = AT90S4434
8515 = AT90S8515
8535 = AT90S8535
usb1286 = AT90USB1286
usb1287 = AT90USB1287
usb162 = AT90USB162
usb646 = AT90USB646
usb647 = AT90USB647
usb82 = AT90USB82
m103 = ATmega103
m128 = ATmega128
m1280 = ATmega1280
m1281 = ATmega1281
m1284 = ATmega1284
m1284p = ATmega1284P
m1284rfr2 = ATmega1284RFR2
m128rfa1 = ATmega128RFA1
m128rfr2 = ATmega128RFR2
m16 = ATmega16
m161 = ATmega161
m162 = ATmega162
m163 = ATmega163
m164p = ATmega164P
m168 = ATmega168
m168p = ATmega168P
m168pb = ATmega168PB
m169 = ATmega169
m16u2 = ATmega16U2
m2560 = ATmega2560
m2561 = ATmega2561
m2564rfr2 = ATmega2564RFR2
m256rfr2 = ATmega256RFR2
m32 = ATmega32
m324p = ATmega324P
m324pa = ATmega324PA
m325 = ATmega325
m3250 = ATmega3250
m328 = ATmega328
m328p = ATmega328P
m329 = ATmega329
m3290 = ATmega3290
m3290p = ATmega3290P
m329p = ATmega329P
m32m1 = ATmega32M1
m32u2 = ATmega32U2
m32u4 = ATmega32U4
m406 = ATMEGA406
m48 = ATmega48
m48p = ATmega48P
m48pb = ATmega48PB
m64 = ATmega64
m640 = ATmega640
m644 = ATmega644
m644p = ATmega644P
m644rfr2 = ATmega644RFR2
m645 = ATmega645
m6450 = ATmega6450
m649 = ATmega649
m6490 = ATmega6490
m64rfr2 = ATmega64RFR2
m8 = ATmega8
m8515 = ATmega8515
m8535 = ATmega8535
m88 = ATmega88
m88p = ATmega88P
m88pb = ATmega88PB
m8u2 = ATmega8U2
t10 = ATtiny10
t11 = ATtiny11
t12 = ATtiny12
t13 = ATtiny13
t15 = ATtiny15
t1634 = ATtiny1634
t20 = ATtiny20
t2313 = ATtiny2313
t24 = ATtiny24
t25 = ATtiny25
t26 = ATtiny26
t261 = ATtiny261
t28 = ATtiny28
t4 = ATtiny4
t40 = ATtiny40
t4313 = ATtiny4313
t43u = ATtiny43u
t44 = ATtiny44
t45 = ATtiny45
t461 = ATtiny461
t5 = ATtiny5
t84 = ATtiny84
t85 = ATtiny85
t861 = ATtiny861
t88 = ATtiny88
t9 = ATtiny9
x128a1 = ATxmega128A1
x128a1d = ATxmega128A1revD
x128a1u = ATxmega128A1U
x128a3 = ATxmega128A3
x128a3u = ATxmega128A3U
x128a4 = ATxmega128A4
x128a4u = ATxmega128A4U
x128b1 = ATxmega128B1
x128b3 = ATxmega128B3
x128c3 = ATxmega128C3
x128d3 = ATxmega128D3
x128d4 = ATxmega128D4
x16a4 = ATxmega16A4
x16a4u = ATxmega16A4U
x16c4 = ATxmega16C4
x16d4 = ATxmega16D4
x16e5 = ATxmega16E5
x192a1 = ATxmega192A1
x192a3 = ATxmega192A3
x192a3u = ATxmega192A3U
x192c3 = ATxmega192C3
x192d3 = ATxmega192D3
x256a1 = ATxmega256A1
x256a3 = ATxmega256A3
x256a3b = ATxmega256A3B
x256a3bu = ATxmega256A3BU
x256a3u = ATxmega256A3U
x256c3 = ATxmega256C3
x256d3 = ATxmega256D3
x32a4 = ATxmega32A4
x32a4u = ATxmega32A4U
x32c4 = ATxmega32C4
x32d4 = ATxmega32D4
x32e5 = ATxmega32E5
x384c3 = ATxmega384C3
x384d3 = ATxmega384D3
x64a1 = ATxmega64A1
x64a1u = ATxmega64A1U
x64a3 = ATxmega64A3
x64a3u = ATxmega64A3U
x64a4 = ATxmega64A4
x64a4u = ATxmega64A4U
x64b1 = ATxmega64B1
x64b3 = ATxmega64B3
x64c3 = ATxmega64C3
x64d3 = ATxmega64D3
x64d4 = ATxmega64D4
x8e5 = ATxmega8E5
ucr2 = deprecated, use 'uc3a0512'

Error while burning bootloader.

actually i follwed below procedure
Re: Problems with programming ATMEGA2560 using USBasp / Arduino as ISP
#5
Oct 30, 2015, 06:41 pm
It's working! Can't believe it ^^ It was in fact just a problem with the fuses as discussed in the link I posted.

Here's the complete fix step b step for future reference since I as a beginner had some trouble following it correctly:

  1. Copy the code from this post

  2. Go to C:\Program Files (x86)\Arduino\hardware\arduino\avr (or whereever Arduino is installed on your computer)

  3. Open the boards.txt in that folder and paste the code in it, save the file (you might have to remove write protection)

  4. Restart Arduino IDE

  5. Now there should be an additional processor available under tools/processor called "ATmega2560 (Testato ISP Version", select that processor

  6. Burn the bootloader once with these settings

  7. That's it! Now uploading sketches with USBasp works flawlessly :slight_smile:

Thanks go out to Testato and NicoHood for figuring out this fix!

can u plz tell me ...why im getting those errors

sailaja:

  1. Copy the code from this post

Post a link to that thread. Please use the chain links icon on the toolbar when you post links to make them clickable.

sailaja:
2. Go to C:\Program Files (x86)\Arduino\hardware\arduino\avr (or whereever Arduino is installed on your computer)

  1. Open the boards.txt in that folder and paste the code in it, save the file (you might have to remove write protection)

That's not really a good idea because you will lose any changes you have made to that file anytime you upgrade to a new version of Arduino IDE or Arduino AVR Boards. Also, if you have updated Arduino AVR Boards using Boards Manager then the files at that location will not even be in use so editing them will have no effect (though I don't think that has happened in this case). If you want to modify or add a boards definition then the best approach is to create a custom hardware package at {sketchbook}/hardware. By doing that your work will not be lost after an update and you will also not risk messing up Arduino AVR Boards.

"avrdude: AVR Part "{build.mcu}" not found."

I think that means that the board type you selected is not properly defined. What board did you select? It should probably be:
Board: "Arduino/Genuino Mega or Mega 2560"
Processor: "ATmega 2560 (Mega 2560)"

i added folllwing post code in my boards.txt

then i got above error message

I can't reproduce the error. Make sure you copied all the code from that post, including this line:

mega.menu.cpu.atmega2560T.build.mcu=atmega2560

yes...i copied that code only....

parallely, i tried to burn bootloader into atmega2560 using arduino uno board as isp ...
i follwed below link

but im getting device signature issue while burning bootloader .....

avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.

Error while burning bootloader.
how to solve this device siggnature issue???....im using arduino ide 1.6.12

Please do this:

  • File > Preferences > Show verbose output during: > compilation (uncheck) > upload (check) > OK
  • Tools > Burn Bootloader
  • After the process fails you’ll see a button on the right side of the orange bar “Copy error messages”. Click that button.
  • Paste the error messages in a reply here USING CODE TAGS (</> button on the toolbar).

</Arduino: 1.6.12 (Windows 7), Board: “Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)”

C:\Program Files\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -cstk500v1 -PCOM12 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xD9:m -Ulfuse:w:0xFF:m

avrdude: Version 6.3, compiled on Sep 12 2016 at 17:24:16
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is “C:\Program Files\Arduino\hardware\tools\avr/etc/avrdude.conf”

Using Port : COM12
Using Programmer : stk500v1
Overriding Baud Rate : 19200
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 : STK500
Description : Atmel STK500 Version 1.x firmware
Hardware Version: 2
Firmware Version: 1.18
Topcard : Unknown
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000 (retrying)

Error while burning bootloader.
Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.

avrdude done. Thank you.

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.
/>

i got above message....but it is displaying error while bootloading in redcolor...what i have to consider...again it is signature issue :frowning:

plz clarify my doubt

"avrdude: Device signature = 0x000000 (retrying)"

Common causes:

  1. Wiring error. Bad connection on any of the five ICSP wires.
  2. Target MPU doesn't have a working system clock. This is usually because the chip has been told to use an external crystal but there is no crystal (or resonator) attached.

Does the target board have a crystal? If not, #2 is probably your problem.

hi,
i cross checked all connections ...
then again burned bootloader...getting error

Arduino: 1.6.12 (Windows 7), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

C:\Program Files\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -cstk500v1 -PCOM11 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xD8:m -Ulfuse:w:0xFF:m 

avrdude: Version 6.3, compiled on Sep 12 2016 at 17:24:16
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Program Files\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM11
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         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 : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Error while burning bootloader.
Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x0000ff
avrdude: Expected signature for ATmega2560 is 1E 98 01
         Double check chip, or use -F to override this check.

avrdude done.  Thank you.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

im not getting where exact problem coming?

my custom board has crystal oscillator 16mhz....

can u please tel me the solution for above problem?

avrdude: Device signature = 0x0000ff
avrdude: Expected signature for ATmega2560 is 1E 98 01

Still getting a bad signature so the problem is probably still the same:

  1. Wiring error. Bad connection on any of the five ICSP wires.
  2. Target MPU system clock.

Has this custom board EVER worked?

Do you have an oscilloscope so you can check that the crystal oscillator is working?

If not, you could try this modified ArduinoISP sketch from adafruit: GitHub - adafruit/ArduinoISP: A fork of the ArduinoISP that has 8mhz output clock Use this in place of the ArduinoISP sketch to generate an 8 MHz clock on Pin 9. Connect Pin 9 of the ISP Arduino to pin 34 (XTAL1) of the ATmega2560. That will force the clock to allow programming even if the crystal has failed.

You could try moving the ATmega2560 from a working Arduino Mega 2560 to your custom board. That way you can continue to test the board without needing the ICSP feature. If the transplanted processor doesn't work you can get to debugging the board.

can u plz post any practical example link... for below process wat u hv mentioned previously...
Use this in place of the ArduinoISP sketch to generate an 8 MHz clock on Pin 9. Connect Pin 9 of the ISP Arduino to pin 34 (XTAL1) of the ATmega2560. That will force the clock to allow programming even if the crystal has failed.

You could try moving the ATmega2560 from a working Arduino Mega 2560 to your custom board. That way you can continue to test the board without needing the ICSP feature. If the transplanted processor doesn't work you can get to debugging the board.