Starting the Bootloader

About the bootloader


A bootloader is a tiny piece of software residing on the microcontroller that that helps load your own code into the remaining space.

One of the challenges with the Trinket is that we wanted to have a built-in USB bootloader, but the ATtiny85 doesn't have built-in USB hardware! There are existing USB bootloaders that can work on the 't85 but they use other companies' USB VID/PIDs. Since it not permitted by the USB developer's group to use others' VID/PIDs we had to adapt one of these existing bootloaders to use our USB ID, but we also wanted to not have to re-compile avrdude or the Arduino IDE since that's such a pain.

So instead, Frank (our awesome engineer with mad USB chops) created a USB bootloader that combines the elegance of V-USB with the well-supported and tested nature of the USBtinyISP. This bootloader looks just like a USBtinyISP - and since it uses the unique Adafruit VID/PID we own and that we added to avrdude so long ago, it works with only very minimal configuraton tweaks. No need to recompile anything, whew!
Please note: you cannot use the Adafruit USB VID/PID for your own non-Trinket products or projects. Purchase a USB VID for yourself at http://www.usb.org/developers/vendor/

Trinket USB Drivers for Windows

If you're using Windows be sure to follow the Windows Driver Installation page to install the appropriate drivers for your Trinket.

For Mac OSX or Linux you don't need to install any drivers.

 

Special Notes on using Trinket with Linux


Trinket is not supported on Linux operating system at this time - try Mac OS or Windows! However, you can try the following - it does work for some computers

Linux is fairly picky about who can poke and prod at the USB port. You can always run avrdude or Arduino IDE as root, which will make sure you have the proper permissions. If you want to be super-cool you can add a udev rule which will let any user (who is not root) connect to the USBtiny driver. That way you don't have to be root all the time!

Check http://learn.adafruit.com/usbtinyisp/avrdude#for-linux for what to add to your udev file.

How to start the bootloader


Before you try to upload code to the Trinket it must be in the Bootloader Mode. That means its listening for a sketch or program to be sent to it
When the Trinket is in bootloader mode, the red LED will be pulsing. Once the red LED stops pulsing, you must press the reset button to re-enter bootloader mode
The Trinket must be connected to a computer via a USB cable to enter bootloader mode. You can enter the bootloader mode by pressing the little button on the board with your fingernail. The bootloader will 'time out' after 10 seconds, so to re-enter the bootloader mode just re-press the button!

Don't press-and-hold the reset button, be sure to press-and-release!

See the video below for what it looks like to plug it in, have the LED pulse in bootloader mode, time out and then press reset to restart the bootloader
Last updated on 2015-08-20 at 09.54.50 PM Published on 2013-09-03 at 01.30.12 PM