Gemma Bootloading Problems

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

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
Evan_Pierce
 
Posts: 30
Joined: Thu Sep 12, 2013 3:30 pm

Gemma Bootloading Problems

Post by Evan_Pierce »

I had some success with the Arduino Uno and wanted to expand to Gemma, but I'm having trouble getting the Gemma Blink tutorial to work, presumably because I haven't set up everything correctly. I'd love some help in troubleshooting what I'm doing wrong as I've spent a good 4-5 hours beating my head against this.

My OS is Windows 7, I downloaded the usbtinyisp (v 1.12. I did not download any WinAVR, though I see it mentioned in that other tutorial). I had a little friction getting my machine to acknowledge that driver, but I believe I've gotten my machine to acknowledge as much, and there should be attached a "Device_Manager.png" to prove it. And I copy/pasted the avrdude.conf from http://learn.adafruit.com/system/assets ... 1378221965 into an avrdude.conf file, renaming the existing one to avrdude.bak
Device_Manager.png
Device_Manager.png (41.33 KiB) Viewed 5701 times
When I plug Gemma into my machine via the USB, it does the blinky thing that I expect. Only it keeps on blinking forever, but not in a good "Gemma Blink tutorial" way, rather in more of a perpetual bootloading way (about twice a second). If I restart my computer with Gemma plugged in, its red LED will stay solid and not blink, unless I unplug it or bootload it by pressing the button. This makes me question whether my mini USB cable is good. It's not just the bootloading blink sequence, my computer perpetually re-registers the Gemma as though I'm constantly unplugging it and plugging it back in.

The other day when I was trying to get this to work, I thought that I was able to get the Arduino IDE to attempt to upload code to Gemma and was getting some verification mismatch errors from the Arduino IDE console. But now I'm questioning if the IDE thought I was trying to upload content to my Arduino Uno, which I now think was still connected. Regardless, if only the Gemma is connected, I'm not able to see it in the Device Manager -> Port (I only see a place for the Arduino Uno, at COM5. Interestingly, the Arduino IDE says "Adafruit Gemma 8MHz on COM5" on the bottom). I've also attached a screenshot of this.
Gemmablink.png
Gemmablink.png (66.1 KiB) Viewed 5701 times
I have another Gemma coming in the mail in a few days, so I can try and test against that. I'm definitely thinking about ordering another mini USB to see if that's causing any problems. Anything else I should be looking at to figure out what I'm missing? Any help is greatly appreciated (stumbling in vain for hours on a "Hello World" tutorial is just a painful experience).

Stevenlong1985
 
Posts: 11
Joined: Wed Oct 09, 2013 11:10 am

Re: Gemma Bootloading Problems

Post by Stevenlong1985 »

Any luck with this? I am also having the same issues

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Gemma Bootloading Problems

Post by adafruit_support_rick »

The Gemma won't show up as a Com port in Device Manager, and it won't show up as a serial port in the IDE (regardless of what is says at the bottom of the window). It's enough to have the Gemma selected as the board type - the IDE will know enough to look for a USBtinyISP.

Evan_Pierce
 
Posts: 30
Joined: Thu Sep 12, 2013 3:30 pm

Re: Gemma Bootloading Problems

Post by Evan_Pierce »

Awesome, thanks, that's super helpful. So then it's plausible that I've set up my Windows 7 correctly. Now I just need to figure out why my Gemma appears to be perpetually disconnecting / reconnecting to my computer, resulting in what appears to be a perpetual Bootloading state, along with the soundtrack of my computer's helpful 2-note song informing me every 10 seconds that a USB device has been connected/disconnected.

My current guess is that I got a faulty mini USB cable. Either way I might as well order a new one, and I'll give an update in a week when it gets here. Unless there's anything else you can think of that I might be overlooking that might be capable of causing this perpetual reconnecting/bootloading issue.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Gemma Bootloading Problems

Post by adafruit_support_rick »

Nope - that is normal behavior on Windows. The bootloader runs for 10 seconds, then jumps back to the loaded code. On a fresh Gemma, the loaded code simply jumps back to the bootloader. So you get this 10-second connect/disconnect cycle.

When you upload code, try to hit the cycle while the bootloader is running.

Evan_Pierce
 
Posts: 30
Joined: Thu Sep 12, 2013 3:30 pm

Re: Gemma Bootloading Problems

Post by Evan_Pierce »

Thanks again! So I got my second Gemma in the mail today, and it's behaving slightly differently, but still isn't quite working.

With the new Gemma, it runs through the bootloading process when plugged into my computer, but when it finishes with its bootloading, it stops (green power LED stays on), and doesn't perpetually re-cycle through the Bootloading code that it comes with. So that's interesting, though I don't know if that means that one of them isn't working right.

Anyway, I'm quite sure that I am uploading the Gemmablink code within the Bootloading process, but this isn't successfully programming the Gemma, for either Gemma.

The error message that I'm seeing from the Arduino IDE is the same as the png that I uploaded initially, which raises two eyebrows:
System wide configuration file is "C:\Program Files (x86)\Arduino2\hardware/tools/avr/etc/avrdude.conf"
avrdude: Error: Could not find USBtiny device (0x1781/0xc9f)

I ran the same from a clean C:\Program Files (x86)\Arduino install, and got the same error message except with Arduino instead of Arduino2 (with avrdude.conf changed for both installs).

The \ changing to / catches my eye. I don't think I typed that in anywhere. If that could be the culprit, then I'm not sure where to change it.

Is the second error message expected as well? The one that reads "avrdude: Error: Could not find USBtiny device (0x1781/0xc9f)"

Thanks for your time, you've been super helpful so far.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Gemma Bootloading Problems

Post by adafruit_support_rick »

Evan_Pierce wrote:The \ changing to / catches my eye. I don't think I typed that in anywhere. If that could be the culprit, then I'm not sure where to change it.
That's normal - it's not a problem.
Evan_Pierce wrote:Is the second error message expected as well? The one that reads "avrdude: Error: Could not find USBtiny device (0x1781/0xc9f)"
Are you pressing reset before the upload starts? In bootloader mode, the Gemma should look like a USBtiny to the system.
Evan_Pierce wrote:With the new Gemma, it runs through the bootloading process when plugged into my computer, but when it finishes with its bootloading, it stops (green power LED stays on), and doesn't perpetually re-cycle through the Bootloading code that it comes with. So that's interesting, though I don't know if that means that one of them isn't working right.
I believe they've changed the default code that ships on the Gemma to avoid the perpetual cycling.

Evan_Pierce
 
Posts: 30
Joined: Thu Sep 12, 2013 3:30 pm

Re: Gemma Bootloading Problems

Post by Evan_Pierce »

Awesome, thanks again.

I'm definitely pressing the reset button before the uploading starts (I've tried a hundred different upload timing sequences just to be sure, but that sequence was my default).

I'm sure the problem is some dumb thing I did in setting something up (thus explaining away 99% of all engineering problems). Could it be the USBtinyISP AVR Programmer driver? Or does the png of my device manager in the op mean that there aren't problems there?

Fortunately we have the Arduino IDE console error message. So what situations could be causing avrdude to not be able to find the USBtiny device?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Gemma Bootloading Problems

Post by adafruit_support_rick »

Evan_Pierce wrote:Or does the png of my device manager in the op mean that there aren't problems there?
Sure looks like it's installed correctly.
Evan_Pierce wrote:So what situations could be causing avrdude to not be able to find the USBtiny device?
You may simply not be hitting the timing window, and the bootloader is timing out before avrdude starts looking for it. Experiment with the timing of pressing the reset button

Evan_Pierce
 
Posts: 30
Joined: Thu Sep 12, 2013 3:30 pm

Re: Gemma Bootloading Problems

Post by Evan_Pierce »

Hmmm, I'll try more of this tonight, but I'm really very sure that of all the possible variables involved, the one that I can pretty much guarantee I'm doing correctly is uploading the Gemmablink code while the Gemma is blinking after just pressing the reset button. I've tried uploading the code dozens of times, changing up the timing frequently to make sure that I'd hit the window of opportunity at some point.

I could be wrong, but I really suspect that the problem is elsewhere. And assuming that at least one of the Gemma are working properly (and I have no reason to think they aren't both working properly), that leaves the way in which I set up my Windows 7 box. My next step might be to just tear it all down and re-install everything Arduino-related. Unless there's anything more specific I might want to try to fix first for why my avrdude can't find the USBtiny device.

User avatar
mauimacman
 
Posts: 34
Joined: Thu Jan 24, 2013 11:00 pm

Re: Gemma Bootloading Problems (trinket and ATMega32u4 also)

Post by mauimacman »

I have the gemma plugged into my Macbook Pro USB port (the powered one) and the boot loader (I think) is working because the red light is pulsing. Problem is this error message when I press reset and try to upload code with Gemma selected for Board: "avrdude: usbdev_open(): did not find any USB device "usb"" I have been so unsuccessful with Trinkets, Atmega 32U4 breakout board and Gemma that I wish I had someone who would TALK ME THROUGH troubleshooting! I know if I could only interact with SOMEONE KNOWLEDGEABLE ABOUT THESE MICRO-CONTROLLERS that I could be helps. But not having much experience, this texting back and fourth is not helping nor making things clearer for why my devices are not working as advertised. :-( Can some kind soul call me up or skype with me? TIA

User avatar
mauimacman
 
Posts: 34
Joined: Thu Jan 24, 2013 11:00 pm

ADDENDUM Re: Gemma Bootloading Problems (trinket and ATMega3

Post by mauimacman »

It says on the intro to Gemma page: "The bootloader will 'time out' after 10 seconds, so to re-enter the bootloader mode just re-press the button!" on Mine the bootloader is NOT timing out. Just pulsing incessantly waiting. I'm trying to reload the Gemma support files and when I click on the avrdude.conf link to download that file, I get a display of a web page: http://learn.adafruit.com/system/assets ... 1378680681

and nothing downloads???

Sorry, but using both the trinket and gemma boards are not as easy and painless as made to sound, at least for me? Is anyone listening?

Evan_Pierce
 
Posts: 30
Joined: Thu Sep 12, 2013 3:30 pm

Re: Gemma Bootloading Problems

Post by Evan_Pierce »

@MauiMacMan,

As you can probably tell from this thread, I'm well-acquainted with how frustrating it can be to get Gemma set up. Like most technical things, just getting over that hurdle of "Hello World" can be a painful and prolonged experience. But once you're there, you have a foothold to build from and can start to really get going.

You should probably know that the customer support here is pretty much amazing. Try calling Amazon when your Arduino isn't working properly. I've found that Adafruit pretty reliably can get back with a response from a knowledgeable engineer a couple times a day, which is again, amazing. I understand it can be frustrating to wait even that long, but that's the situation, and it's best to understand it and work within it to get best results. I'm sure with perseverance we'll both have a functioning Gemma / Trinket setup, and will be able to start cranking out awesome and inexpensive projects.

Anyway, earlier in this thread, Rick mentions that recently they changed their Gemma design so that the code it comes with no longer does that annoying perpetual bootloading process when you first plug it in. But, earlier versions of Gemma (probably such as the one you have) still does that annoying perpetual connecting / disconnecting thing. Once we figure out how to successfully program our Gemmas, that should stop happening, which will be nice.

For the avrdude.conf "download" I found the same thing. I just copy/pasted it into a its own file and named it avrdude.conf . But, it did strike me as either unintended, or phrased poorly and I considered asking about it, so yeah, while I'm troubleshooting thanks for reminding me of that to make sure that I did the right thing.

As for your error "avrdude: usbdev_open(): did not find any USB device "usb"" I clearly am not a super knowledgeable person right now for this, but my own error is
"avrdude: Error: Could not find USBtiny device (0x1781/0xc9f)"
And the differences between our errors makes me wonder if you didn't set your Programmer to USBtiny ISP (Programmer is found in the Tools dropdown. I'm not at that computer right now unfortunately, it might not be called exactly USBtiny ISP, but it's something similar).

Anyway, if that's the case then that may be your problem (be sure that tools-programmer is set to USBtiny ISP or something that looks like it). Do feel free to give an update on this thread. But, you know, you can expect that it'll only get looked at once or twice a day at best. But with your expectations in check, best of luck in getting it working!

dafoink
 
Posts: 15
Joined: Thu Jun 26, 2008 12:03 pm

Re: Gemma Bootloading Problems

Post by dafoink »

I am getting the same problem. I have tried this on win8, win7, and xp.

I have updated the avrdude.conf with what was provided on the site. and installed all the drivers. I get a valid USBTinyISP Programmer device show up in device manager.

the red light constantly blinks. and seems to sporadically disconnects from USB at different intervals. I have tried to do timing where I wait for it to reboot, try to hold the button until right before upload happens, etc. but it always fails.

If I have the device completely out of the picture, I just get the could not find USBtiny device

but, if it is plugged in, sometimes I get that, other times I get the ton of lines of errors.

I have tried the Blink as well as a simple bare minimum and nothing seems to work

(NOTE: this is a brand new device. so, if they changed the way these things operate, they must have sent me an old one. I just got this in the mail yesterday, 10/9/2013)

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: ADDENDUM Re: Gemma Bootloading Problems (trinket and ATM

Post by adafruit_support_rick »

MauiMacMan wrote:when I click on the avrdude.conf link to download that file, I get a display of a web page: http://learn.adafruit.com/system/assets ... 1378680681
and nothing downloads???
That is the file. Are you using Safari? Just right-click on the link and select "Download Linked File"

The error you're getting suggests that you don't have avrdude.conf installed. avrdude should be looking for a "usbtinyisp"

Locked
Please be positive and constructive with your questions and comments.

Return to “Wearables”