Trinket issues!

Our weekly LIVE video chat. Every Wednesday at 8pm ET!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
slimslappy
 
Posts: 4
Joined: Fri Jan 24, 2014 9:14 pm

Trinket issues!

Post by slimslappy »

I have purchased a trinket a while back for a project. I was able to get my laptop using W7 to recognize and tried to upload some code to make some LEDs blink. The problem is that when I uploaded code it was unable to complete the install. The trinket is now bootloading every 10 seconds and is stuck in a continual bootload. I have been unable to stop this and tried the rest button but does not stop this issue. Not sure what to do to make it stop or at least try to repair the bootloader.

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

Re: Trinket issues!

Post by adafruit_support_rick »

We have instructions on repairing the bootloader here:
https://learn.adafruit.com/introducing- ... bootloader

User avatar
slimslappy
 
Posts: 4
Joined: Fri Jan 24, 2014 9:14 pm

Re: Trinket issues!

Post by slimslappy »

getting an error code when I try to reload the bootloader off of the link given....?

this is what its giving me

trinketloader.ino:20:24: error: optiLoader.h: No such file or directory
In file included from trinketloader.ino:21:
C:\Program Files (x86)\Arduino\libraries\SPI/SPI.h: In static member function 'static byte SPIClass::transfer(byte)':
C:\Program Files (x86)\Arduino\libraries\SPI/SPI.h:56: error: 'SPDR' was not declared in this scope
C:\Program Files (x86)\Arduino\libraries\SPI/SPI.h:57: error: 'SPSR' was not declared in this scope
C:\Program Files (x86)\Arduino\libraries\SPI/SPI.h:57: error: 'SPIF' was not declared in this scope
C:\Program Files (x86)\Arduino\libraries\SPI/SPI.h: In static member function 'static void SPIClass::attachInterrupt()':
C:\Program Files (x86)\Arduino\libraries\SPI/SPI.h:63: error: 'SPCR' was not declared in this scope
C:\Program Files (x86)\Arduino\libraries\SPI/SPI.h:63: error: 'SPIE' was not declared in this scope
C:\Program Files (x86)\Arduino\libraries\SPI/SPI.h: In static member function 'static void SPIClass::detachInterrupt()':
C:\Program Files (x86)\Arduino\libraries\SPI/SPI.h:67: error: 'SPCR' was not declared in this scope
C:\Program Files (x86)\Arduino\libraries\SPI/SPI.h:67: error: 'SPIE' was not declared in this scope
trinketloader.ino: In function 'void setup()':
trinketloader:40: error: 'Serial' was not declared in this scope
trinketloader.ino: In function 'void loop()':
trinketloader:49: error: 'Serial' was not declared in this scope
trinketloader:62: error: 'image_t' was not declared in this scope
trinketloader:62: error: 'targetimage' was not declared in this scope
trinketloader:64: error: 'readSignature' was not declared in this scope
trinketloader:66: error: 'findImage' was not declared in this scope
trinketloader:69: error: 'eraseChip' was not declared in this scope
trinketloader:71: error: 'programFuses' was not declared in this scope
trinketloader:74: error: 'verifyFuses' was not declared in this scope
trinketloader:88: error: 'readImagePage' was not declared in this scope
trinketloader:95: error: 'flashPage' was not declared in this scope
trinketloader:103: error: 'programFuses' was not declared in this scope
trinketloader:110: error: 'verifyImage' was not declared in this scope
trinketloader:116: error: 'verifyFuses' was not declared in this scope
trinketloader.ino: In function 'void error(char*)':
trinketloader:130: error: 'Serial' was not declared in this scope
trinketloader.ino: In function 'void start_pmode()':
trinketloader:144: error: 'debug' was not declared in this scope
trinketloader:156: error: 'spi_transaction' was not declared in this scope
trinketloader.ino: In function 'void end_pmode()':
trinketloader:162: error: 'SPCR' was not declared in this scope
trinketloader.ino: In function 'boolean target_poweron()':
trinketloader:181: error: 'LED_PROGMODE' was not declared in this scope
trinketloader:186: error: 'Serial' was not declared in this scope
trinketloader.ino: In function 'boolean target_poweroff()':
trinketloader:195: error: 'LED_PROGMODE' was not declared in this scope

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

Re: Trinket issues!

Post by adafruit_support_rick »

You have to target an Arduino Uno. Looks like your board type is still set to Trinket

User avatar
slimslappy
 
Posts: 4
Joined: Fri Jan 24, 2014 9:14 pm

Re: Trinket issues!

Post by slimslappy »

Ok, Thanks for you help

User avatar
slimslappy
 
Posts: 4
Joined: Fri Jan 24, 2014 9:14 pm

Re: Trinket issues!

Post by slimslappy »

Well I am able to use the bootloader and fixed my issue with my trinket. I am now having an issue with uploading code on it now. I type out the code, plug in the trinket, and push the reset button, and lat upload the code within the 10 second load frame. I have followed the steps in the tutorial on adding trinket to arduino IDE. Im getting an error with the avadude?

Binary sketch size: 3,346 bytes (of a 5,310 byte maximum)

avrdude: error: usbtiny_transmit: usb_control_msg: sending control message failed, win error: A device attached to the system is not functioning.

(expected 4, got -5)
avrdude: verification error, first mismatch at byte 0x0000
0x22 != 0x00
avrdude: verification error; content mismatch

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

Re: Trinket issues!

Post by adafruit_support_rick »

That could be a bad USB cable. Try a different one. Also try a different USB port, and try connecting through a USB hub.

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

Return to “Ask an Engineer! VIDEO CHAT (closed)”