Go Down

Topic: Problem updating the firmware Arduino UNO Ubuntu 10.04 (Read 5905 times) previous topic - next topic

Robagn

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:
http://arduino.cc/forum/index.php/topic,38112.msg282438.html#msg282438
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

Could anyone help?
Thankyou
Roberto

stimmer

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.
Due VGA library - http://arduino.cc/forum/index.php/topic,150517.0.html

Robagn

It's true. I tried and my UNO now is working.
Many many many many thanks!
Best regards Roberto

tschisass

anyone else struggling with firmware update?
had some problems with downloading the files, every attempt showed another md5sum...

thanks to wget :-) the only one that worked

Code: [Select]

# wget --no-check-certificate https://github.com/arduino/Arduino/raw/master/hardware/arduino/firmwares/arduino-usbserial/Arduino-usbserial-mega.hex
# wget --no-check-certificate https://github.com/arduino/Arduino/raw/master/hardware/arduino/firmwares/arduino-usbserial/Arduino-usbserial-uno.hex

#
# md5sum Arduino-usbserial-*
03e4a50f01b9bdcce5c3a73d89a33810  Arduino-usbserial-mega.hex
8e01ee236e70bbea43f7eb4e11c9688a  Arduino-usbserial-uno.hex


both files dated: December 04, 2010


Aubrey

Quote
anyone else struggling with firmware update?


Sure am.  I followed all the instructions  in post #34 here 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?


mrtaylor

I have duplicated the error by erasing the firmware, but not updating with the new.  Try it again and post the output of the flash command.

Your already in DFU mode so you don't need to put it there.

cd arduino-0022/hardware/arduino/firmwares/arduino-usbserial
sudo dfu-programmer at90usb82 erase
sudo dfu-programmer flash Arduino-usbserial-uno.hex
sudo dfu-programmer at90usb82 reset

Aubrey

Thanks mrtaylor

It worked perfectly.

It turns out that my reflashing command was corrupted and I was relying on bash history to repeat it without checking.

So it was, as always, human error.  Darn those humans!

mrtaylor

Your Welcome.  Take out the human error and you take out the fun of being human  :)

waisermehmood

#8
Dec 26, 2012, 03:14 pm Last Edit: Dec 27, 2012, 08:05 am by waisermehmood Reason: 1
Hello Every one,


I am trying to do changes in the firmware for Arduino uno.
1.First I install the AVR-GCC following the steps from this post.

http://hunt.net.nz/users/darran/weblog/a4091/Building_Arduino_Atmega8u2_firmware_on_Linux.html

2.I successfully compiled the Arduino firmware with LUFA 100807 with making changes in the makefile for MCU=Atmega8u2 and PID=0x001.

3.Then I installed the dfu-programmer-0.5.5.

4. First I used the erase command it was successful through following command
sudo dfu-programmer at90usb82 erase

5. But when I want to flash the my own hex file arduino-usbserial.hex through following command
sudo dfu-programmer flash arduino-usdbserial.hex

then response was

Bootloader and code overlap
Use --suppress-bootloader-mem to ignore

When I used this as
sudo dfu-programmer flash arduino-usdbserial.hex --suppress-bootloader-mem

Response was

Validating
4152 bytes used (101.37%)

Now when I connected the arduino Uno to window pc then Arduino uno driver did not get update (I also provide the path to the driver)

Now using flip, when I load the same hex file, I got the following error.

Address is out of range.

I am stuck here and need suggestion.

Waiting for quick response.

Regards,
Waiser


waisermehmood

#9
Dec 27, 2012, 08:09 am Last Edit: Dec 27, 2012, 01:03 pm by waisermehmood Reason: 1
I am using the following arduion uno firmware

  • Arduion-old

  • Arduino-master



downloaded from

https://github.com/arduino/Arduino

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.

Regards,
Waiser

stimmer

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:

1) 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.

2) What version of GCC are you using? The 4.3 series generated good code, 4.5 was dreadful, 4.7 is quite good again.

3) 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.
Due VGA library - http://arduino.cc/forum/index.php/topic,150517.0.html

Go Up