0

Cannot upload even the Blink Sketch to Grand Central
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Cannot upload even the Blink Sketch to Grand Central

by MakerMelissa on Fri Feb 08, 2019 10:51 pm

I got a Grand Central board a couple days ago and I am able to run CircuitPython just fine, but am unable to upload even a simple Blink Example sketch to the Grand Central.

The error I get is:
Code: Select all | TOGGLE FULL SIZE
SAM-BA operation failed
An error occurred while uploading the sketch


I tried updating the Bootloader to version 2.0.0 via a UF2 file, but that didn't make a difference. I was able to upload just fine to a Feather M4 Express, so it seems board specific. I'm using the Arduino IDE 1.8.8 with the latest Adafruit and Arduino SAMD boards.

MakerMelissa
 
Posts: 19
Joined: Wed Jun 05, 2013 2:10 am

Re: Cannot upload even the Blink Sketch to Grand Central

by MakerMelissa on Fri Feb 08, 2019 11:15 pm

Update: I was also able to upload to the Metro M4 Express and I even restarted my computer, but no luck with the Grand Central.

MakerMelissa
 
Posts: 19
Joined: Wed Jun 05, 2013 2:10 am

Re: Cannot upload even the Blink Sketch to Grand Central

by adafruit_support_carter on Mon Feb 11, 2019 1:52 pm

Just to make sure - you're selecting "Adafruit Grand Central M4" from the boards list?

adafruit_support_carter
 
Posts: 9702
Joined: Tue Nov 29, 2016 2:45 pm

Re: Cannot upload even the Blink Sketch to Grand Central

by MakerMelissa on Mon Feb 11, 2019 1:54 pm

That's correct.

MakerMelissa
 
Posts: 19
Joined: Wed Jun 05, 2013 2:10 am

Re: Cannot upload even the Blink Sketch to Grand Central

by adafruit_support_carter on Mon Feb 11, 2019 2:11 pm

Try putting it in bootloader mode first, so the **BOOT (not sure what it's called for GC) folder shows up, make sure to double check the port selection in Arduino after doing that, and then try uploading to it in that mode.

adafruit_support_carter
 
Posts: 9702
Joined: Tue Nov 29, 2016 2:45 pm

Re: Cannot upload even the Blink Sketch to Grand Central

by MakerMelissa on Mon Feb 11, 2019 2:18 pm

I tried that even going as far as removing the UF2 file so it would force it in bootloader mode, but had no luck with that. Here's a capture of the upload log:
Code: Select all | TOGGLE FULL SIZE
Uploading using selected port: /dev/cu.usbmodem14101
/Users/melissa/Library/Arduino15/packages/arduino/tools/bossac/1.8.0-48-gb176eee/bossac -i -d --port=cu.usbmodem14101 -U -i --offset=0x4000 -e -w -v /var/folders/30/hyy2wbrn2sz5kz28ychsrtsw0000gn/T/arduino_build_270492/Blink.ino.bin -R
Set binary mode
version()=v1.1 [Arduino:XYZ] Dec 30 2018 21:24:00
Connected at 921600 baud
readWord(addr=0)=0x2000dfe0
readWord(addr=0xe000ed00)=0x410fc241
readWord(addr=0x4)=0x58d
readWord(addr=0x41002018)=0x60060000
write(addr=0x20004000,size=0x34)
writeWord(addr=0x20004030,value=0x80)
writeWord(addr=0x20004020,value=0x20008000)
version()=v1.1 [Arduino:XYZ] Dec 30 2018 21:24:00
readByte(addr=0x804000)=0x39
readByte(addr=0x804001)=0x92
readByte(addr=0x804008)=0xff
readByte(addr=0x804009)=0xff
readByte(addr=0x80400a)=0xff
readByte(addr=0x80400b)=0xff
Device       : ATSAMD51x20
Version      : v1.1 [Arduino:XYZ] Dec 30 2018 21:24:00
Address      : 0x0
Pages        : 2048
Page Size    : 512 bytes
Total Size   : 1024KB
Planes       : 1
Lock Regions : 32
Locked       : none
Security     : false
BOD          : false
BOR          : true
Erase flash
chipErase(addr=0x4000)

Done in 5.007 seconds
Write 12456 bytes to flash (25 pages)

[                              ] 0% (0/25 pages)
SAM-BA operation failed
write(addr=0x20004034,size=0x1000)
An error occurred while uploading the sketch

MakerMelissa
 
Posts: 19
Joined: Wed Jun 05, 2013 2:10 am

Re: Cannot upload even the Blink Sketch to Grand Central

by MakerMelissa on Mon Feb 11, 2019 2:21 pm

I tried updating the bootloader to version 2.0.0 via the UF2 file, but could try using a JLink programmer with the bin file if you think that would be more successful.

MakerMelissa
 
Posts: 19
Joined: Wed Jun 05, 2013 2:10 am

Re: Cannot upload even the Blink Sketch to Grand Central

by MakerMelissa on Mon Feb 11, 2019 2:30 pm

Ok, just looked at the INFO_UF2.TXT file and it says it's running bootloader v1.23.1 so maybe that will fix it.

MakerMelissa
 
Posts: 19
Joined: Wed Jun 05, 2013 2:10 am

Re: Cannot upload even the Blink Sketch to Grand Central

by adafruit_support_carter on Mon Feb 11, 2019 2:50 pm

Looks like there's *suppose* to be a UF2 updater for the GC:
https://learn.adafruit.com/adafruit-gra ... er-details
But sounds like that didn't work? It didn't actually update the bootloader?

adafruit_support_carter
 
Posts: 9702
Joined: Tue Nov 29, 2016 2:45 pm

Re: Cannot upload even the Blink Sketch to Grand Central

by MakerMelissa on Mon Feb 11, 2019 2:54 pm

That's correct.

MakerMelissa
 
Posts: 19
Joined: Wed Jun 05, 2013 2:10 am

Re: Cannot upload even the Blink Sketch to Grand Central

by MakerMelissa on Mon Feb 11, 2019 3:01 pm

I tried reprogramming with the JLink programmer, but it appears the bootloader is locked as the programming failed and I'm not sure which fuse to change to unlock it.

MakerMelissa
 
Posts: 19
Joined: Wed Jun 05, 2013 2:10 am

Re: Cannot upload even the Blink Sketch to Grand Central

by MakerMelissa on Mon Feb 11, 2019 3:04 pm

I just tried again with the UF2 method and that seemed to work this time. I'm trying arduino again.

MakerMelissa
 
Posts: 19
Joined: Wed Jun 05, 2013 2:10 am

Re: Cannot upload even the Blink Sketch to Grand Central

by MakerMelissa on Mon Feb 11, 2019 3:06 pm

Ok, now I have the latest bootloader, but I'm still having the same arduino issue.

MakerMelissa
 
Posts: 19
Joined: Wed Jun 05, 2013 2:10 am

Re: Cannot upload even the Blink Sketch to Grand Central

by adafruit2 on Tue Feb 12, 2019 5:46 pm

yeah i know what this is - bossac can't cope with the huge delay for erasing the flash.

instead of installing via the board manager, can you try installing the git repo direction into a "ArduinoLibrary/hardware/arduino" folder (you'll need to uninstall the BSP) and you'll have my fix - if that helps i can do a re-release

adafruit2
Site Admin
 
Posts: 18047
Joined: Fri Mar 11, 2005 7:36 pm

Re: Cannot upload even the Blink Sketch to Grand Central

by MakerMelissa on Tue Feb 12, 2019 5:49 pm

Thanks, I'll give that a try a little later and report back the results.

MakerMelissa
 
Posts: 19
Joined: Wed Jun 05, 2013 2:10 am

Please be positive and constructive with your questions and comments.