Closed mcuee closed 2 years ago
how do you flash it? do you set the fuses for bootloader location?
First try using usbasp under Arduino 1.8.19 -- this does not seem to work. So I thought it was related to my usbasp clone.
C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino18/bin/avrdude -CC:\Users\xiaof\AppData\Local\Arduino15\packages\MegaCore\hardware\avr\2.1.3/avrdude.conf -v -patmega2560 -cusbasp -Pusb -e -Ulock:w:0x3f:m -Uefuse:w:0xfd:m -Uhfuse:w:0b11010110:m -Ulfuse:w:0xf7:m
avrdude: Version 6.3-20201216
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\xiaof\AppData\Local\Arduino15\packages\MegaCore\hardware\avr\2.1.3/avrdude.conf"
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: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: program enable: target doesn't answer. 0
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
Error while burning bootloader.
Second try using avrdude and AVR Dragon. The programming is okay but the result is not good -- no LED flashing, Arduino or avrdude can not communicate with the board.
PS C:\work\avr\avrdude_test\avrdude-v7.0-windows-x64> .\avrdude.exe -v -patmega2560 -cdragon_isp -e -Ulock:w:0x3f:m -Uefuse:w:0xfd:m -Uhfuse:w:0b11010110:m -Ulfuse:w:0xf7:m
avrdude.exe: Version 7.0
Copyright (c) Brian Dean, http://www.bdmicro.com/
Copyright (c) Joerg Wunsch
System wide configuration file is "C:/work/avr/avrdude_test/avrdude-v7.0-windows-x64/avrdude.conf"
Using Port : usb
Using Programmer : dragon_isp
avrdude.exe: usbdev_open(): Found AVRDRAGON, serno: 00A200001487
JTAG ICE mkII sign-on message:
Communications protocol version: 1
M_MCU:
boot-loader FW version: 255
firmware version: 7.39
hardware version: 1
S_MCU:
boot-loader FW version: 255
firmware version: 7.39
hardware version: 2
Serial number: 00:a2:00:00:14:87
Device ID: AVRDRAGON
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
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Alias 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 1 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 1 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 1 0 0 0 0x00 0x00
Programmer Type : DRAGON_ISP
Description : Atmel AVR Dragon in ISP mode
Vtarget : 4.9 V
SCK period : 1.00 us
avrdude.exe: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.15s
avrdude.exe: Device signature = 0x1e9801 (probably m2560)
avrdude.exe: erasing chip
avrdude.exe: reading input file "0x3f"
avrdude.exe: writing lock (1 bytes):
Writing | ################################################## | 100% 0.06s
avrdude.exe: 1 bytes of lock written
avrdude.exe: verifying lock memory against 0x3f:
Reading | ################################################## | 100% 0.05s
avrdude.exe: WARNING: ignoring mismatch in unused bits of "lock"
(0xff != 0x3f). To prevent this warning set unused bits
to 1 when writing (double check with your datasheet first).
avrdude.exe: 1 bytes of lock verified
avrdude.exe: reading input file "0xfd"
avrdude.exe: writing efuse (1 bytes):
Writing | ################################################## | 100% 0.06s
avrdude.exe: 1 bytes of efuse written
avrdude.exe: verifying efuse memory against 0xfd:
Reading | ################################################## | 100% 0.05s
avrdude.exe: 1 bytes of efuse verified
avrdude.exe: reading input file "0b11010110"
avrdude.exe: writing hfuse (1 bytes):
Writing | ################################################## | 100% 0.06s
avrdude.exe: 1 bytes of hfuse written
avrdude.exe: verifying hfuse memory against 0b11010110:
Reading | ################################################## | 100% 0.05s
avrdude.exe: 1 bytes of hfuse verified
avrdude.exe: reading input file "0xf7"
avrdude.exe: writing lfuse (1 bytes):
Writing | ################################################## | 100% 0.06s
avrdude.exe: 1 bytes of lfuse written
avrdude.exe: verifying lfuse memory against 0xf7:
Reading | ################################################## | 100% 0.05s
avrdude.exe: 1 bytes of lfuse verified
avrdude.exe done. Thank you.
PS C:\work\avr\avrdude_test\avrdude-v7.0-windows-x64> .\avrdude.exe -v -patmega2560 -cdragon_isp -U flash:w:.\optiboot_flash_atmega2560_UART0_115200_16000000L_B7_BIGBOOT.hex
avrdude.exe: Version 7.0
Copyright (c) Brian Dean, http://www.bdmicro.com/
Copyright (c) Joerg Wunsch
System wide configuration file is "C:/work/avr/avrdude_test/avrdude-v7.0-windows-x64/avrdude.conf"
Using Port : usb
Using Programmer : dragon_isp
avrdude.exe: usbdev_open(): Found AVRDRAGON, serno: 00A200001487
JTAG ICE mkII sign-on message:
Communications protocol version: 1
M_MCU:
boot-loader FW version: 255
firmware version: 7.39
hardware version: 1
S_MCU:
boot-loader FW version: 255
firmware version: 7.39
hardware version: 2
Serial number: 00:a2:00:00:14:87
Device ID: AVRDRAGON
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
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Alias 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 1 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 1 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 1 0 0 0 0x00 0x00
Programmer Type : DRAGON_ISP
Description : Atmel AVR Dragon in ISP mode
Vtarget : 4.9 V
SCK period : 1.00 us
avrdude.exe: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.15s
avrdude.exe: Device signature = 0x1e9801 (probably m2560)
avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude.exe: erasing chip
avrdude.exe: reading input file ".\optiboot_flash_atmega2560_UART0_115200_16000000L_B7_BIGBOOT.hex"
avrdude.exe: input file .\optiboot_flash_atmega2560_UART0_115200_16000000L_B7_BIGBOOT.hex auto detected as raw binary
avrdude.exe: writing flash (236480 bytes):
Writing | ################################################## | 100% 108.14s
avrdude.exe: 236480 bytes of flash written
avrdude.exe: verifying flash memory against .\optiboot_flash_atmega2560_UART0_115200_16000000L_B7_BIGBOOT.hex:
avrdude.exe: input file .\optiboot_flash_atmega2560_UART0_115200_16000000L_B7_BIGBOOT.hex auto detected as raw binary
Reading | ################################################## | 100% 109.06s
avrdude.exe: 236480 bytes of flash verified
avrdude.exe done. Thank you.
Result using avrdue and Arduino is the same after the above bootloader programming using AVR Dragon.
PS C:\work\avr\avrdude_test\avrdude-v7.0-windows-x64> .\avrdude.exe -p atmega2560 -c arduino -P COM9 -vv
avrdude.exe: Version 7.0
Copyright (c) Brian Dean, http://www.bdmicro.com/
Copyright (c) Joerg Wunsch
System wide configuration file is "C:/work/avr/avrdude_test/avrdude-v7.0-windows-x64/avrdude.conf"
Using Port : COM9
Using Programmer : arduino
avrdude.exe: ser_recv(): programmer is not responding
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude.exe: ser_recv(): programmer is not responding
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
...
No issue with another bootloader file here. I can upload the blink sketch after flashing the bootloader and then the LED will blink. https://github.com/avrdudes/avrdude/discussions/940#discussioncomment-2928411 https://github.com/avrdudes/avrdude/files/8882669/atmega2560_v3.txt
PS C:\work\avr\avrdude_test\avrdude-v7.0-windows-x64> .\avrdude.exe -p atmega2560 -c usbasp -U .\atmega2560_sr940_v3.hex -v
avrdude.exe: Version 7.0
Copyright (c) Brian Dean, http://www.bdmicro.com/
Copyright (c) Joerg Wunsch
System wide configuration file is "C:/work/avr/avrdude_test/avrdude-v7.0-windows-x64/avrdude.conf"
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
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Alias 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 1 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 1 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 1 0 0 0 0x00 0x00
Programmer Type : usbasp
Description : USBasp, http://www.fischl.de/usbasp/
avrdude.exe: auto set sck period (because given equals null)
avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update.
avrdude.exe: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude.exe: Device signature = 0x1e9801 (probably m2560)
avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude.exe: erasing chip
avrdude.exe: auto set sck period (because given equals null)
avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update.
avrdude.exe: reading input file ".\atmega2560_sr940_v3.hex"
avrdude.exe: input file .\atmega2560_sr940_v3.hex auto detected as Intel Hex
avrdude.exe: writing flash (262144 bytes):
Writing | ################################################## | 100% 0.00s
avrdude.exe: 262144 bytes of flash written
avrdude.exe: verifying flash memory against .\atmega2560_sr940_v3.hex:
avrdude.exe: input file .\atmega2560_sr940_v3.hex auto detected as Intel Hex
Reading | ################################################## | 100% 0.00s
avrdude.exe: 262144 bytes of flash verified
avrdude.exe done. Thank you.
PS C:\work\avr\avrdude_test\avrdude-v7.0-windows-x64> .\avrdude.exe -v -p atmega2560 -c arduino -P COM9 -D -U .\Blink.ino.mega.hex
avrdude.exe: Version 7.0
Copyright (c) Brian Dean, http://www.bdmicro.com/
Copyright (c) Joerg Wunsch
System wide configuration file is "C:/work/avr/avrdude_test/avrdude-v7.0-windows-x64/avrdude.conf"
Using Port : COM9
Using Programmer : arduino
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
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Alias 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 1 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 1 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 1 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino
Hardware Version: 7
Firmware Version: 7.6
avrdude.exe: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude.exe: Device signature = 0x1e9801 (probably m2560)
avrdude.exe: reading input file ".\Blink.ino.mega.hex"
avrdude.exe: input file .\Blink.ino.mega.hex auto detected as Intel Hex
avrdude.exe: writing flash (1536 bytes):
Writing | ################################################## | 100% 0.22s
avrdude.exe: 1536 bytes of flash written
avrdude.exe: verifying flash memory against .\Blink.ino.mega.hex:
avrdude.exe: input file .\Blink.ino.mega.hex auto detected as Intel Hex
Reading | ################################################## | 100% 0.16s
avrdude.exe: 1536 bytes of flash verified
avrdude.exe done. Thank you.
No issues with Arduino either.
avrdude: Version 6.3-20201216
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\xiaof\AppData\Local\Arduino15\packages\MegaCore\hardware\avr\2.1.3/avrdude.conf"
Using Port : COM9
Using Programmer : arduino
Overriding Baud Rate : 115200
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 : Arduino
Description : Arduino
Hardware Version: 7
Firmware Version: 7.6
Vtarget : 0.7 V
Varef : 0.7 V
Oscillator : 450.000 Hz
SCK period : 7.6 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9801 (probably m2560)
avrdude: reading input file "C:\Users\xiaof\AppData\Local\Temp\arduino_build_382917/Blink.ino.hex"
avrdude: writing flash (1646 bytes):
Writing | ################################################## | 100% 0.25s
avrdude: 1646 bytes of flash written
avrdude: verifying flash memory against C:\Users\xiaof\AppData\Local\Temp\arduino_build_382917/Blink.ino.hex:
avrdude: load data flash data from input file C:\Users\xiaof\AppData\Local\Temp\arduino_build_382917/Blink.ino.hex:
avrdude: input file C:\Users\xiaof\AppData\Local\Temp\arduino_build_382917/Blink.ino.hex contains 1646 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.19s
avrdude: verifying ...
avrdude: 1646 bytes of flash verified
avrdude done. Thank you.
Not so sure this is related to previous report here. Probably not the same since I can program the bootloader just fine.
you use "Burn Bootloader" in Arduino IDE Tools menu?
you use "Burn Bootloader" in Arduino IDE Tools menu?
Yes and it does not work. Run log here:
@JAndrassy I tried your repo as well and it has the same problem with usbasp. I think this is probbaly due to the avrdude version and my usbasp clone, and not exactly related to this issue.
C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega2560 -cusbasp -Pusb -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xD6:m -Ulfuse:w:0xFF:m
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
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: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: program enable: target doesn't answer. 0
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
Error while burning bootloader.
@JAndrassy Using your bootlaoder here ( https://github.com/JAndrassy/my_boards/blob/master/avr/bootloaders/optiboot8/optiboot_atmega2560.hex ), it has some problem as well under Arduino and avrdude.
PS C:\work\avr\avrdude_test\avrdude-v7.0-windows-x64> .\avrdude.exe -v -patmega2560 -cusbasp -Pusb -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xD6:m -Ulfuse:w:0xFF:m
avrdude.exe: Version 7.0
Copyright (c) Brian Dean, http://www.bdmicro.com/
Copyright (c) Joerg Wunsch
System wide configuration file is "C:/work/avr/avrdude_test/avrdude-v7.0-windows-x64/avrdude.conf"
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
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Alias 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 1 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 1 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 1 0 0 0 0x00 0x00
Programmer Type : usbasp
Description : USBasp, http://www.fischl.de/usbasp/
avrdude.exe: auto set sck period (because given equals null)
avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update.
avrdude.exe: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude.exe: Device signature = 0x1e9801 (probably m2560)
avrdude.exe: erasing chip
avrdude.exe: auto set sck period (because given equals null)
avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update.
avrdude.exe: reading input file "0x3F"
avrdude.exe: writing lock (1 bytes):
Writing | | 0% 0.00s ***failed;
Writing | ################################################## | 100% 0.06s
avrdude.exe: 1 bytes of lock written
avrdude.exe: verifying lock memory against 0x3F:
Reading | ################################################## | 100% 0.00s
avrdude.exe: WARNING: ignoring mismatch in unused bits of "lock"
(0xff != 0x3f). To prevent this warning set unused bits
to 1 when writing (double check with your datasheet first).
avrdude.exe: 1 bytes of lock verified
avrdude.exe: reading input file "0xFD"
avrdude.exe: writing efuse (1 bytes):
Writing | ################################################## | 100% 0.00s
avrdude.exe: 1 bytes of efuse written
avrdude.exe: verifying efuse memory against 0xFD:
Reading | ################################################## | 100% 0.00s
avrdude.exe: 1 bytes of efuse verified
avrdude.exe: reading input file "0xD6"
avrdude.exe: writing hfuse (1 bytes):
Writing | ################################################## | 100% 0.00s
avrdude.exe: 1 bytes of hfuse written
avrdude.exe: verifying hfuse memory against 0xD6:
Reading | ################################################## | 100% 0.00s
avrdude.exe: 1 bytes of hfuse verified
avrdude.exe: reading input file "0xFF"
avrdude.exe: writing lfuse (1 bytes):
Writing | ################################################## | 100% 0.00s
avrdude.exe: 1 bytes of lfuse written
avrdude.exe: verifying lfuse memory against 0xFF:
Reading | ################################################## | 100% 0.00s
avrdude.exe: 1 bytes of lfuse verified
avrdude.exe done. Thank you.
PS C:\work\avr\avrdude_test\avrdude-v7.0-windows-x64> .\avrdude.exe -v -patmega2560 -cusbasp -Pusb -U .\optiboot_atmega2560_myboard.hex
avrdude.exe: Version 7.0
Copyright (c) Brian Dean, http://www.bdmicro.com/
Copyright (c) Joerg Wunsch
System wide configuration file is "C:/work/avr/avrdude_test/avrdude-v7.0-windows-x64/avrdude.conf"
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
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Alias 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 1 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 1 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 1 0 0 0 0x00 0x00
Programmer Type : usbasp
Description : USBasp, http://www.fischl.de/usbasp/
avrdude.exe: auto set sck period (because given equals null)
avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update.
avrdude.exe: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude.exe: Device signature = 0x1e9801 (probably m2560)
avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude.exe: erasing chip
avrdude.exe: auto set sck period (because given equals null)
avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update.
avrdude.exe: reading input file ".\optiboot_atmega2560_myboard.hex"
avrdude.exe: input file .\optiboot_atmega2560_myboard.hex auto detected as Intel Hex
avrdude.exe: writing flash (262144 bytes):
Writing | ################################################## | 100% 0.00s
avrdude.exe: 262144 bytes of flash written
avrdude.exe: verifying flash memory against .\optiboot_atmega2560_myboard.hex:
avrdude.exe: input file .\optiboot_atmega2560_myboard.hex auto detected as Intel Hex
Reading | ################################################## | 100% 0.00s
avrdude.exe: 262144 bytes of flash verified
avrdude.exe done. Thank you.
PS C:\work\avr\avrdude_test\avrdude-v7.0-windows-x64> .\avrdude.exe -v -p atmega2560 -c arduino -P COM9 -D -U .\Blink.ino.mega.hex
avrdude.exe: Version 7.0
Copyright (c) Brian Dean, http://www.bdmicro.com/
Copyright (c) Joerg Wunsch
System wide configuration file is "C:/work/avr/avrdude_test/avrdude-v7.0-windows-x64/avrdude.conf"
Using Port : COM9
Using Programmer : arduino
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
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Alias 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 1 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 1 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 1 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino
Hardware Version: 3
Firmware Version: 8.0
avrdude.exe: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude.exe: Device signature = 0x1e9801 (probably m2560)
avrdude.exe: reading input file ".\Blink.ino.mega.hex"
avrdude.exe: input file .\Blink.ino.mega.hex auto detected as Intel Hex
avrdude.exe: writing flash (1536 bytes):
Writing | ################################################## | 100% 0.22s
avrdude.exe: 1536 bytes of flash written
avrdude.exe: verifying flash memory against .\Blink.ino.mega.hex:
avrdude.exe: input file .\Blink.ino.mega.hex auto detected as Intel Hex
Reading | ################################################## | 100% 0.16s
avrdude.exe: verification error, first mismatch at byte 0x0500
0xa1 != 0x80
avrdude.exe: verification error; content mismatch
avrdude.exe done. Thank you.
Error message under Arduino.
C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega2560 -carduino -PCOM9 -b115200 -D -Uflash:w:C:\Users\xiaof\AppData\Local\Temp\arduino_build_149642/Blink.ino.hex:i
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : COM9
Using Programmer : arduino
Overriding Baud Rate : 115200
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 : Arduino
Description : Arduino
Hardware Version: 3
Firmware Version: 8.0
Vtarget : 0.3 V
Varef : 0.3 V
Oscillator : 28.800 kHz
SCK period : 3.3 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9801 (probably m2560)
avrdude: reading input file "C:\Users\xiaof\AppData\Local\Temp\arduino_build_149642/Blink.ino.hex"
avrdude: writing flash (1536 bytes):
Writing | ################################################## | 100% 0.22s
avrdude: 1536 bytes of flash written
avrdude: verifying flash memory against C:\Users\xiaof\AppData\Local\Temp\arduino_build_149642/Blink.ino.hex:
avrdude: load data flash data from input file C:\Users\xiaof\AppData\Local\Temp\arduino_build_149642/Blink.ino.hex:
avrdude: input file C:\Users\xiaof\AppData\Local\Temp\arduino_build_149642/Blink.ino.hex contains 1536 bytes
avrdude: reading on-chip flash data:
Reading | #################################An error occurred while uploading the sketch
################# | 100% 0.16s
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0300
0x00 != 0xb0
avrdude: verification error; content mismatch
avrdude done. Thank you.
``
Using another usbasp clone seems to be better and it works with the bootloader uploading with https://github.com/JAndrassy/my_boards
C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega2560 -cusbasp -Pusb -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xD6:m -Ulfuse:w:0xFF:m
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
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.01s
avrdude: Device signature = 0x1e9801 (probably m2560)
avrdude: erasing chip
avrdude: auto set sck period (because given equals null)
avrdude: reading input file "0x3F"
avrdude: writing lock (1 bytes):
C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega2560 -cusbasp -Pusb -Uflash:w:C:\Users\xiaof\Documents\Arduino\hardware\my_boards\avr/bootloaders/optiboot8/optiboot_atmega2560.hex:i -Ulock:w:0x0F:m
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : usb
Using Programmer : usbasp
Writing | ################################################## | 100% 0.00s
avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x3F:
avrdude: load data lock data from input file 0x3F:
avrdude: input file 0x3F contains 1 bytes
avrdude: reading on-chip lock data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of lock verified
avrdude: reading input file "0xFD"
avrdude: writing efuse (1 bytes):
Writing | ################################################## | 100% 0.00s
avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0xFD:
avrdude: load data efuse data from input file 0xFD:
avrdude: input file 0xFD contains 1 bytes
avrdude: reading on-chip efuse data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of efuse verified
avrdude: reading input file "0xD6"
avrdude: writing hfuse (1 bytes):
Writing | ################################################## | 100% 0.00s
avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xD6:
avrdude: load data hfuse data from input file 0xD6:
avrdude: input file 0xD6 contains 1 bytes
avrdude: reading on-chip hfuse data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xFF"
avrdude: writing lfuse (1 bytes):
Writing | ################################################## | 100% 0.00s
avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xFF:
avrdude: load data lfuse data from input file 0xFF:
avrdude: input file 0xFF contains 1 bytes
avrdude: reading on-chip lfuse data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of lfuse verified
avrdude done. Thank you.
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 (probably m2560)
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 "C:\Users\xiaof\Documents\Arduino\hardware\my_boards\avr/bootloaders/optiboot8/optiboot_atmega2560.hex"
avrdude: writing flash (262144 bytes):
Writing | ################################################## | 100% 0.00s
avrdude: 262144 bytes of flash written
avrdude: verifying flash memory against C:\Users\xiaof\Documents\Arduino\hardware\my_boards\avr/bootloaders/optiboot8/optiboot_atmega2560.hex:
avrdude: load data flash data from input file C:\Users\xiaof\Documents\Arduino\hardware\my_boards\avr/bootloaders/optiboot8/optiboot_atmega2560.hex:
avrdude: input file C:\Users\xiaof\Documents\Arduino\hardware\my_boards\avr/bootloaders/optiboot8/optiboot_atmega2560.hex contains 262144 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% -0.00s
avrdude: verifying ...
avrdude: 262144 bytes of flash verified
avrdude: reading input file "0x0F"
avrdude: writing lock (1 bytes):
Writing | ################################################## | 100% 0.01s
avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x0F:
avrdude: load data lock data from input file 0x0F:
avrdude: input file 0x0F contains 1 bytes
avrdude: reading on-chip lock data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of lock verified
avrdude done. Thank you.
Uploading still failed.
C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\xiaof\AppData\Local\Arduino15\packages -hardware C:\Users\xiaof\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\xiaof\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\xiaof\Documents\Arduino\libraries -fqbn=my_boards:avr:mega -vid-pid=1A86_7523 -ide-version=10819 -build-path C:\Users\xiaof\AppData\Local\Temp\arduino_build_326376 -warnings=none -build-cache C:\Users\xiaof\AppData\Local\Temp\arduino_cache_298037 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.arduinoOTA.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avrdude.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -verbose C:\Users\xiaof\Documents\Arduino\Mega2560\Blink1\Blink1.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\xiaof\AppData\Local\Arduino15\packages -hardware C:\Users\xiaof\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\xiaof\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\xiaof\Documents\Arduino\libraries -fqbn=my_boards:avr:mega -vid-pid=1A86_7523 -ide-version=10819 -build-path C:\Users\xiaof\AppData\Local\Temp\arduino_build_326376 -warnings=none -build-cache C:\Users\xiaof\AppData\Local\Temp\arduino_cache_298037 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.arduinoOTA.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avrdude.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -verbose C:\Users\xiaof\Documents\Arduino\Mega2560\Blink1\Blink1.ino
Using board 'mega' from platform in folder: C:\Users\xiaof\Documents\Arduino\hardware\my_boards\avr
Using core 'arduino' from platform in folder: C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.5
Detecting libraries used...
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\mega" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\sketch\\Blink1.ino.cpp" -o nul
Generating function prototypes...
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\mega" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\sketch\\Blink1.ino.cpp" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\cores\\arduino" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.5\\variants\\mega" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\sketch\\Blink1.ino.cpp" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\sketch\\Blink1.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\xiaof\AppData\Local\Temp\arduino_cache_298037\core\core_my_boards_avr_mega_e639325a8fd780f7d0ea469b89cc152f.a
Linking everything together...
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega2560 -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376/Blink1.ino.elf" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\sketch\\Blink1.ino.cpp.o" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376/..\\arduino_cache_298037\\core\\core_my_boards_avr_mega_e639325a8fd780f7d0ea469b89cc152f.a" "-LC:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376" -lm
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O binary "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376/Blink1.ino.elf" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376/Blink1.ino.bin"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376/Blink1.ino.elf" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376/Blink1.ino.eep"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376/Blink1.ino.elf" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376/Blink1.ino.hex"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size" -A "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376/Blink1.ino.elf"
Sketch uses 1536 bytes (0%) of program storage space. Maximum is 261120 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 8183 bytes for local variables. Maximum is 8192 bytes.
C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega2560 -carduino -PCOM9 -b115200 -D -Uflash:w:C:\Users\xiaof\AppData\Local\Temp\arduino_build_326376/Blink1.ino.hex:i
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : COM9
Using Programmer : arduino
Overriding Baud Rate : 115200
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 : Arduino
Description : Arduino
Hardware Version: 3
Firmware Version: 8.0
Vtarget : 0.3 V
Varef : 0.3 V
Oscillator : 28.800 kHz
SCK period : 3.3 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9801 (probably m2560)
avrdude: reading input file "C:\Users\xiaof\AppData\Local\Temp\arduino_build_326376/Blink1.ino.hex"
avrdude: writing flash (1536 bytes):
Writing | ################################################## | 100% 0.22s
avrdude: 1536 bytes of flash written
avrdude: verifying flash memory against C:\Users\xiaof\AppData\Local\Temp\arduino_build_326376/Blink1.ino.hex:
avrdude: load data flash data from input file C:\Users\xiaof\AppData\Local\Temp\arduino_build_326376/Blink1.ino.hex:
avrdude: input file C:\Users\xiaof\AppData\Local\Temp\arduino_build_326376/Blink1.ino.hex contains 1536 bytes
avrdude: reading on-chip flash data:
Reading | #################################An error occurred while uploading the sketch
################# | 100% 0.16s
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0300
0x00 != 0xb0
avrdude: verification error; content mismatch
avrdude done. Thank you.
Even if I use usbasp to upload the sketech and use the bootloader to verify, it will fail.
PS C:\work\avr\avrdude_test\avrdude-v7.0-windows-x64> .\avrdude.exe -v -p atmega2560 -c usbasp -D -U .\Blink1.ino.arduino_mega.bin
avrdude.exe: Version 7.0
Copyright (c) Brian Dean, http://www.bdmicro.com/
Copyright (c) Joerg Wunsch
System wide configuration file is "C:/work/avr/avrdude_test/avrdude-v7.0-windows-x64/avrdude.conf"
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
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Alias 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 1 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 1 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 1 0 0 0 0x00 0x00
Programmer Type : usbasp
Description : USBasp, http://www.fischl.de/usbasp/
avrdude.exe: auto set sck period (because given equals null)
avrdude.exe: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude.exe: Device signature = 0x1e9801 (probably m2560)
avrdude.exe: reading input file ".\Blink1.ino.arduino_mega.bin"
avrdude.exe: input file .\Blink1.ino.arduino_mega.bin auto detected as raw binary
avrdude.exe: writing flash (1536 bytes):
Writing | ################################################## | 100% 0.47s
avrdude.exe: 1536 bytes of flash written
avrdude.exe: verifying flash memory against .\Blink1.ino.arduino_mega.bin:
avrdude.exe: input file .\Blink1.ino.arduino_mega.bin auto detected as raw binary
Reading | ################################################## | 100% 0.40s
avrdude.exe: 1536 bytes of flash verified
avrdude.exe done. Thank you.
PS C:\work\avr\avrdude_test\avrdude-v7.0-windows-x64> .\avrdude.exe -v -p atmega2560 -c arduino -D -U flash:v:.\Blink1.i
no.arduino_mega.bin
avrdude.exe: Version 7.0
Copyright (c) Brian Dean, http://www.bdmicro.com/
Copyright (c) Joerg Wunsch
System wide configuration file is "C:/work/avr/avrdude_test/avrdude-v7.0-windows-x64/avrdude.conf"
avrdude.exe: no port has been specified on the command line or in the config file
Specify a port using the -P option and try again
PS C:\work\avr\avrdude_test\avrdude-v7.0-windows-x64> .\avrdude.exe -v -p atmega2560 -c arduino -P COM9 -D -U flash:v:.\Blink1.ino.arduino_mega.bin
avrdude.exe: Version 7.0
Copyright (c) Brian Dean, http://www.bdmicro.com/
Copyright (c) Joerg Wunsch
System wide configuration file is "C:/work/avr/avrdude_test/avrdude-v7.0-windows-x64/avrdude.conf"
Using Port : COM9
Using Programmer : arduino
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
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Alias 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 1 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 1 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 1 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino
Hardware Version: 3
Firmware Version: 8.0
avrdude.exe: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude.exe: Device signature = 0x1e9801 (probably m2560)
avrdude.exe: verifying flash memory against .\Blink1.ino.arduino_mega.bin:
avrdude.exe: input file .\Blink1.ino.arduino_mega.bin auto detected as raw binary
Reading | ################################################## | 100% 0.16s
avrdude.exe: verification error, first mismatch at byte 0x0300
0x00 != 0xb0
avrdude.exe: verification error; content mismatch
avrdude.exe done. Thank you.
Going back to the MegaCore bootloader using the new usbasp, I can upgrade the bootloader now. After that I can upload the blinky sketch without an issue and the LED can blink.
C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino18/bin/avrdude -CC:\Users\xiaof\AppData\Local\Arduino15\packages\MegaCore\hardware\avr\2.1.3/avrdude.conf -v -patmega2560 -cusbasp -Pusb -e -Ulock:w:0x3f:m -Uefuse:w:0xfd:m -Uhfuse:w:0b11010110:m -Ulfuse:w:0xf7:m
avrdude: Version 6.3-20201216
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\xiaof\AppData\Local\Arduino15\packages\MegaCore\hardware\avr\2.1.3/avrdude.conf"
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 (probably m2560)
avrdude: erasing chip
avrdude: auto set sck period (because given equals null)
avrdude: reading input file "0x3f"
avrdude: writing lock (1 bytes):
C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino18/bin/avrdude -CC:\Users\xiaof\AppData\Local\Arduino15\packages\MegaCore\hardware\avr\2.1.3/avrdude.conf -v -patmega2560 -cusbasp -Pusb -Uflash:w:C:\Users\xiaof\AppData\Local\Arduino15\packages\MegaCore\hardware\avr\2.1.3/bootloaders/optiboot_flash/bootloaders/atmega2560/16000000L/optiboot_flash_atmega2560_UART0_115200_16000000L_B7_BIGBOOT.hex:i -Ulock:w:0x0f:m
avrdude: Version 6.3-20201216
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\xiaof\AppData\Local\Arduino15\packages\MegaCore\hardware\avr\2.1.3/avrdude.conf"
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
Writing | ################################################## | 100% 0.00s
avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x3f:
avrdude: load data lock data from input file 0x3f:
avrdude: input file 0x3f contains 1 bytes
avrdude: reading on-chip lock data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of lock verified
avrdude: reading input file "0xfd"
avrdude: writing efuse (1 bytes):
Writing | ################################################## | 100% 0.00s
avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0xfd:
avrdude: load data efuse data from input file 0xfd:
avrdude: input file 0xfd contains 1 bytes
avrdude: reading on-chip efuse data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of efuse verified
avrdude: reading input file "0b11010110"
avrdude: writing hfuse (1 bytes):
Writing | ################################################## | 100% 0.00s
avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0b11010110:
avrdude: load data hfuse data from input file 0b11010110:
avrdude: input file 0b11010110 contains 1 bytes
avrdude: reading on-chip hfuse data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xf7"
avrdude: writing lfuse (1 bytes):
Writing | ################################################## | 100% 0.01s
avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xf7:
avrdude: load data lfuse data from input file 0xf7:
avrdude: input file 0xf7 contains 1 bytes
avrdude: reading on-chip lfuse data:
Reading | ################################################## | 100% -0.00s
avrdude: verifying ...
avrdude: 1 bytes of lfuse verified
avrdude done. Thank you.
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 (probably m2560)
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 "C:\Users\xiaof\AppData\Local\Arduino15\packages\MegaCore\hardware\avr\2.1.3/bootloaders/optiboot_flash/bootloaders/atmega2560/16000000L/optiboot_flash_atmega2560_UART0_115200_16000000L_B7_BIGBOOT.hex"
avrdude: writing flash (262144 bytes):
Writing | ################################################## | 100% 0.00s
avrdude: 262144 bytes of flash written
avrdude: verifying flash memory against C:\Users\xiaof\AppData\Local\Arduino15\packages\MegaCore\hardware\avr\2.1.3/bootloaders/optiboot_flash/bootloaders/atmega2560/16000000L/optiboot_flash_atmega2560_UART0_115200_16000000L_B7_BIGBOOT.hex:
avrdude: load data flash data from input file C:\Users\xiaof\AppData\Local\Arduino15\packages\MegaCore\hardware\avr\2.1.3/bootloaders/optiboot_flash/bootloaders/atmega2560/16000000L/optiboot_flash_atmega2560_UART0_115200_16000000L_B7_BIGBOOT.hex:
avrdude: input file C:\Users\xiaof\AppData\Local\Arduino15\packages\MegaCore\hardware\avr\2.1.3/bootloaders/optiboot_flash/bootloaders/atmega2560/16000000L/optiboot_flash_atmega2560_UART0_115200_16000000L_B7_BIGBOOT.hex contains 262144 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 262144 bytes of flash verified
avrdude: reading input file "0x0f"
avrdude: writing lock (1 bytes):
Writing | ################################################## | 100% 0.01s
avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x0f:
avrdude: load data lock data from input file 0x0f:
avrdude: input file 0x0f contains 1 bytes
avrdude: reading on-chip lock data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of lock verified
avrdude done. Thank you.
Now it seems to work fine under Arduino.
C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\xiaof\AppData\Local\Arduino15\packages -hardware C:\Users\xiaof\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\xiaof\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\xiaof\Documents\Arduino\libraries -fqbn=MegaCore:avr:2560:bootloader=uart0,eeprom=keep,pinout=mega_pinout,BOD=2v7,LTO=Os,clock=16MHz_external -vid-pid=1A86_7523 -ide-version=10819 -build-path C:\Users\xiaof\AppData\Local\Temp\arduino_build_326376 -warnings=none -build-cache C:\Users\xiaof\AppData\Local\Temp\arduino_cache_298037 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino18 -prefs=runtime.tools.avrdude-6.3.0-arduino18.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino18 -prefs=runtime.tools.arduinoOTA.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avr-gcc.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -verbose C:\Users\xiaof\Documents\Arduino\Mega2560\Blink1\Blink1.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\xiaof\AppData\Local\Arduino15\packages -hardware C:\Users\xiaof\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\xiaof\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\xiaof\Documents\Arduino\libraries -fqbn=MegaCore:avr:2560:bootloader=uart0,eeprom=keep,pinout=mega_pinout,BOD=2v7,LTO=Os,clock=16MHz_external -vid-pid=1A86_7523 -ide-version=10819 -build-path C:\Users\xiaof\AppData\Local\Temp\arduino_build_326376 -warnings=none -build-cache C:\Users\xiaof\AppData\Local\Temp\arduino_cache_298037 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino18 -prefs=runtime.tools.avrdude-6.3.0-arduino18.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino18 -prefs=runtime.tools.arduinoOTA.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avr-gcc.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -verbose C:\Users\xiaof\Documents\Arduino\Mega2560\Blink1\Blink1.ino
Using board '2560' from platform in folder: C:\Users\xiaof\AppData\Local\Arduino15\packages\MegaCore\hardware\avr\2.1.3
Using core 'MCUdude_corefiles' from platform in folder: C:\Users\xiaof\AppData\Local\Arduino15\packages\MegaCore\hardware\avr\2.1.3
Detecting libraries used...
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\sketch\\Blink1.ino.cpp" -o nul
Generating function prototypes...
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\sketch\\Blink1.ino.cpp" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\sketch\\Blink1.ino.cpp" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\sketch\\Blink1.ino.cpp.o"
Compiling libraries...
Compiling core...
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -c -g -x assembler-with-cpp -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles\\wiring_pulse.S" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\wiring_pulse.S.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles\\hooks.c" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\hooks.c.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles\\WInterrupts.c" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\WInterrupts.c.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles\\wiring_analog.c" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\wiring_analog.c.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles\\wiring_digital.c" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\wiring_digital.c.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles\\wiring.c" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\wiring.c.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles\\wiring_pulse.c" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\wiring_pulse.c.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles\\wiring_shift.c" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\wiring_shift.c.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles\\PluggableUSB.cpp" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\PluggableUSB.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles\\HardwareSerial1.cpp" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\HardwareSerial1.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles\\HardwareSerial0.cpp" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\HardwareSerial0.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles\\HardwareSerial2.cpp" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\HardwareSerial2.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles\\HardwareSerial.cpp" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\HardwareSerial.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles\\IPAddress.cpp" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\IPAddress.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles\\CDC.cpp" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\CDC.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles\\HardwareSerial3.cpp" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\HardwareSerial3.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles\\Print.cpp" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\Print.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles\\Stream.cpp" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\Stream.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles\\Tone.cpp" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\Tone.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles\\USBCore.cpp" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\USBCore.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles\\WMath.cpp" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\WMath.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles\\WString.cpp" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\WString.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles\\abi.cpp" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\abi.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles\\main.cpp" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\main.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles\\new.cpp" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\new.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++17 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_ATmega2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles" "-IC:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\variants\\100-pin-arduino-mega" "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\MegaCore\\hardware\\avr\\2.1.3\\cores\\MCUdude_corefiles\\wiring_extras.cpp" -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\wiring_extras.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\core.a" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\wiring_pulse.S.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\core.a" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\WInterrupts.c.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\core.a" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\hooks.c.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\core.a" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\wiring.c.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\core.a" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\wiring_analog.c.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\core.a" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\wiring_digital.c.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\core.a" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\wiring_pulse.c.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\core.a" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\wiring_shift.c.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\core.a" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\CDC.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\core.a" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\HardwareSerial.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\core.a" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\HardwareSerial0.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\core.a" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\HardwareSerial1.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\core.a" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\HardwareSerial2.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\core.a" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\HardwareSerial3.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\core.a" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\IPAddress.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\core.a" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\PluggableUSB.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\core.a" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\Print.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\core.a" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\Stream.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\core.a" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\Tone.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\core.a" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\USBCore.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\core.a" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\WMath.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\core.a" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\WString.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\core.a" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\abi.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\core.a" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\main.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\core.a" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\new.cpp.o"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-ar" rcs "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\core.a" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\core\\wiring_extras.cpp.o"
Archiving built core (caching) in: C:\Users\xiaof\AppData\Local\Temp\arduino_cache_298037\core\core_66838d25b8833baf494136479a805466.a
Linking everything together...
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -w -Os -Wl,--gc-sections,--section-start=.FAR_MEM1=0x10000,--section-start=.FAR_MEM2=0x20000,--section-start=.FAR_MEM3=0x30000 -mmcu=atmega2560 -o "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376/Blink1.ino.elf" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376\\sketch\\Blink1.ino.cpp.o" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376/core\\core.a" "-LC:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376" -lm
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376/Blink1.ino.elf" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376/Blink1.ino.eep"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376/Blink1.ino.elf" "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376/Blink1.ino.hex"
cmd /C "C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objdump" --disassemble --source --line-numbers --demangle --section=.text "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376/Blink1.ino.elf" > "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376/Blink1.ino_atmega2560_16000000L.lst"
"C:\\Users\\xiaof\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size" -A "C:\\Users\\xiaof\\AppData\\Local\\Temp\\arduino_build_326376/Blink1.ino.elf"
Sketch uses 1646 bytes (0%) of program storage space. Maximum is 261120 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 8183 bytes for local variables. Maximum is 8192 bytes.
C:\Users\xiaof\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino18/bin/avrdude -CC:\Users\xiaof\AppData\Local\Arduino15\packages\MegaCore\hardware\avr\2.1.3/avrdude.conf -v -patmega2560 -carduino -PCOM9 -b115200 -D -Uflash:w:C:\Users\xiaof\AppData\Local\Temp\arduino_build_326376/Blink1.ino.hex:i
avrdude: Version 6.3-20201216
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\xiaof\AppData\Local\Arduino15\packages\MegaCore\hardware\avr\2.1.3/avrdude.conf"
Using Port : COM9
Using Programmer : arduino
Overriding Baud Rate : 115200
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 : Arduino
Description : Arduino
Hardware Version: 3
Firmware Version: 8.0
Vtarget : 0.3 V
Varef : 0.3 V
Oscillator : 28.800 kHz
SCK period : 3.3 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9801 (probably m2560)
avrdude: reading input file "C:\Users\xiaof\AppData\Local\Temp\arduino_build_326376/Blink1.ino.hex"
avrdude: writing flash (1646 bytes):
Writing | ################################################## | 100% 0.25s
avrdude: 1646 bytes of flash written
avrdude: verifying flash memory against C:\Users\xiaof\AppData\Local\Temp\arduino_build_326376/Blink1.ino.hex:
avrdude: load data flash data from input file C:\Users\xiaof\AppData\Local\Temp\arduino_build_326376/Blink1.ino.hex:
avrdude: input file C:\Users\xiaof\AppData\Local\Temp\arduino_build_326376/Blink1.ino.hex contains 1646 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.19s
avrdude: verifying ...
avrdude: 1646 bytes of flash verified
avrdude done. Thank you.
@MCUdude So this seems to be a false alarm. I will close the issue now.
BTW, eeprom is working as well.
PS C:\work\avr\avrdude_test\avrdude-v7.0-windows-x64> .\avrdude -p atmega2560 -c arduino -b 115200 -P COM9 -U eeprom:w:entest.eep:i -v
avrdude.exe: Version 7.0
Copyright (c) Brian Dean, http://www.bdmicro.com/
Copyright (c) Joerg Wunsch
System wide configuration file is "C:/work/avr/avrdude_test/avrdude-v7.0-windows-x64/avrdude.conf"
Using Port : COM9
Using Programmer : arduino
Overriding Baud Rate : 115200
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
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Alias 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 1 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 1 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 1 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 1 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino
Hardware Version: 3
Firmware Version: 8.0
avrdude.exe: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude.exe: Device signature = 0x1e9801 (probably m2560)
avrdude.exe: reading input file "entest.eep"
avrdude.exe: writing eeprom (512 bytes):
Writing | ################################################## | 100% 1.89s
avrdude.exe: 512 bytes of eeprom written
avrdude.exe: verifying eeprom memory against entest.eep:
Reading | ################################################## | 100% 0.37s
avrdude.exe: 512 bytes of eeprom verified
avrdude.exe done. Thank you.
and you upload the sketch with Mega Core?
and you upload the sketch with Mega Core?
Yes. That works well when I use the right usbasp and burn the megacore bootloader. The run log is in the previous comment.
For your myboard bootloader, I use your myboard core. Run log is in the previous comment.
The optiboot hex file for the ATmega2560 did not work for my Arduino Mega2560 clone: no LED flashing, not able to connect using avrdude.
I am using this paticular hex file. https://github.com/MCUdude/MegaCore/blob/master/avr/bootloaders/optiboot_flash/bootloaders/atmega2560/16000000L/optiboot_flash_atmega2560_UART0_115200_16000000L_B7_BIGBOOT.hex
The factory stk500v2 bootloader hex file or the optiboot hex file provided by stefanrueger in the avrdude work fine.
Reference: