Replacing bootloader used within the arduino IDE

Hi,
I've just received a USBTiny programmer and I am OK with using the 'burn bootloader' with the USBtinyISP option.
However is it possible to replace the 'standard' optiboot hex file supplied with IDE0022 with westfw's optiboot version in order to use the above process?
TIA
Texy

sure just download the optiboot from westfw github page compile it for your atmega and replace the hex file, but i think that the new optiboot its already compiled for atmega 328 running at 16mhz so you can simply copy the hex file to your current arduino installation and rename it to the old file

you also need to change the boards.txt to reflect the new amount of memory you can use (since the new version of optiboot its smaller)

OK thanks. Is there an easy way, maybe via avrdude, to show exactly how much memory the bootfile uses?

Texy

The amount of memory that the bootfile uses is not the important number.
The fuses control how much flash memory is allocated to the bootloader
and those sizes are powers of two, starting at 512 bytes.
(i..e 512, 1024, 2048...)

So for example, say the bootloader is 400 bytes large.
If the fuses are configured for a 512 byte bootloader then 512 bytes is how much flash is lost
to the bootloader even though the bootloader itself is only 400 bytes.

Likewise if you were using the pre optiboot booloader on a Duemilanove or Nano
and were reprogramming it with an optiboot bootloader.
Since the original bootloader was larger, until you re-program the fuses,
the smaller optiboot bootloader will still consume 2k of flash.

The boards.txt file also configures the fuses used when the IDE calls avrdude to burn a bootloader.

The Makefile configures the fuses when the makefile uses avrdude to burn the bootloader.

--- bill

Bill, I appreciate that explaination. I wasn't aware of that info - thanks.
So out of interest, knowing that the new optiboot only uses 512 (or less) bytes,
how much did the old version use, ie one thats currently 'built in' to IDE v.22,
for an Uno, for example.

Texy

Optiboot, as has shipped starting with the Arduino Uno, has always been a 512byte bootloader.
The new version got a bit smaller, added new features and got bigger again, but never went over 512 bytes. The next smaller size is 256 bytes, and THAT isn't going to happen outside of an assembly language implementation of a different (simpler) protocol (and even then, I think I'd rather add features (EEPROM!) rather than claim another 256bytes for sketch code.)

The older bootloader (ATmegaBOOT_168.c) fit in 2K.

OK thanks westfw.
I asked the same question in your optiboot anouncement thread, but here goes :
Is the hex file attached in your first post the latest an greatest version?

Rgds,
T.