Bootloaders

Hello to all, I am working on a robot with my arduino board though one problem always seems to crop up: The Bootloader. Why do they last such a short time and then you will have to buy a new one? Could anyone help me?

Why are you buying a bootloader? what kind of bootloader are you talking. Any link of this bootloader in question?

I apologise, I should be more specific. I am using a ATMEGA328P-PU microchip, and I mention again that I have had to replace it twice.

Both had a bootloader burnt onto it.

You might have a bad connection to 328, other wise you wouldnt be frying the processors. I bootloaded several Atmega's and all are running fine without any issues.

I've never heard of someone repeatedly burning out their processor chip before, except when it got wired and/or energized incorrectly.

@sarouje i am trying to install a bootloader to my atmega328p-pu chip. I have followed the link from instructables http://www.instructables.com/id/Burning-the-Bootloader-on-ATMega328-using-Arduino-/step1/Preparing-the-software/.. In the end when i am clicking the burn bootloader option it gives me an error.

"Error while burning bootloader: missing 'bootloader.tool' configuration parameter"

Any help is appreciated

Destronimer:
I apologise, I should be more specific. I am using a ATMEGA328P-PU microchip, and I mention again that I have had to replace it twice.

Both had a bootloader burnt onto it.

As you said both had boot loader, then why are you burning it again?

The error is throwing because the board.txt doesnt has
atmega328bb.bootloader.tool=arduino:avrdude

or some thing similar to that.

I have make changes in the boards.txt file, have written bootloader.tool=avrdude and upload.tool etc whatever was missing but still its throwing me the same error..

Better post the board.txt dealing with 328. This is mine

atmega328bb.name=ATmega328(8 MHz internal clock)

atmega328bb.upload.protocol=arduino
atmega328bb.upload.maximum_size=30720
atmega328bb.upload.speed=57600

atmega328bb.bootloader.low_fuses=0xE2
atmega328bb.bootloader.high_fuses=0xDA
atmega328bb.bootloader.extended_fuses=0x05

atmega328bb.bootloader.file=atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex
atmega328bb.bootloader.unlock_bits=0x3F
atmega328bb.bootloader.lock_bits=0x0F

atmega328bb.build.mcu=atmega328p
atmega328bb.build.f_cpu=8000000L
atmega328bb.build.core=arduino:arduino
atmega328bb.build.variant=arduino:standard


atmega328bb.bootloader.tool=arduino:avrdude
atmega328bb.upload.tool=arduino:avrdude

not sure from where I got it.

That error comes from following pre-1.6.x tutorial under 1.6.x of the IDE - 1.6.x requires a few additional parameters to be specified (including upload.tool).

Once installed, bootloader should continue working until you program the chip again via ISP programming (one can upload a sketch without using the bootloader by wiring it up as if you're going to burn bootloader, and doing "upload using programmer"; doing this removes the bootloader).

Although we talk about "burning" the bootloader, as if it's final, it's not; that's just a colloquial term used for it - the bootloader is just some code that goes into the end of the flash ("burn bootloader" also sets the 'fuses' that set the clock source, and whether a bootloader is present, and a few other things - while the name "fuse" sounds final, these can be reset as well).

The real question for you is what is killing your chips. I would attempt dumping the contents of the flash with AVRdude and an ISP programmer, and see whether it's able to read it. (If you have a USBAsp, which you should since they're only $2 or so on ebay, you can use eXtremeBurnerAVR to read the flash - it's got an actual user interface).
If the flash is not empty, and the chip can be read (make sure you can read a known working chip first, so you know you're doing it right), I would try reburning bootloader and trying to upload normally...

sarouje's post contains a boards.txt entry that uses the internal oscillator at 8mhz. The internal oscillator is not accurate enough for reliable serial communication. If you are trying to use a bootloader with the 8mhz internal oscillator, you should not expect it to work without tuning the chips - sometimes it does, sometimes it doesn't (depends on the individual chip, operating voltage, and temperature - the internal oscillator is really bad wrt stability to different operating voltage).

yes DrAzzy is right, the board.txt is only to show you the individual field config. I am not using that bootloader for regular stuffs, that bootloader is a test one, so that i can quickly test a chip without having the crystal.

@sarouje I have change my boards.txt code which you gave me. Now a new error is making me crazy

avrdude: error at C:\Program Files (x86)\Arduino\Arduino BURN BOOTS\hardware\tools\avr/etc/avrdude.conf:332: programmer type must be written as "id_type"

I have tried to change id to id_type in the avrdude.conf file but still the same error.
I have attached my avrdude.conf file

Danish_Javed:
@sarouje I have change my boards.txt code which you gave me. Now a new error is making me crazy

avrdude: error at C:\Program Files (x86)\Arduino\Arduino BURN BOOTS\hardware\tools\avr/etc/avrdude.conf:332: programmer type must be written as "id_type"

I have tried to change id to id_type in the avrdude.conf file but still the same error.
I have attached my avrdude.conf file

Why are you messing with avrdude.conf?!

The stock one in 1.6.x of the IDE contains an entry for the 328 (non-p) - you should be using unmodified avrdude.conf. The tutorial you are using was written for 1.0.1 which did not include a 328 (non-p) entry in avrdude.conf (which also explains why the boards.txt they gave didn't work)

And you didn't attach an avrdude.conf file - but don't bother, it's no good, just use the one that comes with 1.6.x of IDE!

All you need to do is add an entry to boards.txt under 1.6.x...

I never had to mess around with avrdude.conf. You might be doing some thing wrong. If you are following any instructions that deals with Arduino IDE 1.0.* better download and use that IDE for your experiments.

I bootloaded and programmed several chips using both 1.0.* and 1.6.* but both have difference in boards.txt entry. But never changed any other configs.