Skip to content

V. Flashing the Bootloader

For programming my hello-world board, I use the ArduinoIDE 1.6.12
The ArduinoIDE is not able to flash ATTinys out of the box. Additional Boards definitions are needed to make the IDE compatible. In damellis ATTiny github repository are some issues reported, that there a compiling errors with newer ArduinoIDE versions.
That’s the reason why I choose 1.6.12 version of the IDE

make Arduino-IDE portable

I always use the portable version of the ArduinoIDE. To make the IDE portable, just download the zip version and unzip the archive to your preferred folder.
In that arduino directory just add an empty portable folder.

Every changes, sketches and installed libraries will be stored in that folder. In this way I have a clear separation of the individual projects and don’t stuck in E.g. library incompatibilities or something else.
Whenever I start a new project, I just add an empty text file in the portable folder, that I know, which project the folder depends to. In this case I add a file called portable_helloboard_1612.txt. So I know, this is a portable folder for my helloboard project in ArduinoIDE Version 1.6.12

For archiving my projects, I just rename the portable folder like my added empty text file and move it into my portables archive.

Here is a snippet of my portables archive

organizing the Arduino-IDE

In the past I had compatibility problems with different versions of the IDE again and again.
For this reason, I have created an archive from different IDE versions, so that I can always choose the version I want to work with.

In my folder structure I have a folder with the IDE versions and I have the portables archive folder, where all my projects are stored.

When I would like to start a new project, I do it as described above or if I would like to continue an existing project, I just move the archived portable folder in the corresponding ArduinoIDE folder and rename it just to portable
In case I have forgotten to which project the portable folder belongs to, I just look inside and see that on my empty text file.

installing ATTiny boards

Okay, we go ahead now with the portable ArduinoIDE 1.6.12. After the start, an update dialogue pops up, what we decline by pressing NO !!!

Then we open the Preferences

In the settings window I check the options for verbose output and Display line numbers
In the field for the additional Boards Manager URL we add:

https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json

and confirm with OK

Then we open up the Boards Manager

There we search for attiny and install the latest version

Now we are able to work with the ATTinys. For my hello-world board I used the ATTiny45, so I activate ATtiny25/45/85 in the boards list.

If we open the Tools Menu again, then there are more options now, for the ATTinys.
There I activated the ATtiny45 as the processor, with the Internal 8 Mhz Clock.

flashing the bootloader

The ATTiny needs a Bootloader first, which defines the clock speed.
On my FabTinyISP I connected the ISP header to the corresponding header on the hello-world board.

In the ArduinoIDE I chose the USBtinyISP as programmer

Then it’s time to plug the programmer into the USB Port and with a click of Burning Bootloader the flashing process starts.

Aaaaaand.....FAIL !!!

         Programmer Type : USBtiny
         Description     : USBtiny simple USB programmer, http://www.ladyada.net/make/usbtinyisp/
avrdude: programmer operation not supported

avrdude: Using SCK period of 10 usec
CMD: [ac 53 00 00] [2c 52 53 00]
avrdude: AVR device initialized and ready to accept instructions

Reading | CMD: [30 00 00 00] [00 00 00 00]
CMD: [30 00 01 00] [00 00 00 00]
################CMD: [30 00 02 00] [00 00 00 00]
################################## | 100% 0.01s

avrdude: Device signature = 0x000000 (retrying)

Reading | CMD: [30 00 00 00] [00 00 00 00]
CMD: [30 00 01 00] [30 00 01 00]
################CMD: [30 00 02 00] [00 00 02 00]
################################## | 100% 0.01s

avrdude: Device signature = 0x000000 (retrying)

Error while burning bootloader.
Reading | CMD: [30 00 00 00] [30 00 00 00]
CMD: [30 00 01 00] [00 00 00 00]
################CMD: [30 00 02 00] [30 00 02 00]
################################## | 100% 0.02s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.

After checking the connection and some tries with different clock speeds, I decide to use my Wavgat Programmer.

I changed the programmer in the IDE

And now it runs like a charme.

I’ll make the hole functionality test, during the Embedded Programming week.
There I was able, to successfully flash the hello-world board with my FabTinyISP.
The trick is, to additionally connect the hello-world board via the ftdi port. It seems, that the 5V power from the FabTinyISP is not enough to power the hello-world board.