Lilypad only programmed once, now fails

Hi,

I’ve used a couple of arduino’s, have just bought my first Lilypad - a 328 one with 6-pin programming header, programmed by a USB to header cable with embedded FTDI (from coolcomponents in the uk).

First programming worked fine, LED on pin 13 flashed until loaded, then application runs, with constant output on serial port as expected.

However, it won’t reprogram with arduino-0018 (also tried -0012). The LED never comes on, pressing reset stops the serial output until it’s released and then it starts again.

With verbose enabled, programming fails sitting at:

avrdude: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32
         Copyright (c) 2000-2005 Brian Dean, [... website removed for first post to keep forum happy...]

         System wide configuration file is "E:\OpenSourceApps\arduino-0018\hardware/tools/avr/etc/avrdude.conf"

         Using Port            : \\.\COM5
         Using Programmer      : stk500v1
         Overriding Baud Rate  : 57600
avrdude: ser_open(): setting dtr

It sits there for as long as I’m prepared to wait… if I press reset a couple of times it eventually adds the following:

avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Recv: 
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: Send: Q [51]   [20] 
avrdude: Recv: 
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x00

avrdude done.  Thank you.

Any ideas, would reprogramming the bootloader be sensible? Is 57600 baud correct (it worked first time round)?

Anything else I should check?

Nigel

Now fixed by reflashing the bootloader with a Duemilanove and Arduino ISP - see http://arduino.cc/en/Tutorial/ArduinoISP

Still not sure what blew the bootloader in the first place. Code had a fault where it was trying to address non-existent pins (digital pins up to 19!), but I wouldn't expect that to kill a bootloader...

The fixed code now reprograms without any problems, very impressed with ArduinoISP, easy to set up and simple to use!

Hope this helps someone else!

I ran into similar problems when experimenting with a homebrew arduino using the internal oscillator and using the lilypad bootloader, I never arrived at a solution before returning to the nice safe waters using a 16 Mhz resonator and a 'standard' bootloader.