SAM-BA operation failed -- MKRZERO

Uploading to my MKRZERO gives the above error, though sketches load and run. I saw an update procedure for the MKRVIDOR4000 but I hesitate to try it on my ZERO.

What does this error mean and how do I eliminate it?

Thanks,
Jack

Arduino: 1.8.8 (Windows 7), Board: "Arduino MKRZERO"
.
.
.

"C:\\Users\\Jack\\AppData\\Local\\Temp\\arduino_build_951173/LowPowerTimedWakeup.ino.elf"
Sketch uses 11424 bytes (4%) of program storage space. Maximum is 262144 bytes.
PORTS {COM1, COM11, } / {COM1, COM11, } => {}
PORTS {COM1, COM11, } / {COM1, COM11, } => {}
PORTS {COM1, COM11, } / {COM1, COM11, } => {}
PORTS {COM1, COM11, } / {COM1, COM11, } => {}
PORTS {COM1, COM11, } / {COM1, COM11, } => {}
PORTS {COM1, COM11, } / {COM1, COM11, } => {}
PORTS {COM1, COM11, } / {COM1, COM11, } => {}
PORTS {COM1, COM11, } / {COM1, COM11, } => {}
PORTS {COM1, COM11, } / {COM1, COM11, } => {}
PORTS {COM1, COM11, } / {COM1, COM11, } => {}
PORTS {COM1, COM11, } / {COM1, COM11, } => {}
PORTS {COM1, COM11, } / {COM1, COM11, } => {}
PORTS {COM1, COM11, } / {COM1, } => {}
PORTS {COM1, } / {COM1, } => {}
PORTS {COM1, } / {COM1, COM11, } => {COM11, }
Found upload port: COM11
C:\Users\Jack\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.7.0/bossac.exe -i -d --port=COM11 -U true -i -e -w -v C:\Users\Jack\AppData\Local\Temp\arduino_build_951173/LowPowerTimedWakeup.ino.bin -R 
Set binary mode
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
version()=v2.0 [Arduino:XYZ] Dec 20 2016 15:36:46
chipId=0x10010005
Connected at 921600 baud
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
Atmel SMART device 0x10010005 found
write(addr=0x20004000,size=0x34)
writeWord(addr=0x20004030,value=0x10)
writeWord(addr=0x20004020,value=0x20008000)
Device       : ATSAMD21G18A
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
Chip ID      : 10010005
version()=v2.0 [Arduino:XYZ] Dec 20 2016 15:36:46
Version      : v2.0 [Arduino:XYZ] Dec 20 2016 15:36:46
Address      : 8192
Pages        : 3968
Page Size    : 64 bytes
Total Size   : 248KB
Planes       : 1
Lock Regions : 16
Locked       : readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
none
readWord(addr=0x41004018)=0
Security     : false
Boot Flash   : true
readWord(addr=0x40000834)=0x7000a
BOD          : true
readWord(addr=0x40000834)=0x7000a
BOR          : true
Arduino      : FAST_CHIP_ERASE
Arduino      : FAST_MULTI_PAGE_WRITE
Arduino      : CAN_CHECKSUM_MEMORY_BUFFER
Erase flash
chipErase(addr=0x2000)
done in 0.878 seconds

Write 11696 bytes to flash (183 pages)
write(addr=0x20005000,size=0x1000)
writeBuffer(scr_addr=0x20005000, dst_addr=0x2000, size=0x1000)

SAM-BA operation failed
An error occurred while uploading the sketch

[==========                    ] 34% (64/183 pages)write(addr=0x20005000,size=0x1000)
writeBuffer(scr_addr=0x20005000, dst_addr=0x3000, size=0x1000)

[====================          ] 69% (128/183 pages)write(addr=0x20005000,size=0xdc0)
writeBuffer(scr_addr=0x20005000, dst_addr=0x4000, size=0xdc0)

[==============================] 100% (183/183 pages)
done in 0.074 seconds

Verify 11696 bytes of flash with checksum.
checksumBuffer(start_addr=0x2000, size=0x1000) = 2dc4
checksumBuffer(start_addr=0x3000, size=0x1000) = d41a
checksumBuffer(start_addr=0x4000, size=0xdb0) = c5c3
Verify successful
done in 0.016 seconds
CPU reset.
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
writeWord(addr=0xe000ed0c,value=0x5fa0004)

Purely a guess: You might try a different USB cable.

Thanks for the suggestion but I get the same result with other cords as well (I tried four others). Note that the sketches all load and run successfully - erase, write and verify are successful. Just this strange bootloader fail errror.

????????????

I contacted support regarding this issue and was referred to an open issue on the SAM-D git hub site - Fail to upload to MKR1000 on Windows 7 · Issue #198 · arduino/ArduinoCore-samd · GitHub. As noted there, I was able to "solve" the problem by interposing a USB2 hub between my Win 7 box and my MKRZERO board.

The bug remains unresolved but this simple workaround seems to prevent the (spurious?) error message.

Jack

Thanks for taking the time to provide an update with the workaround jackrubin. I'm sure anyone else having the same problem who finds this thread while searching for a solution will be very grateful. I have taken note of this information for future reference.