Atmega328P-PU bootloader beeing erased

Hi all,

I have reached a wall and dont know what to do now.

I have burned the optiboot pro mini 8mhz 3.3v bootloader with Nick's project (thx Nick btw!).

The bootloader is burned ok.

When I use the "arduino as ISP" to upload a project, it uploads ok.

But when I use Nick's board detector I can see the bootloader is all blank! all 0xFF!
The project runs fine (blink example) but the bootloader seems to have been erased...

any clues why?

thank you in advance!

If you burn a sketch using ISP, it writes the sketch over the bootloader.

Actually, unless the sketch takes the whole memory, it does not cover the bootloader area, but the chip is erased before writing the sketch and so the bootloader is erased in the process.

If you write a sketch over ISP, you are not needing the bootloader in any case.

Why does this surprise you?

Thank you Paul__B,

I didnt know that. I thought it was supposed to leave the bootloader area untouched...

Besides I only used the "arduino as ISP" on this atmega328P-Pu because I am having trouble using my cp2102 to upload projects to it... I have another chip where it all works fine but not this one.

If you can craft the binary files separately, outside of the IDE and using avrdude directly, you can splice the sketch binary with the bootloader and load both. But this is really only necessary where for example, you want to sell a board with the bootloader and include the demonstration "blink" sketch.