Re: LUFA CDC Bootloader failing to enumerate

253 views
Skip to first unread message

Dean Camera

unread,
Oct 16, 2012, 2:03:23 PM10/16/12
to LUFA Library Support List
Do you mean that the bootloader works the first time, but then not
thereafter once you have loaded an application via the bootloader?

- Dean

On Oct 15, 3:22 pm, John Green <john.travis.gr...@gmail.com> wrote:
> Hi,
>
> I'm using the precompiled hex at:http://fourwalledcubicle.com/files/LUFA/Bootloaders/CDC/
>
> for the atmega 32u4 running on NO-BOARD with an 8mhz clock and 4kb
> bootloader space.
>
> Fuses are:
> -U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xFB:m -U lock:w:0xFF:m
>
> Bootloader goes on fine, but as soon as I run any program, the chip stops
> enumerating ...
>
> Any ideas? I'm afraid it could be something similar to:http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=983714
>
> Thanks,
> JG

John Green

unread,
Oct 19, 2012, 5:21:02 AM10/19/12
to lufa-s...@googlegroups.com
Correct. I put the bootloader on, upload say a hello-world-blink.hex, and the device no longer enumerates.

JG

Elijah Insua

unread,
Oct 19, 2012, 3:51:37 PM10/19/12
to lufa-s...@googlegroups.com
Does the led continue to blink?  Did you upload the blink hex via usb or ISP?

-- Elijah

--
You received this message because you are subscribed to the Google Groups "LUFA Library Support List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/lufa-support/-/nLgBaQxX5XIJ.

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.

John Green

unread,
Oct 19, 2012, 5:23:03 PM10/19/12
to lufa-s...@googlegroups.com
../../avrdude -F -vvvv -e -c avrisp2 -p m32u4 -C /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -P usb -U flash:w:./CDC-AVR8-atmega32u4-BOARD_NONE-BOOT_4KB-8MHz.hex

...


avrdude: verifying ...
avrdude: 32768 bytes of flash verified

avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [00] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] P [50] . [00] . [ff] . [00] 
avrdude: safemode read 1, lfuse value: ff
avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [00] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] P [50] . [00] . [ff] . [00] 
avrdude: safemode read 2, lfuse value: ff
avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [00] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] P [50] . [00] . [ff] . [00] 
avrdude: safemode read 3, lfuse value: ff
avrdude: safemode: lfuse reads as FF
avrdude: Sent: . [1d] . [04] . [04] . [00] X [58] . [08] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] X [58] . [08] . [d8] . [00] 
avrdude: safemode read 1, hfuse value: d8
avrdude: Sent: . [1d] . [04] . [04] . [00] X [58] . [08] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] X [58] . [08] . [d8] . [00] 
avrdude: safemode read 2, hfuse value: d8
avrdude: Sent: . [1d] . [04] . [04] . [00] X [58] . [08] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] X [58] . [08] . [d8] . [00] 
avrdude: safemode read 3, hfuse value: d8
avrdude: safemode: hfuse reads as D8
avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [08] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] P [50] . [08] . [fb] . [00] 
avrdude: safemode read 1, efuse value: fb
avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [08] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] P [50] . [08] . [fb] . [00] 
avrdude: safemode read 2, efuse value: fb
avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [08] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] P [50] . [08] . [fb] . [00] 
avrdude: safemode read 3, efuse value: fb
avrdude: safemode: efuse reads as FB
avrdude: safemode: Fuses OK
avrdude: Sent: . [11] . [01] . [01] 
avrdude: Recv: . [11] . [00] 

avrdude done.  Thank you.

...

(EEG)Johns-MacBook-Pro:pbrain JG$ tail /var/log/kernel.log
Oct 19 16:59:01 Johns-MacBook-Pro kernel[0]: AppleUSBCDCACMData: Version number - 4.1.19, Input buffers 8, Output buffers 16
Oct 19 16:59:01 Johns-MacBook-Pro kernel[0]: AppleUSBCDC: Version number - 4.1.19

... at this point enumerates fine. No LEDs work beyond here, but that is to be expected as I'm using the NO-BOARD hex. I upload a simple hello-world blink.hex through the atmega32u4 (which, again, has enumerated correctly) ...

../../avrdude -vvvv -c avr109 -p m32u4 -C /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -P /dev/tty.usbmodem1421 -U flash:w:./blink.hex

... and bam! no more device. Not on reset, nothing. Nothing in the kernel.log showing an attempt either. Just plain doesn't see it.

Am I missing something simple, and if not, thoughts? The caterina bootloader (modified?) that it shipped with from sparkfun worked fine. Im trying to take greater control of the design, however, as it is being integrated into an opensource EEG. 

Thanks,
JG

Elijah Insua

unread,
Oct 19, 2012, 6:02:24 PM10/19/12
to lufa-s...@googlegroups.com
Aha, that is pretty illuminating. I was just hoping your issue was something simple (as I'm still a noob).  This information should help someone debug your situation easier in any case!

Dean Camera

unread,
Oct 20, 2012, 11:54:11 AM10/20/12
to LUFA Library Support List
The only unusual thing I can see is that the BOOTRST fuse is set (set
fuses to 0xFF 0xD9 0xFB to disable it) which will cause the bootloader
to run on power on. That shouldn't break anything as the bootloader
should then just restart on power on rather than result in a dead
device, but it's something to check regardless. I just tested the
bootloader I sent you and it worked fine for me on my own ATMEGA32U4
board under Linux. I'm going to play with the fuses myself and see if
I can replicate your failure some other way.

Cheers!
- Dean
> > On Fri, Oct 19, 2012 at 2:21 AM, John Green <john.travis.gr...@gmail.com>wrote:
>
> >> Correct. I put the bootloader on, upload say a hello-world-blink.hex, and
> >> the device no longer enumerates.
>
> >> JG
>
> >> On Tuesday, October 16, 2012 2:03:24 PM UTC-4, Dean Camera wrote:
>
> >>> Do you mean that the bootloader works the first time, but then not
> >>> thereafter once you have loaded an application via the bootloader?
>
> >>> - Dean
>
> >>> On Oct 15, 3:22 pm, John Green <john.travis.gr...@gmail.com> wrote:
> >>> > Hi,
>
> >>> > I'm using the precompiled hex at:http://fourwalledcubicle.**
> >>> com/files/LUFA/Bootloaders/**CDC/<http://fourwalledcubicle.com/files/LUFA/Bootloaders/CDC/>
>
> >>> > for the atmega 32u4 running on NO-BOARD with an 8mhz clock and 4kb
> >>> > bootloader space.
>
> >>> > Fuses are:
> >>> > -U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xFB:m -U lock:w:0xFF:m
>
> >>> > Bootloader goes on fine, but as soon as I run any program, the chip
> >>> stops
> >>> > enumerating ...
>
> >>> > Any ideas? I'm afraid it could be something similar to:
> >>>http://www.avrfreaks.net/**index.php?name=PNphpBB2&file=**
> >>> viewtopic&p=983714<http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=983714>

John Green

unread,
Oct 20, 2012, 4:26:09 PM10/20/12
to lufa-s...@googlegroups.com
I disabled it. At first blush it doesn't resolve the problem. I've only done it once, however, and will try again this evening.

Thanks for your continued support,
JG

Dean Camera

unread,
Oct 21, 2012, 9:39:47 AM10/21/12
to LUFA Library Support List
What version of AVRDude are you using? What is the -vvvv output of the
programming procedure? I tested locally with AVRDUDE versions 5.11-
Patch#7610 (Windows) and 5.11.1 (Ubuntu) using the bootloader binary I
sent you last via email.

- Dean

John Green

unread,
Oct 21, 2012, 10:11:48 AM10/21/12
to lufa-s...@googlegroups.com
avrdude version 5.11, URL: <http://savannah.nongnu.org/projects/avrdude/>. 

John Green

unread,
Oct 21, 2012, 10:12:32 AM10/21/12
to lufa-s...@googlegroups.com
Will post avrdude verbose output briefly.

John Green

unread,
Oct 21, 2012, 10:58:10 AM10/21/12
to lufa-s...@googlegroups.com
(EEG)Johns-MacBook-Pro:Blink101 JG$ ../../avrdude -vvvv -c avrisp2 -p m32u4 -C /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -P usb -U flash:w:./CDC-AVR8-atmega32u4-BOARD_NONE-BOOT_4KB-8MHz.hex

avrdude: Version 5.11, compiled on Sep  2 2011 at 18:52:52
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/JG/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : avrisp2
avrdude: usbdev_open(): Found AVRISP mkII, serno: 000200092775
avrdude: usbdev_open(): using read endpoint 0x82
avrdude: Sent: . [01] 
avrdude: Recv: . [01] . [00] . [0a] A [41] V [56] R [52] I [49] S [53] P [50] _ [5f] M [4d] K [4b] 2 [32] 
avrdude: stk500v2_getsync(): found AVRISP mkII programmer
         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    10     8    0 no       1024    8      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 : STK500V2
         Description     : Atmel AVR ISP mkII
         Programmer Model: AVRISP mkII
avrdude: Sent: . [03] . [90] 
avrdude: Recv: . [03] . [00] . [01] 
avrdude: Sent: . [03] . [91] 
avrdude: Recv: . [03] . [00] . [01] 
avrdude: Sent: . [03] . [92] 
avrdude: Recv: . [03] . [00] . [0a] 
         Hardware Version: 1
         Firmware Version Master : 1.10
avrdude: Sent: . [03] . [94] 
avrdude: Recv: . [03] . [00] ! [21] 
         Vtarget         : 3.3 V
avrdude: Sent: . [03] . [98] 
avrdude: Recv: . [03] . [00] . [06] 
         SCK period      : 8.00 us

avrdude: Sent: . [10] . [c8] d [64] . [19]   [20] . [00] S [53] . [03] . [ac] S [53] . [00] . [00] 
avrdude: Recv: . [10] . [00] 
avrdude: AVR device initialized and ready to accept instructions

Reading |                                                    | 0% 0.00savrdude: Sent: . [1d] . [04] . [04] . [00] 0 [30] . [00] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] 0 [30] . [00] . [1e] . [00] 
avrdude: Sent: . [1d] . [04] . [04] . [00] 0 [30] . [00] . [01] . [00] 
avrdude: Recv: . [1d] . [00] . [00] 0 [30] . [00] . [95] . [00] 
Reading | #################                                  | 33% 0.00savrdude: Sent: . [1d] . [04] . [04] . [00] 0 [30] . [00] . [02] . [00] 
avrdude: Recv: . [1d] . [00] . [00] 0 [30] . [00] . [87] . [00] 
Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9587
avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [00] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] P [50] . [00] . [ff] . [00] 
avrdude: safemode read 1, lfuse value: ff
avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [00] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] P [50] . [00] . [ff] . [00] 
avrdude: safemode read 2, lfuse value: ff
avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [00] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] P [50] . [00] . [ff] . [00] 
avrdude: safemode read 3, lfuse value: ff
avrdude: safemode: lfuse reads as FF
avrdude: Sent: . [1d] . [04] . [04] . [00] X [58] . [08] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] X [58] . [08] . [d9] . [00] 
avrdude: safemode read 1, hfuse value: d9
avrdude: Sent: . [1d] . [04] . [04] . [00] X [58] . [08] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] X [58] . [08] . [d9] . [00] 
avrdude: safemode read 2, hfuse value: d9
avrdude: Sent: . [1d] . [04] . [04] . [00] X [58] . [08] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] X [58] . [08] . [d9] . [00] 
avrdude: safemode read 3, hfuse value: d9
avrdude: safemode: hfuse reads as D9
avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [08] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] P [50] . [08] . [cb] . [00] 
avrdude: safemode read 1, efuse value: cb
avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [08] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] P [50] . [08] . [cb] . [00] 
avrdude: safemode read 2, efuse value: cb
avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [08] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] P [50] . [08] . [cb] . [00] 
avrdude: safemode read 3, efuse value: cb
avrdude: safemode: efuse reads as CB
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: Sent: . [1d] . [04] . [04] . [00] . [a0] . [03] . [fc] . [00] 
avrdude: Recv: . [1d] . [00] . [00] . [a0] . [03] . [ff] . [00] 
avrdude: Sent: . [1d] . [04] . [04] . [00] . [a0] . [03] . [fd] . [00] 
avrdude: Recv: . [1d] . [00] . [00] . [a0] . [03] . [ff] . [00] 
avrdude: Sent: . [1d] . [04] . [04] . [00] . [a0] . [03] . [fe] . [00] 
avrdude: Recv: . [1d] . [00] . [00] . [a0] . [03] . [ff] . [00] 
avrdude: Sent: . [1d] . [04] . [04] . [00] . [a0] . [03] . [ff] . [00] 
avrdude: Recv: . [1d] . [00] . [00] . [a0] . [03] . [ff] . [00] 
avrdude: erasing chip
avrdude: Sent: . [12] . [09] . [00] . [ac] . [80] . [ed] . [ff] 
avrdude: Recv: . [12] . [00] 
avrdude: Sent: . [10] . [c8] d [64] . [19]   [20] . [00] S [53] . [03] . [ac] S [53] . [00] . [00] 
avrdude: Recv: . [10] . [00] 
avrdude: reading input file "./CDC-AVR8-atmega32u4-BOARD_NONE-BOOT_4KB-8MHz.hex"
avrdude: input file ./CDC-AVR8-atmega32u4-BOARD_NONE-BOOT_4KB-8MHz.hex auto detected as Intel Hex
avrdude: writing flash (32768 bytes):

Writing | ############################################       | 87% 0.00savrdude: Sent: . [06] . [00] . [00] 8 [38] . [00] 
avrdude: Recv: . [06] . [00] 

.... a bunch of writes ...

avrdude: Recv: . [14] . [00] . [00] . [01] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [eb] . [cb] . [fe] . [cb] . [11] . [cc] . [1f] . [cc] $ [24] . [cc] ) [29] . [cc] / [2f] . [cc] . [08] . [95] . [08] . [95] . [08] . [95] . [08] . [95] . [08] . [95] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [df] . [cf] . [df] . [cf] . [df] . [cf] . [df] . [cf] . [df] . [cf] . [df] . [cf] . [df] . [cf] . [df] . [cf] . [df] . [cf] . [df] . [cf] . [df] . [cf] . [df] . [cf] . [00] p [70] . [00] . [00] . [00] . [df] . [fb] . [dc] . [00] 
Reading | ################################################## | 100% 9.38s

avrdude: verifying ...
avrdude: 32768 bytes of flash verified

avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [00] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] P [50] . [00] . [ff] . [00] 
avrdude: safemode read 1, lfuse value: ff
avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [00] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] P [50] . [00] . [ff] . [00] 
avrdude: safemode read 2, lfuse value: ff
avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [00] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] P [50] . [00] . [ff] . [00] 
avrdude: safemode read 3, lfuse value: ff
avrdude: safemode: lfuse reads as FF
avrdude: Sent: . [1d] . [04] . [04] . [00] X [58] . [08] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] X [58] . [08] . [d9] . [00] 
avrdude: safemode read 1, hfuse value: d9
avrdude: Sent: . [1d] . [04] . [04] . [00] X [58] . [08] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] X [58] . [08] . [d9] . [00] 
avrdude: safemode read 2, hfuse value: d9
avrdude: Sent: . [1d] . [04] . [04] . [00] X [58] . [08] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] X [58] . [08] . [d9] . [00] 
avrdude: safemode read 3, hfuse value: d9
avrdude: safemode: hfuse reads as D9
avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [08] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] P [50] . [08] . [cb] . [00] 
avrdude: safemode read 1, efuse value: cb
avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [08] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] P [50] . [08] . [cb] . [00] 
avrdude: safemode read 2, efuse value: cb
avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [08] . [00] . [00] 
avrdude: Recv: . [1d] . [00] . [00] P [50] . [08] . [cb] . [00] 
avrdude: safemode read 3, efuse value: cb
avrdude: safemode: efuse reads as CB
avrdude: safemode: Fuses OK
avrdude: Sent: . [11] . [01] . [01] 
avrdude: Recv: . [11] . [00] 

avrdude done.  Thank you.

Its strange: three of my unusable fuse bits changed... efuse from 0xfb to 0xcb... cant change them back. Other than that all writes well...

JG

Dean Camera

unread,
Oct 21, 2012, 11:01:56 AM10/21/12
to LUFA Library Support List
Do you have the verbose output from the session when you program in
the user application via the bootloader? That's what I'm interested in
- not the programming of the bootloader itself, but the interactions
between the bootloader and the host when AVRDUDE tries to program the
target FLASH with it.

- Dean

On Oct 21, 4:58 pm, John Green <john.travis.gr...@gmail.com> wrote:
> (EEG)Johns-MacBook-Pro:Blink101 JG$ ../../avrdude -vvvv -c avrisp2 -p m32u4
> -C
> /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf
> -P usb -U flash:w:./CDC-AVR8-atmega32u4-BOARD_NONE-BOOT_4KB-8MHz.hex
>
> avrdude: Version 5.11, compiled on Sep  2 2011 at 18:52:52
>          Copyright (c) 2000-2005 Brian Dean,http://www.bdmicro.com/
> . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . [ff] . ...
>
> read more »

John Green

unread,
Oct 21, 2012, 11:06:37 AM10/21/12
to lufa-s...@googlegroups.com
(EEG)Johns-MacBook-Pro:Blink101 JG$ ../../avrdude -vvvv -c avr109 -p m32u4 -C /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -P /dev/tty.usbmodem1421 -U flash:w:./blink.hex

avrdude: Version 5.11, compiled on Sep  2 2011 at 18:52:52
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/JG/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/tty.usbmodem1421
         Using Programmer              : avr109
         Programmer Type : butterfly
         Description     : Atmel AppNote AVR109 Boot Loader

Connecting to programmer: .avrdude: Send: . [1b] 
avrdude: Send: S [53] 
avrdude: Recv: L [4c] 

avrdude: Recv: U [55] F [46] A [41] C [43] D [44] C [43] 
avrdude: Send: V [56] 
avrdude: Recv: 1 [31] 0 [30] 
avrdude: Send: v [76] 
avrdude: Recv: ? [3f] 
avrdude: Send: p [70] 
avrdude: Recv: S [53] 
Found programmer: Id = "LUFACDC"; type = S
    Software Version = 1.0; No Hardware Version given.
avrdude: Send: a [61] 
avrdude: Recv: Y [59] 
Programmer supports auto addr increment.
avrdude: Send: b [62] 
avrdude: Recv: Y [59] 
avrdude: Recv: . [00] 
avrdude: Recv: . [80] 
Programmer supports buffered memory access with buffersize=128 bytes.
avrdude: Send: t [74] 

Programmer supports the following devices:
avrdude: Recv: D [44] 
    Device code: 0x44
avrdude: Recv: . [00] 

avrdude: Send: T [54] D [44] 
avrdude: Recv: . [0d] 
avrdude: devcode selected: 0x44
avrdude: Send: P [50] 
avrdude: Recv: . [0d] 
avrdude: AVR device initialized and ready to accept instructions

Reading |                                                    | 0% 0.00savrdude: Send: s [73] 
avrdude: Recv: . [87] . [95] . [1e] 
Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9587
avrdude: Send: F [46] 
avrdude: Recv: . [ff] 
avrdude: safemode read 1, lfuse value: ff
avrdude: Send: F [46] 
avrdude: Recv: . [ff] 
avrdude: safemode read 2, lfuse value: ff
avrdude: Send: F [46] 
avrdude: Recv: . [ff] 
avrdude: safemode read 3, lfuse value: ff
avrdude: safemode: lfuse reads as FF
avrdude: Send: N [4e] 
avrdude: Recv: . [d9] 
avrdude: safemode read 1, hfuse value: d9
avrdude: Send: N [4e] 
avrdude: Recv: . [d9] 
avrdude: safemode read 2, hfuse value: d9
avrdude: Send: N [4e] 
avrdude: Recv: . [d9] 
avrdude: safemode read 3, hfuse value: d9
avrdude: safemode: hfuse reads as D9
avrdude: Send: Q [51] 
avrdude: Recv: . [cb] 
avrdude: safemode read 1, efuse value: cb
avrdude: Send: Q [51] 
avrdude: Recv: . [cb] 
avrdude: safemode read 2, efuse value: cb
avrdude: Send: Q [51] 
avrdude: Recv: . [cb] 
avrdude: safemode read 3, efuse value: cb
avrdude: safemode: efuse reads as CB
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: Send: A [41] . [03] . [fc] 
avrdude: Recv: . [0d] 
avrdude: Send: g [67] . [00] . [01] E [45] 
avrdude: Recv: . [ff] 
avrdude: Send: A [41] . [03] . [fd] 
avrdude: Recv: . [0d] 
avrdude: Send: g [67] . [00] . [01] E [45] 
avrdude: Recv: . [ff] 
avrdude: Send: A [41] . [03] . [fe] 
avrdude: Recv: . [0d] 
avrdude: Send: g [67] . [00] . [01] E [45] 
avrdude: Recv: . [ff] 
avrdude: Send: A [41] . [03] . [ff] 
avrdude: Recv: . [0d] 
avrdude: Send: g [67] . [00] . [01] E [45] 
avrdude: Recv: . [ff] 
avrdude: erasing chip
avrdude: Send: e [65] 
avrdude: Recv: . [0d] 
avrdude: reading input file "./blink.hex"
avrdude: input file ./blink.hex auto detected as Intel Hex
avrdude: writing flash (128 bytes):

Writing |                                                    | 0% 0.00savrdude: Send: A [41] . [00] . [00] 
avrdude: Recv: . [0d] 
avrdude: Send: B [42] . [00] . [80] F [46] . [0c] . [c0] ' [27] . [c0] & [26] . [c0] % [25] . [c0] $ [24] . [c0] # [23] . [c0] " [22] . [c0] ! [21] . [c0]   [20] . [c0] . [1f] . [c0] . [1e] . [c0] . [1d] . [c0] . [1c] . [c0] . [11] $ [24] . [1f] . [be] . [cf] . [e5] . [d2] . [e0] . [de] . [bf] . [cd] . [bf] . [10] . [e0] . [a0] . [e6] . [b0] . [e0] . [e0] . [e8] . [f0] . [e0] . [03] . [c0] . [c8] . [95] 1 [31] . [96] . [0d] . [92] . [a0] 6 [36] . [b1] . [07] . [d1] . [f7] . [10] . [e0] . [a0] . [e6] . [b0] . [e0] . [01] . [c0] . [1d] . [92] . [a0] 6 [36] . [b1] . [07] . [e1] . [f7] . [02] . [d0] . [15] . [c0] . [d6] . [cf]   [20] . [9a] ( [28] . [ec] 0 [30] . [e0] ( [28] . [9a] . [80] . [e3] . [95] . [e7] . [f9] . [01] 1 [31] . [97] . [f1] . [f7] . [01] . [97] . [d9] . [f7] ( [28] . [98] . [80] . [e3] . [95] . [e7] . [f9] . [01] 1 [31] . [97] . [f1] . [f7] . [01] . [97] . [d9] . [f7] . [ef] . [cf] . [f8] . [94] . [ff] . [cf] 
avrdude: Recv: . [0d] 
Writing | ################################################## | 100% 0.01s



avrdude: 128 bytes of flash written
avrdude: verifying flash memory against ./blink.hex:
avrdude: load data flash data from input file ./blink.hex:
avrdude: input file ./blink.hex auto detected as Intel Hex
avrdude: input file ./blink.hex contains 128 bytes
avrdude: reading on-chip flash data:

Reading |                                                    | 0% 0.00savrdude: Send: A [41] . [00] . [00] 
avrdude: Recv: . [0d] 
avrdude: Send: g [67] . [00] . [80] F [46] 
avrdude: Recv: . [0c] . [c0] ' [27] . [c0] & [26] . [c0] % [25] . [c0] $ [24] . [c0] # [23] . [c0] " [22] . [c0] ! [21] . [c0]   [20] . [c0] . [1f] . [c0] . [1e] . [c0] . [1d] . [c0] . [1c] . [c0] . [11] $ [24] . [1f] . [be] . [cf] . [e5] . [d2] . [e0] . [de] . [bf] . [cd] . [bf] . [10] . [e0] . [a0] . [e6] . [b0] . [e0] . [e0] . [e8] . [f0] . [e0] . [03] . [c0] . [c8] . [95] 1 [31] . [96] . [0d] . [92] . [a0] 6 [36] . [b1] . [07] . [d1] . [f7] . [10] . [e0] . [a0] . [e6] . [b0] . [e0] . [01] . [c0] . [1d] . [92] . [a0] 6 [36] . [b1] . [07] . [e1] . [f7] . [02] . [d0] . [15] . [c0] . [d6] . [cf]   [20] . [9a] ( [28] . [ec] 0 [30] . [e0] ( [28] . [9a] . [80] . [e3] . [95] . [e7] . [f9] . [01] 1 [31] . [97] . [f1] . [f7] . [01] . [97] . [d9] . [f7] ( [28] . [98] . [80] . [e3] . [95] . [e7] . [f9] . [01] 1 [31] . [97] . [f1] . [f7] . [01] . [97] . [d9] . [f7] . [ef] . [cf] . [f8] . [94] . [ff] . [cf] 
Reading | ################################################## | 100% 0.00s



avrdude: verifying ...
avrdude: 128 bytes of flash verified

avrdude: Send: F [46] 
avrdude: Recv: . [ff] 
avrdude: safemode read 1, lfuse value: ff
avrdude: Send: F [46] 
avrdude: Recv: . [ff] 
avrdude: safemode read 2, lfuse value: ff
avrdude: Send: F [46] 
avrdude: Recv: . [ff] 
avrdude: safemode read 3, lfuse value: ff
avrdude: safemode: lfuse reads as FF
avrdude: Send: N [4e] 
avrdude: Recv: . [d9] 
avrdude: safemode read 1, hfuse value: d9
avrdude: Send: N [4e] 
avrdude: Recv: . [d9] 
avrdude: safemode read 2, hfuse value: d9
avrdude: Send: N [4e] 
avrdude: Recv: . [d9] 
avrdude: safemode read 3, hfuse value: d9
avrdude: safemode: hfuse reads as D9
avrdude: Send: Q [51] 
avrdude: Recv: . [cb] 
avrdude: safemode read 1, efuse value: cb
avrdude: Send: Q [51] 
avrdude: Recv: . [cb] 
avrdude: safemode read 2, efuse value: cb
avrdude: Send: Q [51] 
avrdude: Recv: . [cb] 
avrdude: safemode read 3, efuse value: cb
avrdude: safemode: efuse reads as CB
avrdude: safemode: Fuses OK
avrdude: Send: L [4c] 
avrdude: Recv: . [0d] 
avrdude: Send: E [45] 
avrdude: Recv: . [0d] 

avrdude done.  Thank you.


John Green

unread,
Oct 23, 2012, 12:34:00 PM10/23/12
to lufa-s...@googlegroups.com
Mr Camera - was that what you were looking for? 
JG


On Monday, October 15, 2012 9:22:45 AM UTC-4, John Green wrote:

for the atmega 32u4 running on NO-BOARD with an 8mhz clock and 4kb bootloader space.

Fuses are:
-U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xFB:m -U lock:w:0xFF:m

Bootloader goes on fine, but as soon as I run any program, the chip stops enumerating ...

Any ideas? I'm afraid it could be something similar to:

Dean Camera

unread,
Oct 24, 2012, 3:52:00 PM10/24/12
to LUFA Library Support List
Yes it was - I've taken a look but as far as I can see everything
there is normal, so the failures you are seeing are a bit of a mystery
to me. Can you try one of the other class bootloaders (DFU or HID) and
see if you get different results?

- Dean

John Green

unread,
Oct 24, 2012, 4:53:03 PM10/24/12
to lufa-s...@googlegroups.com
Yep, will do. 

--
You received this message because you are subscribed to the Google Groups "LUFA Library Support List" group.

John Green

unread,
Oct 27, 2012, 4:00:44 PM10/27/12
to lufa-s...@googlegroups.com
OK. Im at a loss on how to proceed and I'm beginning to think it's something Im simply overlooking on my part. Neither the HID or DFU worked on my Mac, they didn't even try to enumerate. I ran through the CDC again and it works wonderfully, until I program it, then instantly it's dead...

Am I overwriting something? I see why you, Mr. Camera, were more concerned with the interactions between the 32u4 and the program write ... it sounds like you didn't see anything fishy?

JG

Dean Camera

unread,
Oct 28, 2012, 7:39:30 AM10/28/12
to LUFA Library Support List
I didn't see anything out of the ordinary in either write, but I'm a
bit worried by the fact that the other bootloaders aren't trying to
enumerate. That means that either the chip isn't running correctly, or
the device isn't being programmed with the bootloader correctly. Do
you have access to any Windows machines at all? If so, try programming
in the bootloader on there with a known-good build of AVRDude or Atmel
Studio.

1) Is the AVRISP you are using a LUFA clone, or the real one from
Atmel?
2) Can you try using a prebuilt version of AVRDude from another
source?
3) What is the schematic of your board?

- Dean

On Oct 27, 9:00 pm, John Green <john.travis.gr...@gmail.com> wrote:
> OK. Im at a loss on how to proceed and I'm beginning to think it's
> something Im simply overlooking on my part. Neither the HID or DFU worked
> on my Mac, they didn't even try to enumerate. I ran through the CDC again
> and it works wonderfully, until I program it, then instantly it's dead...
>
> Am I overwriting something? I see why you, Mr. Camera, were more concerned
> with the interactions between the 32u4 and the program write ... it sounds
> like you didn't see anything fishy?
>
> JG
>
> On Wed, Oct 24, 2012 at 4:53 PM, John Green <john.travis.gr...@gmail.com>wrote:
>
>
>
>
>
>
>
> > Yep, will do.
>

John Green

unread,
Oct 28, 2012, 11:44:36 AM10/28/12
to lufa-s...@googlegroups.com
1) AVRISP is official atmega.
2) Will try.

JG
Reply all
Reply to author
Forward
0 new messages