Flashing a trinket with no bootloader

Is it possible to flash a trinket (or any arduino for that matter) with only your sketch and no bootloader and use a Uno to flash the board with updates ?

I'd like to have more room for my code. I think I'll have to use averude and use different fuse settings to start @ 0x0

This should give me roughly 8k of code space instead of 5.3k


Yes, just use the upload via "Upload Using Programmer" in the file menu. (Wasn't that hard to find was it...)

But on most Arduino's like the Uno the bootloader isn't that big. I at least never managed to make Uno code that's to big for the Uno and I made some complex systems with it... But I must say, I don't know the Trinket. 2,7k for the bootloader seems to be idiotic large.

On most arduinos, just do upload using programmer, with an ISP programmer of your choice connected.

However some Trinket-like (ie, ATtiny85 with VUSB bootloader) boards blow RSTDISBL making it impossible to program them via ISP without resetting that with an HV programmer, which most of us don't have. The official board doesn't do this - but make sure the ones you're buying don't.

For those Tiny85 boards that have RSTDISBL fuse programmed, the HV programming can be done with an Uno, resistor, and 12V battery or other 12V source. If USB connection is not needed, but still desire the USB power port, remove the 2 resistors that connect PB3 and PB4 to the USB connector. That makes the board a simple breakout board with a regulator for VIN input, and a USB socket as alternative power supply. Programming the RSTDISBL to gain another I/O pin is an easily accessible feature, and easily reversed for programming a new sketch.


Ok so if I get this right and I use a Uno as a programmer to the Trinket (AtTiny85) and I use the "Upload Using Programmer" option, the bootloader will not be uploaded and I will be able to you the hole 8k ? How simple is that :D This means that the trinket should boot strait to code.

I didn't think it would work since the tutorial says the use this method to re-install the bootloader if it gets corrupted.

I haven't seen anything related to RSTDISBL in the Adafruits documentation. But then again, there is a lot of info, I could have missed it.

Thanks, Sid

Yes, you would have the whole 8K of flash for your sketch, and you would no longer have a bootloader so you will not be able to program it any more through the USB port using the documented Trinket upload method, unless you re-install the bootloader using the programmer.

I don't think RSTDISBL is mentioned in their documentation, but it is in the ATtiny85 data sheet. If you program the RSTDISBL fuse, you will get an extra I/O pin, PB5. You would have to program the fuse after you upload the sketch, and then you will not be able to upload anything further until you use HV programming to reset the fuses. There is info in the link I gave.

I missed the RSTDISBL the first time I read section 10.3.1 of the datasheet. I went ahead and revisited. I’ll go read your now now.

Thank you


Very informative. Thank you very much. I do have one question though. would any 12V battery work ? For example a car battery or a emergency light 12v battery ?

The link shows a 27A 12V battery so I would fuse with 25 or 30 A ?


Any 12 V source would be OK. I have used a UPS battery before. Those 27A batteries are very inexpensive when ordered through eBay, so I like to use them because they are very small and handy to put on a breadboard. A car battery may be OK, but measure the voltage. If it has 13 or 14 volts that may be too high. Since those Tiny85 boards are very cheap, you would not be risking very much by experimenting.

dmjlambert: If it has 13 or 14 volts that may be too high. Since those Tiny85 boards are very cheap, you would not be risking very much by experimenting.

I imagine that at 12.6 it would still be to high ? I'd butter use a UPS battery. I got one all ready to go and they are 12.4 fully charged. I can drain it a bit before resetting the fuse.

Thank you, really informative.


12.6, I don't know. In an ideal world you would put exactly 12.0V on the reset pin, and use the transistor switch to get the timing right of exactly when the 12V is applied, and follow the data sheet exactly regarding the programming sequence. If you deviate from that, you are experimenting, and may learn that something else works most of the time or some of the time, or you may burn out an inexpensive component (like the processor). These AVR processors are pretty hardy, and it could be that even 20V is OK, especially since you are using a resistor. The closer to proper specifications you use, the more likely the process is to work. It's all about costs and risks and learning.

To be safe with 12V you could use a step-up switcher from Pololu https://www.pololu.com/product/2117. Since hardly any current needed in 12V programming, you can feed the switcher right from the IO port. A 20-50 Ohm current limiting resistor is recommended for switcher's input capacitor in-rush current.

Trinkets also lack an ISP header, so you'll have to jumper your Arduino-as-ISP (or other programmer) to the correct pins manually...