Introduction: AVRDUDE - PAGEL and BS2 Error - Fixed!

About: I have been working in IT since the mid 1980's. Most of that has been database and application development. I've been working on Internet application development since the late 1980's. And, we're back in Tass…

One of the things that I found annoying while using the Arduino IDE was the perennial "AVRDUDE" warning that always pops up in the message panel of the IDE when transferring a sketch to the target chip (ATTiny84 and ATTiny85)

I searched high and low on the Interweb and found LOADS of people saying to simply ignore the error and move on. In fact, some people indicated that this meant that the transfer worked OK.

My problem with that is that I didn't know if the warning hid anything else.

So I put on my Pith Helmet and Safari Suit and went exploring in earnest.

I found a solution ... and I will share it with you, here.

The first advice that I offer, is to go and visit this Wiki. This is where I struck gold.

Step 1: Instructions

when you are programming an ATTiny85 (and apparently the 84 too) is a consequence of some missing configuration in the avrdude.conf file that comes with the Arduino.

Apparently, you need to correct the configuration problems and then everything will be fine. It is.

1. Go to your Arduino IDE installation folder (something like C:\Program Files (x86)\arduino-1.0.4\hardware\tools\avr\etc.

2. Before you do anything … make a backup of the file avrdude.conf

3. Open the avrdude.conf file in a text editor

4. locate the ATTiny85 section in the file

5. locate the chip_erase_delay = 4500; line

6. add the following two lines below this:

pagel = 0xB3;

bs2 = 0xB4;

7. locate the memory=”lock” keyword in the ATTiny85 section

8. replace this section with the following (copy and paste)

memory "lock"

size = 1;

write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", "x x x x x x x x 1 1 i i i i i i";

read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", "0 0 0 0 0 0 0 0 o o o o o o o o";

min_write_delay = 9000;

max_write_delay = 9000;

;

Do the same for the ATTiny84 section. You will need to restart the IDE for this to be affected. After this, you need to

  • Connect the ATTiny85 to the Arduino using your favourite ICSP
  • load the sketch into the IDE
  • Select the ATTiny85 board in the IDE
  • Select Arduino as ISP in the IDE
  • Upload your sketch to the ATTiny85.

That should fix the problem. I have now tested the abovementioned fix and the error message has now gone away. To test this, I loaded the sketch from Tutorial 10, compiled and then uploaded it to the ATTiny85 without the PAGEL BS2 error message.

Step 2: Endnote

The writers of those articles that say that you can simply ignore the error are right ... you can. The problem is ephemeral and does not hide any dire consequences.

I just don't like to see an error left unaddressed.

Thanks very much to the wonderful people who wrote the Wiki