user56384: I have a Jaycar XC4421 - Arduino Mega + Wifi which I think have somehow managed to screw up the boot loader.
I have an XC4627 USP-ISP Programmer (and the XC4613 adaptor) which I have previously used to successfully burn boot loaders and update sketches in the past using the Arduino IDE.
However, on this occasion, after trying to reset the bootloader from the IDE, i can no longer upload sketches from the IDE using the inbuilt "upload" function of the IDE (I get timeouts) nor can I upload the sketch using the USB-ISP Programmer.
The symptoms as they currently stand with the USB connected to the 2560 (switches 3 & 4 on, all others off):

If I burn the bootloader (selected board in IDE is "Arduino Mega or Mega 2560"), this appears to work, but uploading sketches still does not work. After burning the bootloader, the builtin LED blinks at an odd cycle of roughly 400ms off, 400ms on, 200ms off, 200ms on.
The board is recognised in the IDE and appears as COM12
If try to upload the "blink" sketch (ctrl-U), I get timeout messages (see transcript below)
If I connect the USB-ISP and upload the blink sketch (ctrl-shift-U), the upload appears to work, but the sketch is never run (i.e. the builtin LED doesn't blink).
After uploading the blink sketch (via the USB-ISP programmer) the aforementioned odd blinking of the builtin LED completely stops (i.e. no blinking at all).
There is no hardware other than the USB-ISP programmer connected to the ICSP pins on the Arduino.
If I reset the DIP switches so that just 5 & 6 are on (USB->ESP) I am able to interact just fine with the "AT program" that was originally supplied on ESP side of the board.

My suspicion is that the Arduino Mega 2560 bootloader code is not completely compatible with the Arduino Mega + WiFi board. I don't think that suspicion makes much sense, but I'm out of ideas!
Where can I get the correct bootloader for this device? Alternatively, how can I correctly unbrick this?
Transcript from "upload blink sketch" showing timeout:
C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\gmc\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\gmc\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\gmc\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -vid-pid=1A86_7523 -ide-version=10813 -build-path C:\Users\gmc\AppData\Local\Temp\arduino_build_510155 -warnings=none -build-cache C:\Users\gmc\AppData\Local\Temp\arduino_cache_341521 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\gmc\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\gmc\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -verbose C:\Users\gmc\AppData\Local\Temp\arduino_modified_sketch_481876\Blink.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\gmc\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\gmc\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\gmc\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -vid-pid=1A86_7523 -ide-version=10813 -build-path C:\Users\gmc\AppData\Local\Temp\arduino_build_510155 -warnings=none -build-cache C:\Users\gmc\AppData\Local\Temp\arduino_cache_341521 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\gmc\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\gmc\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -verbose C:\Users\gmc\AppData\Local\Temp\arduino_modified_sketch_481876\Blink.ino
Using board 'mega' from platform in folder: C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3
Using core 'arduino' from platform in folder: C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3
Warning: Board arduino:avr:ATmega328p-8 doesn't define a 'build.board' preference. Auto-set to: AVR_ATMEGA328P-8
Detecting libraries used...
"C:\\Users\\gmc\\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=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino" "-IC:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\mega" "C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\sketch\\Blink.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
Generating function prototypes...
"C:\\Users\\gmc\\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=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino" "-IC:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\mega" "C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\sketch\\Blink.ino.cpp" -o "C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\preproc\\ctags_target_for_gcc_minus_e.cpp" -DARDUINO_LIB_DISCOVERY_PHASE
"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\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\\Users\\gmc\\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=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino" "-IC:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\mega" "C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\sketch\\Blink.ino.cpp" -o "C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\sketch\\Blink.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\gmc\AppData\Local\Temp\arduino_cache_341521\core\core_arduino_avr_mega_cpu_atmega2560_995451215dbc0ff7e2274fbcd94e62ea.a
Linking everything together...
"C:\\Users\\gmc\\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\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/Blink.ino.elf" "C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\sketch\\Blink.ino.cpp.o" "C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/..\\arduino_cache_341521\\core\\core_arduino_avr_mega_cpu_atmega2560_995451215dbc0ff7e2274fbcd94e62ea.a" "-LC:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155" -lm
"C:\\Users\\gmc\\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\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/Blink.ino.elf" "C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/Blink.ino.eep"
"C:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/Blink.ino.elf" "C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/Blink.ino.hex"
"C:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size" -A "C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/Blink.ino.elf"
Sketch uses 2684 bytes (1%) of program storage space. Maximum is 253952 bytes.
Global variables use 194 bytes (2%) of dynamic memory, leaving 7998 bytes for local variables. Maximum is 8192 bytes.
C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega2560 -cwiring -PCOM12 -b115200 -D -Uflash:w:C:\Users\gmc\AppData\Local\Temp\arduino_build_510155/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\gmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM12
         Using Programmer              : wiring
         Overriding Baud Rate          : 115200
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

avrdude done.  Thank you.

An error occurred while uploading the sketch


Transcript from "Upload blink sketch using programmer":
C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\gmc\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\gmc\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\gmc\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -vid-pid=1A86_7523 -ide-version=10813 -build-path C:\Users\gmc\AppData\Local\Temp\arduino_build_510155 -warnings=none -build-cache C:\Users\gmc\AppData\Local\Temp\arduino_cache_341521 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\gmc\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\gmc\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -verbose C:\Users\gmc\AppData\Local\Temp\arduino_modified_sketch_753905\Blink.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\gmc\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\gmc\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\gmc\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -vid-pid=1A86_7523 -ide-version=10813 -build-path C:\Users\gmc\AppData\Local\Temp\arduino_build_510155 -warnings=none -build-cache C:\Users\gmc\AppData\Local\Temp\arduino_cache_341521 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\gmc\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\gmc\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -verbose C:\Users\gmc\AppData\Local\Temp\arduino_modified_sketch_753905\Blink.ino
Using board 'mega' from platform in folder: C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3
Using core 'arduino' from platform in folder: C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3
Warning: Board arduino:avr:ATmega328p-8 doesn't define a 'build.board' preference. Auto-set to: AVR_ATMEGA328P-8
Detecting libraries used...
"C:\\Users\\gmc\\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=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino" "-IC:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\mega" "C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\sketch\\Blink.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE
Generating function prototypes...
"C:\\Users\\gmc\\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=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino" "-IC:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\mega" "C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\sketch\\Blink.ino.cpp" -o "C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\preproc\\ctags_target_for_gcc_minus_e.cpp" -DARDUINO_LIB_DISCOVERY_PHASE
"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\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"C:\\Users\\gmc\\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=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino" "-IC:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\mega" "C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\sketch\\Blink.ino.cpp" -o "C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\sketch\\Blink.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\gmc\AppData\Local\Temp\arduino_cache_341521\core\core_arduino_avr_mega_cpu_atmega2560_995451215dbc0ff7e2274fbcd94e62ea.a
Linking everything together...
"C:\\Users\\gmc\\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\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/Blink.ino.elf" "C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\sketch\\Blink.ino.cpp.o" "C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/..\\arduino_cache_341521\\core\\core_arduino_avr_mega_cpu_atmega2560_995451215dbc0ff7e2274fbcd94e62ea.a" "-LC:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155" -lm
"C:\\Users\\gmc\\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\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/Blink.ino.elf" "C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/Blink.ino.eep"
"C:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/Blink.ino.elf" "C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/Blink.ino.hex"
"C:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size" -A "C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/Blink.ino.elf"
Sketch uses 2684 bytes (1%) of program storage space. Maximum is 253952 bytes.
Global variables use 194 bytes (2%) of dynamic memory, leaving 7998 bytes for local variables. Maximum is 8192 bytes.
C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega2560 -cusbasp -Pusb -Uflash:w:C:\Users\gmc\AppData\Local\Temp\arduino_build_510155/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\gmc\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: 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: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: reading input file "C:\Users\gmc\AppData\Local\Temp\arduino_build_510155/Blink.ino.hex"
avrdude: writing flash (2684 bytes):

Writing | ################################################## | 100% 1.69s

avrdude: 2684 bytes of flash written
avrdude: verifying flash memory against C:\Users\gmc\AppData\Local\Temp\arduino_build_510155/Blink.ino.hex:
avrdude: load data flash data from input file C:\Users\gmc\AppData\Local\Temp\arduino_build_510155/Blink.ino.hex:
avrdude: input file C:\Users\gmc\AppData\Local\Temp\arduino_build_510155/Blink.ino.hex contains 2684 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.43s

avrdude: verifying ...
avrdude: 2684 bytes of flash verified

avrdude done.  Thank you.



user56384: Well after "working" on this all day, it turns out that the solution was to use the "Arduino as an ISP" solution as described on the arduino.cc website.
Why the USB-ISP solution did not work is not immediately obvious as I have used it successfully before - just not with this board!
FWIW, the blinking sequence I observed when burning the bootloader via the USB-ISP programmer also occurred after loading the bootloader via the "Arduino as ISP" solution. I don't know if the sequence was identical, but it certainly was similar. I then tried uploading the blink sketch using the "inbuilt" upload (ctrl-U) and the inbuilt LED blinked "correctly" at a 1s on 1s off cycle as per the standard blink sketch is programmed to do.
Oh well, hopefully this "answer" will help others.

56384: <p>I have a <a href="https://www.jaycar.com.au/mega-with-wi-fi/p/XC4421" rel="nofollow noreferrer">Jaycar XC4421 - Arduino Mega + Wifi</a> which I think have somehow managed to screw up the boot loader.</p>
<p>I have an <a href="https://www.jaycar.com.au/isp-programmer-for-arduino-and-avr/p/XC4627" rel="nofollow noreferrer">XC4627 USP-ISP Programmer</a> (and the XC4613 adaptor) which I have previously used to successfully burn boot loaders and update sketches in the past using the Arduino IDE.</p>
<p>However, on this occasion, after trying to reset the bootloader from the IDE, i can no longer upload sketches from the IDE using the inbuilt &quot;upload&quot; function of the IDE (I get timeouts) nor can I upload the sketch using the USB-ISP Programmer.</p>
<p>The symptoms as they currently stand with the USB connected to the 2560 (switches 3 &amp; 4 on, all others off):</p>
<ul>
<li>If I burn the bootloader (selected board in IDE is &quot;Arduino Mega or Mega 2560&quot;), this appears to work, but uploading sketches still does not work. After burning the bootloader, the builtin LED blinks at an odd cycle of roughly 400ms off, 400ms on, 200ms off, 200ms on.</li>
<li>The board is recognised in the IDE and appears as COM12</li>
<li>If try to upload the &quot;blink&quot; sketch (ctrl-U), I get timeout messages (see transcript below)</li>
<li>If I connect the USB-ISP and upload the blink sketch (ctrl-shift-U), the upload appears to work, but the sketch is never run (i.e. the builtin LED doesn't blink).</li>
<li>After uploading the blink sketch (via the USB-ISP programmer) the aforementioned odd blinking of the builtin LED completely stops (i.e. no blinking at all).</li>
<li>There is no hardware other than the USB-ISP programmer connected to the ICSP pins on the Arduino.</li>
<li>If I reset the DIP switches so that just 5 &amp; 6 are on (USB-&gt;ESP) I am able to interact just fine with the &quot;AT program&quot; that was originally supplied on ESP side of the board.</li>
</ul>
<p>My suspicion is that the Arduino Mega 2560 bootloader code is not completely compatible with the Arduino Mega + WiFi board. I don't think that suspicion makes much sense, but I'm out of ideas!</p>
<p>Where can I get the correct bootloader for this device? Alternatively, how can I correctly unbrick this?</p>
<p>Transcript from &quot;upload blink sketch&quot; showing timeout:</p>
<pre><code>C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\gmc\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\gmc\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\gmc\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -vid-pid=1A86_7523 -ide-version=10813 -build-path C:\Users\gmc\AppData\Local\Temp\arduino_build_510155 -warnings=none -build-cache C:\Users\gmc\AppData\Local\Temp\arduino_cache_341521 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\gmc\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\gmc\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -verbose C:\Users\gmc\AppData\Local\Temp\arduino_modified_sketch_481876\Blink.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\gmc\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\gmc\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\gmc\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -vid-pid=1A86_7523 -ide-version=10813 -build-path C:\Users\gmc\AppData\Local\Temp\arduino_build_510155 -warnings=none -build-cache C:\Users\gmc\AppData\Local\Temp\arduino_cache_341521 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\gmc\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\gmc\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -verbose C:\Users\gmc\AppData\Local\Temp\arduino_modified_sketch_481876\Blink.ino
Using board 'mega' from platform in folder: C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3
Using core 'arduino' from platform in folder: C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3
Warning: Board arduino:avr:ATmega328p-8 doesn't define a 'build.board' preference. Auto-set to: AVR_ATMEGA328P-8
Detecting libraries used...
&quot;C:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++&quot; -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=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR &quot;-IC:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino&quot; &quot;-IC:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\mega&quot; &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\sketch\\Blink.ino.cpp&quot; -o nul -DARDUINO_LIB_DISCOVERY_PHASE
Generating function prototypes...
&quot;C:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++&quot; -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=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR &quot;-IC:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino&quot; &quot;-IC:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\mega&quot; &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\sketch\\Blink.ino.cpp&quot; -o &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\preproc\\ctags_target_for_gcc_minus_e.cpp&quot; -DARDUINO_LIB_DISCOVERY_PHASE
&quot;C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags&quot; -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\preproc\\ctags_target_for_gcc_minus_e.cpp&quot;
Compiling sketch...
&quot;C:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++&quot; -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=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR &quot;-IC:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino&quot; &quot;-IC:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\mega&quot; &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\sketch\\Blink.ino.cpp&quot; -o &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\sketch\\Blink.ino.cpp.o&quot;
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\gmc\AppData\Local\Temp\arduino_cache_341521\core\core_arduino_avr_mega_cpu_atmega2560_995451215dbc0ff7e2274fbcd94e62ea.a
Linking everything together...
&quot;C:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc&quot; -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega2560 -o &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/Blink.ino.elf&quot; &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\sketch\\Blink.ino.cpp.o&quot; &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/..\\arduino_cache_341521\\core\\core_arduino_avr_mega_cpu_atmega2560_995451215dbc0ff7e2274fbcd94e62ea.a&quot; &quot;-LC:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155&quot; -lm
&quot;C:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy&quot; -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/Blink.ino.elf&quot; &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/Blink.ino.eep&quot;
&quot;C:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy&quot; -O ihex -R .eeprom &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/Blink.ino.elf&quot; &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/Blink.ino.hex&quot;
&quot;C:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size&quot; -A &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/Blink.ino.elf&quot;
Sketch uses 2684 bytes (1%) of program storage space. Maximum is 253952 bytes.
Global variables use 194 bytes (2%) of dynamic memory, leaving 7998 bytes for local variables. Maximum is 8192 bytes.
C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega2560 -cwiring -PCOM12 -b115200 -D -Uflash:w:C:\Users\gmc\AppData\Local\Temp\arduino_build_510155/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 &quot;C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf&quot;

         Using Port                    : COM12
         Using Programmer              : wiring
         Overriding Baud Rate          : 115200
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

avrdude done.  Thank you.

An error occurred while uploading the sketch

</code></pre>
<p>Transcript from &quot;Upload blink sketch using programmer&quot;:</p>
<pre><code>C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\gmc\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\gmc\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\gmc\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -vid-pid=1A86_7523 -ide-version=10813 -build-path C:\Users\gmc\AppData\Local\Temp\arduino_build_510155 -warnings=none -build-cache C:\Users\gmc\AppData\Local\Temp\arduino_cache_341521 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\gmc\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\gmc\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -verbose C:\Users\gmc\AppData\Local\Temp\arduino_modified_sketch_753905\Blink.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\gmc\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\gmc\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\gmc\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -vid-pid=1A86_7523 -ide-version=10813 -build-path C:\Users\gmc\AppData\Local\Temp\arduino_build_510155 -warnings=none -build-cache C:\Users\gmc\AppData\Local\Temp\arduino_cache_341521 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\gmc\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\gmc\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -verbose C:\Users\gmc\AppData\Local\Temp\arduino_modified_sketch_753905\Blink.ino
Using board 'mega' from platform in folder: C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3
Using core 'arduino' from platform in folder: C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3
Warning: Board arduino:avr:ATmega328p-8 doesn't define a 'build.board' preference. Auto-set to: AVR_ATMEGA328P-8
Detecting libraries used...
&quot;C:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++&quot; -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=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR &quot;-IC:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino&quot; &quot;-IC:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\mega&quot; &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\sketch\\Blink.ino.cpp&quot; -o nul -DARDUINO_LIB_DISCOVERY_PHASE
Generating function prototypes...
&quot;C:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++&quot; -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=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR &quot;-IC:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino&quot; &quot;-IC:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\mega&quot; &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\sketch\\Blink.ino.cpp&quot; -o &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\preproc\\ctags_target_for_gcc_minus_e.cpp&quot; -DARDUINO_LIB_DISCOVERY_PHASE
&quot;C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags&quot; -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\preproc\\ctags_target_for_gcc_minus_e.cpp&quot;
Compiling sketch...
&quot;C:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++&quot; -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=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR &quot;-IC:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino&quot; &quot;-IC:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\mega&quot; &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\sketch\\Blink.ino.cpp&quot; -o &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\sketch\\Blink.ino.cpp.o&quot;
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\gmc\AppData\Local\Temp\arduino_cache_341521\core\core_arduino_avr_mega_cpu_atmega2560_995451215dbc0ff7e2274fbcd94e62ea.a
Linking everything together...
&quot;C:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc&quot; -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega2560 -o &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/Blink.ino.elf&quot; &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155\\sketch\\Blink.ino.cpp.o&quot; &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/..\\arduino_cache_341521\\core\\core_arduino_avr_mega_cpu_atmega2560_995451215dbc0ff7e2274fbcd94e62ea.a&quot; &quot;-LC:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155&quot; -lm
&quot;C:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy&quot; -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/Blink.ino.elf&quot; &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/Blink.ino.eep&quot;
&quot;C:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy&quot; -O ihex -R .eeprom &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/Blink.ino.elf&quot; &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/Blink.ino.hex&quot;
&quot;C:\\Users\\gmc\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size&quot; -A &quot;C:\\Users\\gmc\\AppData\\Local\\Temp\\arduino_build_510155/Blink.ino.elf&quot;
Sketch uses 2684 bytes (1%) of program storage space. Maximum is 253952 bytes.
Global variables use 194 bytes (2%) of dynamic memory, leaving 7998 bytes for local variables. Maximum is 8192 bytes.
C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega2560 -cusbasp -Pusb -Uflash:w:C:\Users\gmc\AppData\Local\Temp\arduino_build_510155/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 &quot;C:\Users\gmc\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf&quot;

         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: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9801 (probably m2560)
avrdude: NOTE: &quot;flash&quot; 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: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: reading input file &quot;C:\Users\gmc\AppData\Local\Temp\arduino_build_510155/Blink.ino.hex&quot;
avrdude: writing flash (2684 bytes):

Writing | ################################################## | 100% 1.69s

avrdude: 2684 bytes of flash written
avrdude: verifying flash memory against C:\Users\gmc\AppData\Local\Temp\arduino_build_510155/Blink.ino.hex:
avrdude: load data flash data from input file C:\Users\gmc\AppData\Local\Temp\arduino_build_510155/Blink.ino.hex:
avrdude: input file C:\Users\gmc\AppData\Local\Temp\arduino_build_510155/Blink.ino.hex contains 2684 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.43s

avrdude: verifying ...
avrdude: 2684 bytes of flash verified

avrdude done.  Thank you.

</code></pre>
 56384: <p>Well after &quot;working&quot; on this all day, it turns out that the solution was to use the &quot;<a href="https://www.arduino.cc/en/Tutorial/BuiltInExamples/ArduinoISP/" rel="nofollow noreferrer">Arduino as an ISP</a>&quot; solution as described on the arduino.cc website.</p>
<p>Why the USB-ISP solution did not work is not immediately obvious as I have used it successfully before - just not with this board!</p>
<p>FWIW, the blinking sequence I observed when burning the bootloader via the USB-ISP programmer also occurred after loading the bootloader via the &quot;Arduino as ISP&quot; solution. I don't know if the sequence was identical, but it certainly was similar. I then tried uploading the blink sketch using the &quot;inbuilt&quot; upload (ctrl-U) and the inbuilt LED blinked &quot;correctly&quot; at a 1s on 1s off cycle as per the standard blink sketch is programmed to do.</p>
<p>Oh well, hopefully this &quot;answer&quot; will help others.</p>
