This thread has been very helpful and very confusing at the same time.

I have a Uno R3 loaded w. ArduinoISP wired to a Atmega328-PU (purchased with uno bootloader preloaded) wired on a breadboard. Using 1.02 on 10.5.8.

I have now successfully uploaded sketches to the breadboard, but only after changing the signature in in avrdude.conf from 0x0F to 0x14, else I get the "expected signature" error in avrdude. Everybody else in this thread seems to just need the avrdude.conf fix to burn the bootloader, and can upload sketches without modifications?

I figured my preloaded bootloader might be the cause for this, so i tried to reinstall the bootloader, but via ArduinoISP this always gave me avrdude: verification error, first mismatch at byte 0x0000(same setup where uploading sketches works)I tried with optiLoader, which seems to work ok (I don't know if there is feedback on errors) but the result is the same, still signature errors on sketch upload.

Your setup is not correct for uploading sketches USING the bootloader, which would happen using the serial port of the target AVR (and is somewhat difficult to do to a breadboard AVR using an existing Arduino as the usb interface - the usual "upload" path after burning the bootloader is via an FTDI usb/serial cable or dongle.)What you describe is consistent with having gotten "upload using programmer" to work; this doesn't use the bootloader (and in fact erases the bootloader each time), but does require the permanent change/upgrade to the CPU type in the avrdude.conf file.I can't explain the failure to verify when burning the bootloader. Exactly which process are you using to burn the bootloader? The IDE's "burn bootloader" or something else? Have you modified boards.txt, or ONLY the avrdude.conf file?

What you describe is consistent with having gotten "upload using programmer" to work; this doesn't use the bootloader (and in fact erases the bootloader each time), but does require the permanent change/upgrade to the CPU type in the avrdude.conf file.

Thanks a lot for clearing that up for me.

I feel a little stupid posting in this thread now, as I realize I'm not sure I even need a bootloader. I want to transfer a working arduino sketch into a hardwired version with only the microcontroller, not an arduino board - this seems to work!

I also want to do this with smaller chips (I got an attiny85 too) and I remembered that the bootloading procedure was needed there to set the fuses, so I followed this tutorial but with arduino-tiny cores. Burning the bootloader gives errors (expected?), but I think it worked for the fuses I think it worked for the fuses(If I burn the 8 Mhz bootloader, but then select the 1 Mhz board prior to uploading the blink sketch, the led goes ~ 8 times faster) .

So I guess I'm there - is there anything I am missing out on? It is not clear what advantage the bootloader would give me - debugging via serial maybe?

One of these days I'll have to find out how to get the chip to tell me what it is.I was able to get it to work but it was so many months ago I can't be sure of details, it can be done with Arduino 0022 and UNO as ISP.

When you install a bootloader on the 328-PU (Non PicoPower) you have to create a new 328 entry in avrdude.conf with the correct signature. You then create a new 328 boards.txt entry pointing to the new 328 device in avrdude.conf, but otherwise using the same details (bootloader, fuses etc) as the 328P entry.

So, this allows you to burn a bootloader and set fuses for 16Mhz external crystal etc, just like for the 328P.

The problem is then when you come to upload a sketch, whether via Upload (Serial and bootloader) or Upload via Progammer (ISP programmer gia ICSP/SPI). If you leave the board type in IDE set to 328 (non P) then you'll find you can't compile and upload.

What you have to do is switch back to telling IDE/avr-gcc/avrdude that it's the normal Uno 328P.

So, you burn bootloader with 328 set as board, but upload with Uno as the board.

Don't forget if it's barebones then you need to do a manual reset after the compile has completed (if using serial via the bootloader).

I think the issue is actually with the (older) version of avr-gcc compiler that Arduino IDE uses. For some reason it doesn't handle the non-P 328 uC, so you have to lie and say it's a 328P.

When you burn the bootloader/set fuses etc, then the signature of the chip is actually read and has to match the signature of a device that avrdude/IDE knows about, to match a bootloader via boards.txt, hence adding a 328 entry to avrdude.conf and boards.txt to get last that hardware check and allow you to get the Uno bootloader into the chip, even if you just use it to set fuses and then reveret to ISP programming afterwards (where you just tell everything it's a normal Uno).

If it's really an invalid signature, I think it usually tells you what it's getting and what it expects. I think this is a general error due to failure to communicate.

You get that error for various reasons - have you checked your connections? Have you disabled auto-reset? If it's a new chip, you will need a crystal and caps at least until you have the bootloader written (which also sets the fuses).

So a quick question in regards to this thread, if I am getting back a message from avrdude stating the chip is returning 0x000000 or 0xffffff as it's signature should I assume it is trashed? I'm using an Atmega328P-PU and trying to burn a bootloader based on the steps in the Arduino to Breadboard tutorial. I was using the chips to test some simple sketches on a breadboard and they stopped accepting sketch changes so I'm trying to recover them.

Thanks Westfw, I'll double check all my connections to make sure. On a whim I put the chip on an UNO and uploaded the blink sketch to it and it worked. I was then able to upload my sketch again, but I have that 2 second bootloader pause now that I wasn't having before. I'm going to try and reload the bootloader with makefile changes talked about in http://arduino.cc/forum/index.php/topic,37347.0.html.