I have been experiencing issues with uploading sketches to my recently acquired LilyPad USB (atmega32u4) on Linux Mint (32 bits). On Windows 7 (64bits), the board works just fine... Also, my Arduino Uno works perfectly as well on both operating systems! I do have to use the Arduino IDE 1.5.8 for things to run smoothly.
First off, when plugged into any of my USB 2.0 ports, the device is recognized properly as LilyPad USB by SparkFun (1b4f:9208). Commonly, it shows up as ttyACM0, but after some upload attempts, usually it is ttyACM1 or ttyACM2, or even ttyACM3, and usuallly (eventually) "stabilizes" as ttyACM2.
frederikh@NC10 ~ $ dmesg | tail
[ 910.600208] usb 4-1: new full-speed USB device number 26 using uhci_hcd
[ 910.778158] usb 4-1: New USB device found, idVendor=1b4f, idProduct=9208
[ 910.778179] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 910.778192] usb 4-1: Product: LilyPad USB
[ 910.778204] usb 4-1: Manufacturer: SparkFun
[ 910.781496] cdc_acm 4-1:1.0: This device cannot do calls on its own. It is not a modem.
[ 910.781614] cdc_acm 4-1:1.0: ttyACM0: USB ACM device
[ 910.796502] input: SparkFun LilyPad USB as /devices/pci0000:00/0000:00:1d.2/usb4/4-2/4-2:1.2/input/input33
[ 910.797625] hid-generic 0003:1B4F:9208.0011: input,hidraw0: USB HID v1.01 Mouse [SparkFun LilyPad USB] on usb-0000:00:1d.2-2/input2
frederikh@NC10 ~ $ lsusb
Bus 001 Device 003: ID 0ac8:c326 Z-Star Microelectronics Corp. Namuga 1.3M Webcam
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 026: ID 1b4f:9208
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 0a5c:2101 Broadcom Corp. BCM2045 Bluetooth
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
When I run my Arduino IDE 1.5.8 as root, I select my board (LilyPad Arduino USB) and port (ttyACM0). Compiling a sketch is not an issue, but uploading stalls somewhere in the first communication between PC and the LilyPad. Typically, ".s" is send, and "c" is received.
Arduino: 1.5.8 (Linux), Board: "LilyPad Arduino USB"
Sketch uses 4.780 bytes (16%) of program storage space. Maximum is 28.672 bytes.
Global variables use 151 bytes (5%) of dynamic memory, leaving 2.409 bytes for local variables. Maximum is 2.560 bytes.
Forcing a reset using 1200bps open/close on port/dev/ttyACM0
PORTS {/dev/ttyACM0, } / {} => {}
PORTS {} / {} => {}
PORTS {} / {/dev/ttyACM0, } => {/dev/ttyACM0, }
Found upload port: /dev/ttyACM0
/home/frederikh/Arduino/hardware/tools/avr/bin/avrdude -C/home/frederikh/Arduino/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega32u4 -cavr109 -P/dev/ttyACM0 -b57600 -D -Uflash:w:/tmp/build2416191296372586224.tmp/Blink.cpp.hex:i
avrdude: Version 6.0.1, compiled on Apr 3 2014 at 22:55:35
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/home/frederikh/Arduino/hardware/tools/avr/etc/avrdude.conf"
User configuration file is "/root/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyACM0
Using Programmer : avr109
Overriding Baud Rate : 57600
AVR Part : ATmega32U4
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 9000 9000 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
flash 65 6 128 0 yes 32768 128 256 4500 4500 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : butterfly
Description : Atmel AppNote AVR109 Boot Loader
Connecting to programmer: .avrdude: Send: . [1b]
avrdude: Send: S [53]
avrdude: Recv: C [43]
avrdude: ser_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
Sometimes, I can get a little bit further (and the process stalls somewhere halfway sending the actual sketch), and one time, I even managed to complete the upload succesfully. Fiddling with the reset button or changing USB cables (which are common solutions to the problem I can find on the forums) do not alleviate the problem.
When connected to my USB port, LED 13 blinks according to the program that is currently running. Also, the battery led flashes like crazy when no battery is connected. Otherwise, it is burning continuously. Tx and Rx leds are flashing during upload, and LED 13 starts pulsating. All seems normal to me...
How can I fix this uploading issue? It would be awesome to finally be able to upload my sketches to the LilyPad USB!