Can Only Upload Once

Steps to reproduce:
Burn a ATMEGA328P-PU with an ArduinoISP - No errors
Download blink sketch - No errors and it blinks
Download blink sketch a second time - Fails with following error:
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding

Burning and downloads from Arduino Development Environment on a Mac. Arduino is breadboard variety like http://itp.nyu.edu/physcomp/Tutorials/ArduinoBreadboard

If the atmega is burned again, a sketch can be downloaded once.

Any ideas for diagnosing this? Is there anything funky about ArduinoISP burning?

Did you set the lock bits after uploading the bootloader?

Which bootloader code are you using. This sounds like on of the Uno bootloader bugs that surfaced a while back. There is a newer version around that solves it, search around. I don't own a Uno so I haven't kept a link.

Lefty

Lefty, are you thinking of the "amnesia" bug? This sounds different.

Is the BOOTRST fuse set?

Don

Looks like that breadboard does not implement auto-reset.

Connect the Reset pin (Pin 1 of the ATmega) to ground until you see the "Binary sketch size" message in the IDE.

It was the auto reset issue!

I'm not sure why the first sketch uploads without holding the reset button, but burn and repeated upload worked with 2 atmega328p chips.

Also had to move freshly burned chip to another breadboard (instead of uploading on same board as Arduino ISP), but this is a good idea anyway.

I think it's because with a fresh bootloader there is no sketch to run so the bootloader just waits for your upload.

Once a sketch has been uploaded the bootloader only gets control for a short time after reset before turning control over to the sketch. If the upload doesn't start during that window the bootloader won't process it.