I could be horribly wrong, but this could well be because avrdude
thinks you're talking to an AT90USB162, which has less memory than the
ATmega8U2, and your firmware file has addresses which are valid for an
ATmega8U2 but invalid for an AT90USB162.
In order to teach avrdude about the ATmega8U2, you might find this post helpful:
http://forums.adafruit.com/viewtopic.php?f=24&t=19357
Mitch.
You're right about the memory difference between the two MCUs. I
should have used the AT90USB82 as a compatible MCU, but using either
of them makes no difference, I get the same error. Using the ATmega8U2
is a little bit more elegant however because the -F flag is not
needed.
--
László Monda <http://monda.hu>
Now I get this from dmesg when I plug in the device into USB:
[46137.010245] hub 4-0:1.0: unable to enumerate USB device on port 1
[46226.332554] usb 4-1: new full speed USB device using uhci_hcd and address 114
After keeping HWB pressed, pressing RESET finally releasing HWB and
expecting to get into bootloader mode I get this:
[46241.450066] usb 4-1: device descriptor read/64, error -110
[46256.682545] usb 4-1: device descriptor read/64, error -110
[46256.910095] usb 4-1: new full speed USB device using uhci_hcd and address 115
When executing dfu-programmer or lsusb I can wait ages and nothing
happens. Something is not right.
Also, I'm confused about how much flash the DFU firmware really
occupies. Upon building the firmware I got this:
Size after:
AVR Memory Usage
----------------
Device: atmega8u2
Program: 3334 bytes (40.7% Full)
(.text + .data + .bootloader)
Data: 127 bytes (24.8% Full)
(.data + .bss + .noinit)
But when uploading it to the MCU I get the message:
"avrdude: writing flash (7430 bytes):"
Thanks in advance!
> --
> You received this message because you are subscribed to the Google Groups "LUFA Library Support List" group.
> To post to this group, send email to lufa-s...@googlegroups.com.
> To unsubscribe from this group, send email to lufa-support...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/lufa-support?hl=en.
Thanks, that explains everything.
>>After keeping HWB pressed, pressing RESET finally ...
>
> Once you have loaded the DFU Bootloader into FLASH it should start
> the first time you plug it your board as there is not other firmware.
>
> Did you add USB .rule permissions for the AVR DFU Bootloaders?
> http://code.google.com/p/micropendous/wiki/SettingUpUbuntu904Linux
>
> After plugging in your board run sudo lsusb -vvv and see if the
> ATmega8U2 VID and PID are in your .rule file.
My device doesn't get enumerated, I get the same dmesg errors as I've
already mentioned. In the past I've successfully used an AT90USBKEY
and a breadboarded AT90USB1286. Those had the DFU factory-installed.
The strange thing is that I can program this ATmega8U2 through ISP and
I can make it communicate with the host using the CDC demo so my
custom made PCB should be good. Yet, I cannot make the DFU bootloader
work with it. I'm thinking about breadboarding this MCU and trying to
upload DFU that way because DFU doesn't really seem to work with my
PCB for some reason.
> For more options, visit this group at http://groups.google.com/group/lufa-support?hl=en.
Thanks a lot and keep it up!
> For more options, visit this group at http://groups.google.com/group/lufa-support?hl=en.