0

Help with Gemma M0 using Arduino IDE
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Help with Gemma M0 using Arduino IDE

by Maguito73 on Wed Jan 09, 2019 4:22 pm

Hello! I just bought two Gemma M0 + Neopixels to make the "Gemma Hoop Earrings" from the Explore and Learn section:
https://learn.adafruit.com/gemma-hoop-earrings
(one of many cool examples!)
I followed instructions and the project is working fine using CircuitPython :)
But I would like to use the Arduino IDE (since I've already used before) to eventually add some changes.
I installed the required libraries and boards. I can choose the "Adafruit Gemma(ATtiny85 @ 8MHz)" as board and also the "USBtinyISP" as programmer. But when I plug the Gemma M0, the "CIRCUITPY" Drive appears and when I press the reset button to enter Bootloader Mode the Gemma just keeps executing the programm uploaded with CircuitPython before and doesn't enter the bootloader mode.
I attached a picture of the error I get when uploading the program using the Arduino IDE.
I am using Arduino IDE version 1.8.5
Attachments
Gemma_A_IDE_error.JPG
Gemma_A_IDE_error.JPG (30.07 KiB) Viewed 63 times

Maguito73
 
Posts: 6
Joined: Thu Sep 06, 2018 12:44 pm

Re: Help with Gemma M0 using Arduino IDE

by oesterle on Wed Jan 09, 2019 10:12 pm

Hi, Maguito73!

Since you have the much more powerful M0 version of the Gemma, vs the original Gemma (the ATtiny85 version), in the Arduino IDE, you'll need to choose Tools > Board > Adafruit Gemma M0. It's in the section of the menu headed by Adafruit SAMD (32-bits ARM Cortex-M0+ and Cortex-M4) Boards.

If you don't see the Adafruit Gemma M0 choice, you need to install its board support package. The Arduino IDE Setup and Using with Arduino IDE sections of the Gemma M0 product guide will walk you through that. I like to quit and reopen the Arduino IDE after installation.

Next, in Tools > Programmer I select AVRISP mkII for this board.

Then you should be good to go!


Cheers,

Eric

oesterle
 
Posts: 411
Joined: Tue Sep 17, 2013 11:32 pm

Re: Help with Gemma M0 using Arduino IDE

by adafruit_support_carter on Wed Jan 09, 2019 10:59 pm

Yep. Above is correct. See if you can follow those links to install the board support for the Gemma M0 and then select it in the IDE.

That's an older guide that was created before the Gemma M0 came out. The CircuitPython section was added recently - and it only works on the Gemma M0. Once you've gone through the setup above, the Arduino version *should* work as is. But if you run into any hiccups, let us know.

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

Re: Help with Gemma M0 using Arduino IDE

by Maguito73 on Sat Jan 12, 2019 10:46 am

Thank you so much!!
I installed the library for the right Board (Gemma M0) and selected the right Programmer (AVRISP MKII) as you suggested and it worked out perfectly =)
I had to click the Reset button twice before uploading the code, otherwise it wouldn't work.

Maguito73
 
Posts: 6
Joined: Thu Sep 06, 2018 12:44 pm

Please be positive and constructive with your questions and comments.