Hello, I'm posting because I had (or better caused...) a problem in my Arduino UNO.
Running the IDE (version 21) on Ubuntu 10.04, I noticed some problems in the serial communications in examples sketch.
Searching this forum I found a solution to my problem in uploading the firmware of my Arduino as explained in this post:
I updated IDE to 022, then I tried to follow the instruction in that reply but now I cannot see anymore the Arduino in the IDE, so I cannot upload anything to the board, wich has the blinking led sketch inside.
When I try to use the command "sudo dfu-programmer at90usb82 flash UNO-dfu_and_usbserial_combined.hex"
I get the message:
"Bootloader and code overlap.
Use --suppress-bootloader-mem to ignore".
Trying to use the option --suppress-bootloader-mem in erase phase didn't help: I get the same message.
This is the result of dmesg command:
[ 1630.521103] usb 2-2: USB disconnect, address 2
[ 1647.432158] usb 2-2: new full speed USB device using uhci_hcd and address 3
[ 1647.594575] usb 2-2: configuration #1 chosen from 1 choice
[ 1964.081229] usb 2-2: USB disconnect, address 3
[ 2779.672176] usb 2-2: new full speed USB device using uhci_hcd and address 4
[ 2779.834698] usb 2-2: configuration #1 chosen from 1 choice
and this of lsusb:
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 004: ID 03eb:2ff7 Atmel Corp.
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 04f2:b071 Chicony Electronics Co., Ltd 2.0M UVC Webcam / CNF7129
Bus 001 Device 002: ID 12d1:1001 Huawei Technologies Co., Ltd. E620 USB Modem
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
You are uploading the wrong file. You should look in the arduino-usbserial directory (I think) for the Arduino-usbserial-uno.hex file, that is the one you need to upload.
Sure am. I followed all the instructions in post #34here and apparently succeeded in getting into DFU mode and flashing the updated firmware - but my UNO is now stuck in DFU mode. I have unplugged and replugged it several times, tried reset and reflashed it but it won't restart in normal mode. lsusb consistently now reports the UNO as 03eb:2ff7 Atmel Corp.
I'm using the (usb) UNO on Ubuntu 10.4 32 bit Netbook Edition with the Arduino IDE v22 (from the Natty repos).
Does anyone have any other suggestions for getting OUT of DFU mode - or do I now own a tiny flat blue brick?
When I program the hex file provided by Arduino-old and Arduino-master versions with dfu-prgrammer, its successfull and works fine, Here is the response when I execute the following statement as
sudo dfu-programmer flash arduino-usdbserial.hex
Validating
4058 bytes used (99.07%)
Where as When I compiled the Arduino UNO firmware (both old and master) with LUFA project. Compilation process successful and hex file is generated successfully.
Now when I programmed the hex file with dfu-programmer as I described in previous post
sudo dfu-programmer flash arduino-usbserial.hex
I got the following response
Bootloader and code overlap
Use --suppress-bootloader-mem to ignore
By using --suppress-bootlader-mem as
sudo dfu-programmer flash arduino-usbserial.hex --suppress-bootloader-mem
Response was
Validating
4152 bytes used (101.37%)
It seems like both dfu-programmer and flip does not permit the hex file size more than 4096 byte (4KB). Why?
where as according to datasheet the Atmega8u2 flash size is 8KB
Another Question, why the size of hex file is exceeded as I did not change the firmware. I compiled the Arduino firmware with LUFA-100807 project as it is. It should be same size as the hex file is provided that is 4058byte.
Please let me know if there is anything I am missing.
Thanks for the PM. The Atmega 8u2 does have 8KB of flash, but the bootloader size is 4KB, leaving just 4KB for your firmware. Here are some ideas:
Cut down your code size - the easiest way to do this is to shorten the strings and the string lengths in Descriptors.c - they are unicode strings so you save 2 bytes per character. Also consider removing code that flashes LEDs if it is unnecessary.
What version of GCC are you using? The 4.3 series generated good code, 4.5 was dreadful, 4.7 is quite good again.
Look closely at the chip on your Uno, some of them have a 16u2 instead of an 8u2 which would give you more space, although you may need a patched dfu-programmer to recognise it.