Gemma M0 burn bootloader problem

Wearable electronics: boards, conductive materials, and projects from Adafruit!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Post Reply
User avatar
Posts: 1
Joined: Thu Feb 08, 2024 7:39 pm

Gemma M0 burn bootloader problem

Post by jmattioni »

I had issues with the bootloader working on two Gemma M0's I purchased, so I switched to an Atmel-ICE programmer to get code into the board. That works and the option to burn the bootloader also works, but it doesn't leave me with a functional bootloader. When I attempt to use the bootloader via COM port to upload a small program it gets part way through the upload, hangs for a minute and then reports failure. Here is the result:

Uploading 'GemmaTest' to 'Adafruit Gemma M0 (SAMD21)(adafruit_adafruit_gemma_m0)' using 'COM11'
Device : ATSAMD21x18
Version : v1.1 [Arduino:XYZ] Jul 17 2018 15:01:20
Address : 0x0
Pages : 4096
Page Size : 64 bytes
Total Size : 256KB
Planes : 1
Lock Regions : 16
Locked : none
Security : false
BOD : true
BOR : true
Write 24856 bytes to flash (389 pages)
[ ] 0% (0/389 pages)
[==== ] 16% (64/389 pages)
[========= ] 32% (128/389 pages)
[============== ] 49% (192/389 pages)
The uploader process failed
SAM-BA operation failed
[=================== ] 65% (256/389 pages)

AFAIK, the bootloader being burned is supplied in the Adafruit package files. I don't see any way to select it via the IDE. I'm using Visual Studio 2019 with Visual Micro Arduino extension and have the Adafruit platform files loaded.

Any idea why this is happening? Thanks.

User avatar
Posts: 13544
Joined: Mon Aug 01, 2016 8:10 pm

Re: Gemma M0 burn bootloader problem

Post by mikeysklar »

I've not burned a bootloader with your setup over the Arduino IDE.

The Adafruit guide for putting a bootloader on the Gemma M0 from bare metal uses the Atmel Studio and a JLINK. The bootloader protection fuse BOOTPROT and its setting to 0-bytes might be a factor here. It also erases before writing.

Post Reply
Please be positive and constructive with your questions and comments.

Return to “Wearables”